Team Fly 

Page 99

A common option you will use to perform maintenance will be to open the database in restricted mode. When you issue the command startup restrict, only users with both the create session and restricted session privileges will be able to use the database. So, as a DBA this is a helpful way to open the database that only you can use.

> startup restrict;

The database can be placed in a state where only the sys and system users can query the database without stopping the database and performing a subsequent startup restrict. The activities of other users continue until they become inactive. This can be performed using the quiesce option of alter session when the Database Resource Manager option has been set up.

> alter system quiesce restrict;
> alter system unquiesce;
Forcing a Startup

Over time, you will run into situations where Oracle has not shutdown properly and you are unable to restart it. In these rare instances, you will need to use the force option of the startup command. This will first perform a ''shutdown abort" that forces the database to shutdown (see the next section for more information on this) followed by a database startup.

> startup force

Database and Instance Shutdown

When shutting down an instance, perform these steps, which are reverse from those you just saw when opening a database:

1. Close the database, including the data files and redo logs, so that it is no longer usable for normal tasks.

2. Unmount the database from the instance so that only the instance memory structures and background tasks are left running without a database associated with them.

3. Shut down the instance to close the control files.

In order to shut down a database, four different approaches can be used: Shutdown Normal, Immediate, Transactional, and Abort.

Image Normal is, in a sense, the "perfect" way to shut down, since this approach will wait for all users to disconnect from the database and all transactions

Team Fly 
0118