Database Startup


When starting the database, you have control over the state in which it ultimately starts. There are several different ways to start the database (MOUNT, NOMOUNT, OPEN, RESTRICT), and these are covered in this section.

STARTUP NOMOUNT

The STARTUP NOMOUNT command starts up the instance but does not mount or open the database. This usually is reserved for times when you are creating a database or need to re-create the control files.

When Oracle starts the instance, it reads the initialization file from the default location, unless otherwise specified. It looks for these files in the following order:

  1. spfileSID.ora

  2. spfile.ora

  3. initSID.ora

You can override this default behavior by specifying:

 STARTUP NOMOUNT pfile=<path_to_pfile>/mypfilename.ora 


Next, during STARTUP NOMOUNT, Oracle allocates the SGA, starts up the background processes, and opens the alert (alertSID.log) and any trace files.

The name of the database that you are starting must either be named with the DB_NAME parameter in the initialization file or be specified in the startup command.


STARTUP MOUNT

STARTUP MOUNT is used to perform certain maintenance operations. This starts up the instance and mounts but does not open the database.

Tasks that need to be accomplished with the database mounted but not open include the following:

  • Rename data files

  • Offline drop data files

  • Enable redo log archiving options

  • Disable redo log archiving options

  • Perform full database recovery

Mounting the database associates that database with a started instance. Oracle opens the control files specified in the parameter file and then reads the control files to determine the names, status, and location of data files and redo log files. There are no checks at this point to verify the existence of the data files or the online redo log files at this time. This is why you can perform file maintenance with the database in this state.

STARTUP OPEN

STARTUP OPEN leaves the database in a normal operational state. This means that the instance is started; the database is mounted and open to the point where any valid Oracle user can access the database, connect, and perform typical data operations. This means that the online data files are open, and the online redo log files are also open. If any online database's data file or if all your online redo logs are not present when you attempt to open the database, Oracle returns an error. If you are using multiplexed redo logs and only one member of the group is unavailable, Oracle still opens the database.

During the final stage of opening the database, the Oracle Server verifies that all the data files, including undo tablespace files and temporary tablespace files, can indeed be opened and checks all the files to ensure the consistency of the database. If necessary, SMON (or the System Monitor background process) initiates an instance recovery to ensure consistency.



    Oracle 9i Fundamentals I Exam Cram 2
    Oracle 9i Fundamentals I Exam Cram 2
    ISBN: 0789732653
    EAN: 2147483647
    Year: 2004
    Pages: 244
    Authors: April Wells

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net