Oracle Startup and Shutdown Version 21c |
---|
General Information | ||||
Library Note |
|
|||
Note | Starting and stopping the 12c, or above, multi-tenant database is different from starting and stopping a legacy architecture database. What is true in CDB$ROOT is not true in a PDB. You will note a substantial change in this page from all library pages on this subject since the library was started. Now the container name is critical to understanding what to expect and the word database is dropped as it is a term rendered essentially meaningless by the new architecture. The startup demos assume that you have just rebooted the server and that no shell scripts have been written that automatically perform a startup function. Startup commands executed in CDB$ROOT only affect CDB$ROOT whereas shutdown commands affect all PDBs. Startup and shutdown commands executed within a PDB only affect that single PDB. Here's why: STARTUP consists of three separate operations:
SHUTDOWN also contains differences from what is "expected" behaviour. If you are in CDB$ROOT and you issue a shutdown you shutdown everything: CDB$ROOT, PDB$SEED, and every PDB you have created: Makes sense because you only have on instance with memory structures. But if you are logged into a PDB the rules are very different. A PDB is just a collection of files and has no memory structures so no matter what you do: SHUTDOWN, SHUTDOWN IMMEDIATE, SHUTDOWN ABORT what you actually do is change the status of that one PDB, and only that one PDB, to MOUNT state. |
|||
System Privileges |
|
|||
CDB Management | ||||
Start CDB | ||||
Startup | STARTUP [FORCE][RESTRICT][NOMOUNT][MIGRATE][QUIET] |
|||
SQL> conn / as sysdba |
||||
Startup Force | SQL> STARTUP FORCE |
|||
Startup Mount | SQL> STARTUP MOUNT |
|||
Startup Nomount | SQL> STARTUP NOMOUNT |
|||
Startup Mount Exclusive | Deprecated .. now use STARTUP MOUNT |
|||
Startup Open | SQL> STARTUP OPEN |
|||
Startup Migrate | SQL> STARTUP MIGRATE |
|||
Startup Restricted | SQL> STARTUP RESTRICT |
|||
Startup <upgrade> | STARTUP [PFILE=<file_name>]{UPGRADE | DOWNGRADE} [QUIET] |
|||
SQL> STARTUP UPGRADE |
||||
Alter CDB | ||||
Alter Database Mount | SQL> ALTER DATABASE NOMOUNT |
|||
Alter Database Open | SQL> ALTER DATABASE NOMOUNT |
|||
Shutdown CDB | ||||
Shutdown | SHUTDOWN <ABORT | IMMEDIATE | TRANSACTIONAL[LOCAL]> |
|||
SQL> SHUTDOWN |
||||
Shutdown Normal (deprecated) | SQL> SHUTDOWN NORMAL |
|||
Shutdown Transactional | SQL> SHUTDOWN TRANSACTIONAL |
|||
Shutdown Immediate (the default) | SQL> SHUTDOWN IMMEDIATE |
|||
Shutdown Abort | SQL> SHUTDOWN ABORT |
|||
PDB Management | ||||
Start PDB | ||||
Startup One PDB | ALTER PLUGGABLE DATABASE <pdb_name> OPEN; |
|||
conn / as sysdba |
||||
Startup All PDBs | ALTER PLUGGABLE DATABASE ALL OPEN; |
|||
conn / as sysdba |
||||
Startup from within a PDB | STARTUP [READ WRITE] |
|||
SQL> STARTUP; |
||||
Read Only Startup from within a PDB | STARTUP READ ONLY |
|||
SQL> STARTUP READ ONLY; |
||||
Alter PDB | ||||
Alter Database Close | SQL> show con_name |
|||
Shutdown PDB | ||||
Shutdown | SHUTDOWN <ABORT | IMMEDIATE | NORMAL> |
|||
SQL> SHUTDOWN |
||||
Invalid Shutdown | SQL> SHUTDOWN TRANSACTIONAL; |
|||
Oracle Supplied Startup & Shutdown Scripts | ||||
Startup | dbstart |
|||
Shutdown | dbshut |
|||
System Hangs On Shutdown | ||||
Solution | SQL> alter system checkpoint; |
|||
Oracle Services On Windows | ||||
CDB Startup | net start OracleService<SID> |
|||
c:\windows\system32 net start oracleserviceorabase |
||||
CDB Shutdown | net stop OracleService<SID> |
|||
c:\windows\system32 net stop oracleserviceorabase |
||||
Help | net<error_msg_number> |
|||
c:\windows\system32 net help helpmsg The syntax of this command is: NET HELPMSG message# NET HELPMSG displays information about Windows network messages (such as error, warning, and alert messages). When you type NET HELPMSG and the 4-digit number of the Windows error (for example, NET2182), Windows tells you about the message and suggests action you can take to solve a problem. message# Is the 4-digit number of the Windows message you need help with. You don't need to type NET as part of the message number. |
||||
Oracle Services On Windows With Oradim | ||||
Start Oracle Service | oradim -STARTUP |
|||
$ORACLE_HOME\bin\oradim -STARTUP -SID orabase -STARTTYPE tstc -SPFILE |
||||
Stop Oracle Service | oradim -SHUTDOWN |
|||
$ORACLE_HOME\bin\oradim -SHUTDOWN -SID orabase -SHUTMODE abort |
||||
Stopping Processes | ||||
When stop doesn't stop | alter database close may fail for many reasons. Among them job queue processes, dbms_job, and advanced queuing.SQL> ALTER DATABASE CLOSE; |
|||
Force log files to be archived in preparation for media recovery | STARTUP MOUNT; |
|||
When testing startup scripts be sure to mimic the environment under which the script will actually run | For example:sh -x /etc/init.d/oracle start |
Related Topics |
Database |
ORADIM |
System |
What's New In 21c |
What's New In 23c |
This site is maintained by Dan Morgan. Last Updated: | This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2023 Daniel A. Morgan All Rights Reserved | |||||||||
|
||||||||||