Startup Process for Pluggable Database (PDB) in Oracle 19c / 23ai


The PDB can be started either with the “STARTUP” command or “ALTER PLUGGABLE DATABASE” command. 

Both methods can be used either from CDB or from the PDB and in both the methods, following startup options can be used (which are similar to a non-CDB database):
  • FORCE – The PDB will go for stop abort and start
  • RESTRICT – The database will be opened in restricted mode and normal user will not be able to connect to the database
  • OPEN <open_pdb_option> (READ ONLY OR READ WRITE) – Open the database in either read-only or read-write mode (Read-write is the default).
Using “STARTUP” command
You can use the “STARTUP” command either from CDB or PDB level to start the PDB. 

From CDB

Syntax: STARTUP PLUGGABLE DATABASE <pdb_name> <startup option>;

Few Examples:
  • Startup pluggable database pdb1a
  • startup pluggable database pdb1c open

From PDB (Your current container must be the same PDB which you are trying to start) :
Syntax:  STARTUP <startup option>

Examples:
  • startup
  • startup open read only
  • startup open read only restrict

Using ALTER PLUGGBALE DATABASE command

The startup options are the same as in STARTUP command and this command can be used both at CDB and PDB level to start a PDB. 

From CDB
Syntax:  ALTER PLUGGABLE DATABASE <pdb_name> OPEN <startup options>;

Examples:
SQL> ALTER PLUGGABLE DATABASE pdb1a OPEN;
SQL> ALTER PLUGGABLE DATABASE pdb1a OPEN READ ONLY;
SQL> ALTER PLUGGABLE DATABASE pdb1a OPEN RESTRICTED;
SQL> alter pluggable database all open;


From PDB
Syntax: ALTER PLUGGABLE DATABASE OPEN <startup options>;

Examples:
alter pluggable database open;
alter pluggable database open read only restricted;
alter pluggable database open force;


Watch the below video for a detailed tutorial & demo on this topic.

=======================================================================
** Email to info@shreyantech.com to get the Tip of the Day in your mailbox.

No comments:

Post a Comment