5 copyright © 2004, oracle. all rights reserved. controlling the database
TRANSCRIPT
5-2 Copyright © 2004, Oracle. All rights reserved.
Objectives
After completing this lesson, you should be able to do the following:
• Start and stop iSQL*Plus
• Start and stop Enterprise Manager Database Control
• Start and stop the Oracle Listener
• Start up and shut down Oracle Database 10g
5-3 Copyright © 2004, Oracle. All rights reserved.
Starting and Stopping iSQL*Plus
$ isqlplusctl startiSQL*Plus 10.1.0.2.0Copyright (c) 2004 Oracle. All rights reserved.Starting iSQL*Plus ...iSQL*Plus started.
$ isqlplusctl stopiSQL*Plus 10.1.0.2.0Copyright (c) 2004 Oracle. All rights reserved.Stopping iSQL*Plus ...iSQL*Plus stopped.
5-4 Copyright © 2004, Oracle. All rights reserved.
Management Framework
The three components of the Oracle Database 10g management framework are:
• Database instance
• Listener
• Management interface – Database Control– Management agent (when using Grid Control)
ListenerDatabase Control
Management
agent
Management interface
-or-
5-5 Copyright © 2004, Oracle. All rights reserved.
Starting and Stopping Database Control
$ emctl start dbconsoleTZ set to US/PacificOracle Enterprise Manager 10g Database Control Release 10.1.0.2.0Copyright (c) 1996, 2004 Oracle Corporation. All rights reserved.http://edrsr9p1.us.oracle.com:5500/em/console/aboutApplicationStarting Oracle Enterprise Manager 10g Database Control ...................... started.------------------------------------------------------------------Logs are generated in directory /u01/app/oracle/product/10.1.0/db_1/edrsr9p1.us.oracle.com_orcl/sysman/log
$ emctl stop dbconsoleTZ set to US/PacificOracle Enterprise Manager 10g Database Control Release 10.1.0.2.0Copyright (c) 1996, 2004 Oracle Corporation. All rights reserved.http://edrsr9p1.us.oracle.com:5500/em/console/aboutApplicationStopping Oracle Enterprise Manager 10g Database Control ... ... Stopped.
5-10 Copyright © 2004, Oracle. All rights reserved.
Startup and Shutdown
Click Advanced Options to select startup options
and shutdown mode
5-11 Copyright © 2004, Oracle. All rights reserved.
Starting Up a DatabaseNOMOUNT
OPEN
MOUNT
NOMOUNT
SHUTDOWN
Instance started
STARTUP
5-12 Copyright © 2004, Oracle. All rights reserved.
Starting Up a DatabaseMOUNT
OPEN
MOUNT
NOMOUNT
SHUTDOWN
Control file opened for this instance
Instance started
STARTUP
SHUTDOWN
5-13 Copyright © 2004, Oracle. All rights reserved.
Starting Up a DatabaseOPEN
OPEN
MOUNT
NOMOUNT
SHUTDOWN
All files opened as described by the control file for this instance
Control file opened for this instance
Instance started
STARTUP
SHUTDOWN
5-14 Copyright © 2004, Oracle. All rights reserved.
Shutting Down the Database
Shutdown mode:
• A = ABORT• I = IMMEDIATE• T = TRANSACTIONAL• N = NORMAL
A
No
No
No
No
T
No
No
Yes
Yes
I
No
No
No
Yes
Shutdown Mode
Allow new connections
Wait until current sessions end
Wait until current transactions end
Force a checkpoint and close files
N
No
Yes
Yes
Yes
5-15 Copyright © 2004, Oracle. All rights reserved.
SHUTDOWN Options
On the way down:
• Database buffer cache written tothe data files
• Uncommitted changes rolledback
• Resources released
On the way up:
• No instance recovery
During
SHUTDOWN NORMAL
orSHUTDOWN
TRANSACTIONALor
SHUTDOWN IMMEDIATE
Consistent database(clean database)
5-17 Copyright © 2004, Oracle. All rights reserved.
SHUTDOWN Options
On the way down:
• Modified buffersare not written to the data files
• Uncommitted changes are not rolled back
On the way up:
• Online redo log files used to reapply changes
• Undo segments used to roll back uncommitted changes
• Resources released
During
SHUTDOWN ABORTor
Instance Failureor
STARTUP FORCE
Inconsistent database(dirty database)
5-21 Copyright © 2004, Oracle. All rights reserved.
Summary
In this lesson, you should have learned how to:
• Start and stop iSQL*Plus
• Start and stop Enterprise Manager Database Console
• Start and stop the listener
• Start up and shut down the database
5-22 Copyright © 2004, Oracle. All rights reserved.
Practice 5: Controlling the Database
This practice covers the following topics:
• Connecting to the database using SQL*Plus and iSQL*Plus
• Stopping and starting Enterprise Manager Database Control
• Stopping and starting the database
• Stopping and starting iSQL*Plus