Oracle7 Server Concepts

Contents Index Home Previous Next

Database and Instance Startup

There are three steps to starting a database and making it available for systemwide use:

Starting an Instance

Starting an instance includes the allocation of an SGA -- a shared area of memory used for database information -- and creation of the background processes. Instance startup anticipates a database being mounted by the instance. If an instance has been started but not yet mounted, no database is associated with these memory structures and processes.

Before an instance actually is created, Oracle reads a parameter file, which determines the instance initialization. This file includes parameters that control such things as the size of the SGA, the name of the database to which the instance can connect, and so on.

Note: See "Parameter Files" [*] for more information about parameter files. See Chapter 9, "Memory Structures and Processes", for more information about the terms "SGA", "background processes", and "instance".

Restricted Mode of Instance Startup

You can start an instance in or alter an existing instance to be in restricted mode. This limits connections to only those users who have been granted the RESTRICTED SESSION system privilege.

Forcing an Instance to Startup in Abnormal Situations

In unusual circumstances, an instance might not be shut down "cleanly", for example, one of the instance's processes might not be killed. In such situations, the database might return an error during normal instance startup. To resolve this problem, the database administrator must kill all remnant Oracle processes of the previous instance and then start the new instance.

Mounting a Database

Mounting a database associates a database with a previously started instance. After an instance mounts a database, the database remains closed and is accessible only to database administrators. The database administrator might want to start an instance and only mount the database to complete specific maintenance operations.

When an instance mounts a database, the instance finds the control files and opens them. The control files are specified in the CONTROL_FILES initialization parameter in the parameter file used to start the instance. Once the database's control files are opened, Oracle reads them to get the names of the database's datafiles and redo log files.

Modes of Mounting a Database with the Parallel Server

If Oracle allows multiple instances to mount the same database concurrently, the DBA can choose whether to run the database in exclusive or parallel mode.

Exclusive Mode If the first instance that mounts a database does so in exclusive mode, only that instance can mount the database. Versions of Oracle that do not support the Parallel Server option only allow an instance to mount a database in exclusive mode.

Parallel Mode If the first instance that mounts a database is started in parallel mode (also called "shared mode"), other instances that are started in parallel mode can also mount the database. The number of instances that can mount the database is subject to a predetermined maximum. See Oracle7 Parallel Server Concepts & Administration for more information about the use of multiple instances with a single database.

Opening a Database

Opening a mounted database makes the database available for normal database operations. Any valid user can connect to the database and access its information once it is open. Usually, the database administrator opens the database to make it available for general use.

When you open the database, Oracle opens the online datafiles and online redo log files. If a tablespace was offline when the database was previously shut down, the tablespace and its corresponding datafiles will still be offline when you reopen the database. See "Online and Offline Tablespaces" [*].

If any of the datafiles or redo log files are not present when you attempt to open the database, Oracle returns an error. You must perform recovery on a backup of any damaged or missing database files before you can open the database.

Instance Recovery

If the database was shut down either because the database administrator aborted its instance or because a power failure occurred while the database was running, Oracle automatically performs instance recovery when the database is reopened. See Chapter 24, "Database Recovery", for complete information concerning instance recovery.

Rollback Segment Acquisition

As an instance opens a database, the instance attempts to acquire one or more rollback segments. See "Instances and Types of Rollback Segments" [*].

Resolution of In-Doubt Distributed Transaction

Assume that a database is abruptly shut down (for example, a power failure occurs or the instance is aborted) and one or more distributed transactions have not been committed or rolled back. When you reopen the database and instance recovery is complete, the RECO background process automatically, immediately, and consistently resolves any distributed transactions that have been committed or rolled back. For information about distributed transactions, see Chapter 21, "Distributed Databases". For information about recovery from failures associated with distributed transactions, see Oracle7 Server Distributed Systems, Volume I.


Contents Index Home Previous Next