
This post serves as a reference to close and open PDB databases. I have been mentoring some colleagues on the way to a data and database management career. As we have been managing Oracle multitenant environments quite often, I decided to create an example where they can easily visualize and have a reference on it. I made another blog post where one can imagine the existence of PDBs (https://www.techdatabasket.com/2018/11/08/how-to-check-if-my-database-is-a-cdb-database-or-not/). Thus, follow below is the representation of the closing and opening of a database instance named TECHDB in an Oracle RAC configuration with three nodes:
-- CLOSE INSTANCES
SQL> alter pluggable database techdb close immediate instances=('techdb1'); ##for close techdb at node 3
SQL>alter pluggable database techdb close immediate instances=('techdb2'); ##for close techdb at node 2
SQL> alter pluggable database techdb close immediate instances=('techdb3'); ##for close techdb at node 1
-- CLOSE ALL PDB INSTANCES AT ONCE
SQL> alter pluggable database close immediate;
-- OPEN INSTANCES
SQL>alter pluggable database techdb open instances=('techdb3'); ##for close techdb at node 3
SQL>alter pluggable database techdb open instances=('techdb2'); ##for close techdb at node 2
SQL>alter pluggable database techdb open instances=('techdb1'); ##for close techdb at node 1
-- OPEN ALL PDB INSTANCES AT ONCE
SQL>alter pluggable database all open instances=ALL; ## open all PDB
-- THERE IS ALSO AN OPTION TO SAVE THE CURRENT STATE OF THE PDBs with the "SAVE STATE" OPTION:
SQL>ALTER PLUGGABLE DATABASE ALL SAVE STATE;
Additionally, there are many other examples and options in chapter 15 Administering PDBs of the Release 19 Administrator’s Guide. For previous versions for example at version 12c, the information is under chapter 40 Administering a CDB with SQL*Plus. Therefore, I hope this post can be helpful to you.


*The views expressed here are my own and do not represent those of my employer.*
Hello, I’m Bruno — a dual citizen of Brazil and Sweden. I bring a global perspective shaped by experiences in both South America and Europe, with a strong focus on collaboration and innovation across cultures. I am a Computer Scientist, PhD Candidate in Information and Communication Technologies, focusing on Data Science and Artificial Intelligence, and hold dual Master’s degrees in Data Science and Cybersecurity. With over fifteen years of international experience spanning Brazil, Hungary, and Sweden, I have collaborated with global organizations such as IBM, Playtech, and Oracle, as well as contributed remotely to projects across multiple regions. My professional interests include Databases, Cybersecurity, Cloud Computing, Data Science, Data Engineering, Big Data, Artificial Intelligence, Programming, and Software Engineering, all driven by a deep passion for transforming data into strategic business value.