Categories
Database vs. Instance Oracle Certification and Database

Starting the Database- Creating a Database

Starting and stopping your database are tasks that you perform frequently. To start/stop your database, connect with a sysdba- or sysoper-privileged user account, and issue the startup and shutdown statements. The following example uses OS authentication to connect to the database:

After you connect as a privileged account, you can start your database, as follows:

For the prior command to work, you need either an spfile or init.ora file in the ORACLE_HOME/dbs directory. You can also start up with a different spfile by providing a parameter with pfile= and the filename.

Note stopping and restarting the database in quick succession is known colloquially in the Dba world as bouncing your database.

When your instance starts successfully, you should see messages from Oracle indicating that the system global area (SGA) has been allocated. The database is mounted and then opened:

From the prior output, the database startup operation goes through three distinct phases in opening an Oracle database:

•     Starting the instance

•     Mounting the database

•     Opening the database

You can step through these one at a time when you start your database. First, start the Oracle instance (background processes and memory structures):

Next, mount the database. At this point, Oracle reads the control files:

Finally, open the data files and online redo log files:

Figure 2-4 show the startup process.

Figure2-4.Databasestartupprocess

When you start up a database without any parameters, Oracle automatically steps through the three startup phases (nomount, mount open). In most cases, you will issue a STARTUP statement with no parameters to start your database. Table 2-1 describes the meanings of parameters that you can use with the database STARTUP statement.

Table 21. Startup Parameters

We discussed using restart with the database and the srvctl utility. If restart is being used, then parameters are still valid but under the startoption of the command as follows: