quoted from:
10.2 Introduction to Database Startup and Shutdown
An Oracle database may not always be available to all users. To open or close a database, or to start up or shut down an instance, you must have DBA privileges or be connected as SYSOPER or SYSDBA. Other users cannot change the current status of an Oracle database.
10.2.1 Database Startup
To start a database:
- Start an instance
An instance controls the background processes and the allocation of memory area to access an Oracle database.
- Mount the database
Mounting the database associates it with a previously started instance.
- Open the database
Opening the database makes it available for normal database operations.
Example 10-1 Starting an Instance
To start an Oracle Database instance, without mounting the database, enter
CopySTARTUP NOMOUNT
Example 10-2 Mounting the Database
To start an instance, mount the database, but leave the database closed, enter
CopySTARTUP MOUNT
Example 10-3 Opening the Database
To start an instance using the Oracle Database Server parameter file INITSALES.ORA, mount and open the database named SALES, and restrict access to database administrators, enter
CopySTARTUP OPEN sales PFILE=INITSALES.ORA RESTRICT
where SALES is the database name specified in the DB_NAME parameter in the INITSALES.ORA parameter file.
For more information about database startup, see Starting Up and Shutting Down. For more information about starting a database, see the STARTUP command.
10.2.2 PDB Startup
A Pluggable Database (PDB) is a self-contained collection of schemas and schema objects that exist inside a Consolidated Database.
To start a pluggable database:
- Start SQL*Plus with the
/NOLOG
argument:Copysqlplus /nolog
- Issue a
CONNECT
command using easy connect or a net service name to connect to the PDB. - Issue a STARTUP command.
For more information about database startup, see Starting Up and Shutting Down. For more information about starting a database, see the STARTUP command.
10.2.3 Database Shutdown
Shutting down a database involves three steps:
- Closing the database
When a database is closed, all database and recovery data in the SGA are written to the datafiles and redo log files, and all online datafiles are closed.
- Dismounting the database
Dismounting the database disassociates the database from an instance and closes the control files of the database.
- Shutting down the instance
Shutting down an instance reclaims the SGA from memory and terminates the background Oracle Database processes that constitute an Oracle Database instance.
Example 10-4 Shutting Down the Database
To shut down the database normally after it has been opened and mounted, enter
CopySHUTDOWN
For more information about database shutdown, see Shutting Down a Database. For information about stopping a database, see the SHUTDOWN command.
CopyDatabase closed.
Database dismounted.
ORACLE instance shut down.
10.2.4 PDB Shutdown
To shutdown a pluggable database (PDB):
- Connect to the PDB with the required privileges.
- Run the
SHUTDOWN
command.
Note:
-
When the current container is a PDB, the
SHUTDOWN
command only closes the PDB, not the CDB instance. -
There is no
SHUTDOWN
command for a PDB that is equivalent toSHUTDOWN TRANSACTIONAL
orSHUTDOWN ABORT
for a non-CDB.
For more information about database startup, see the Oracle Database Administrator's Guide guide. For more information about starting a database, see the STARTUP command.