You are on page 1of 21

Controlling the Database

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

Copyright © 2004, Oracle. All rights reserved.


Starting and Stopping iSQL*Plus

$ isqlplusctl start
iSQL*Plus 10.1.0.2.0
Copyright (c) 2004 Oracle. All rights reserved.
Starting iSQL*Plus ...
iSQL*Plus started.

$ isqlplusctl stop
iSQL*Plus 10.1.0.2.0
Copyright (c) 2004 Oracle. All rights reserved.
Stopping iSQL*Plus ...
iSQL*Plus stopped.

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)

Management
agent -or-

Database Listener
Control
Management interface

Copyright © 2004, Oracle. All rights reserved.


Starting and Stopping Database Control

$ emctl start dbconsole


TZ set to US/Pacific
Oracle Enterprise Manager 10g Database Control Release 10.1.0.2. 0
Copyright (c) 1996, 2004 Oracle Corporation. All rights reserve d.
http://edrsr9p1.us.oracle.com:5500/em/console/aboutApplication
Starting 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/ sy
sman/log

$ emctl stop dbconsole


TZ set to US/Pacific
Oracle Enterprise Manager 10g Database Control Release 10.1.0.2. 0
Copyright (c) 1996, 2004 Oracle Corporation. All rights reserve d.
http://edrsr9p1.us.oracle.com:5500/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
... Stopped.

Copyright © 2004, Oracle. All rights reserved.


Accessing Database Control

Copyright © 2004, Oracle. All rights reserved.


SYSOPER and SYSDBA

Copyright © 2004, Oracle. All rights reserved.


Database Home Page

Copyright © 2004, Oracle. All rights reserved.


Changing the Listener Status

Copyright © 2004, Oracle. All rights reserved.


Startup and Shutdown

Click Advanced Options


to select startup options
and shutdown mode

Copyright © 2004, Oracle. All rights reserved.


Starting Up a Database
NOMOUNT
OPEN
STARTUP

MOUNT

NOMOUNT

Instance
started
SHUTDOWN

Copyright © 2004, Oracle. All rights reserved.


Starting Up a Database
MOUNT
OPEN
STARTUP

MOUNT

Control file
opened for this
NOMOUNT instance

Instance
started
SHUTDOWN
SHUTDOWN

Copyright © 2004, Oracle. All rights reserved.


Starting Up a Database
OPEN
OPEN
STARTUP All files opened as
described by the control
MOUNT file for this instance

Control file
opened for this
NOMOUNT instance

Instance
started
SHUTDOWN
SHUTDOWN

Copyright © 2004, Oracle. All rights reserved.


Shutting Down the Database

Shutdown Mode A I T N

Allow new connections No No No No

Wait until current sessions end No No No Yes

Wait until current transactions end No No Yes Yes

Force a checkpoint and close files No Yes Yes Yes

Shutdown mode:
• A = ABORT
• I = IMMEDIATE
• T = TRANSACTIONAL
• N = NORMAL

Copyright © 2004, Oracle. All rights reserved.


SHUTDOWN Options

During
On the way down: SHUTDOWN
On the way up:
• Database NORMAL • No
buffer cache or instance
SHUTDOWN
written to recovery
TRANSACTIONAL
the data files or
• Uncommitted SHUTDOWN
changes rolled IMMEDIATE
back
• Resources
released
Consistent database
(clean database)

Copyright © 2004, Oracle. All rights reserved.


SHUTDOWN Options

On the way down: During


On the way up:
• Modified • Online redo
buffers SHUTDOWN ABORT log files used
are not or to reapply
Instance Failure
written to the or changes
data files STARTUP FORCE • Undo
• Uncommitted segments
changes are used to roll
not rolled back
back uncommitted
changes
• Resources
Inconsistent database released
(dirty database)

Copyright © 2004, Oracle. All rights reserved.


Initialization Parameter Files

spfiledb01.ora

Copyright © 2004, Oracle. All rights reserved.


Viewing Initialization Parameters

Copyright © 2004, Oracle. All rights reserved.


Viewing the Alert Log

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

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

Copyright © 2004, Oracle. All rights reserved.

You might also like