• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How To Automate The Opening Of Pluggable Databases After The CDB Starts Up in Oracle 12c

by admin

Here is a short note on how to automate the startup of PDBs after the CDB starts up in Oracle database 12c. You can start all the PDBs or selective PDBs using below steps. We will need to create a database startup trigger in order to automate the PDB startup. Follow the steps outlined below.

1. Login into the CDB as sysdba.

$ sqlplus / as sysdba

2. Create a database startup trigger to open all pluggable databases.

create or replace trigger open_all_pdbs
 after startup on database
begin
 execute immediate 'alter pluggable database all open';
end;
/

3. Or to selectively startup pluggable databases, use separate commands for each.

create or replace trigger open_all_pdbs
 after startup on database
begin
 execute immediate 'alter pluggable database MYCDB1 open';
 execute immediate 'alter pluggable database MYCDB2 open';
end;
/

Filed Under: oracle, oracle 12c

Some more articles you might also be interested in …

  1. ORA-16713: The Oracle Data Guard broker command timed out When Changing LogXptMode
  2. What is Thread Dump in WebLogic
  3. How to Restore and Recover files over network in Oracle 12c
  4. How to reclaim entire space of an oracle database table with “Truncate Table” statement
  5. DDL Statement Examples in SQL
  6. How to Change default Oracle database listener port (1521)
  7. ORA-38760 while starting One of the Oracle RAC Instances
  8. Oracle – How To Check if Autoextensible Datafiles Set To Maxsize Unlimited
  9. How to Enable a Database Trigger
  10. Configuring Data Guard in Oracle Cloud Infrastructure (OCI)

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright