Renaming a Pluggable Database (PDB)

I’ve been working on a few scripts that will be used to build new CDB/PDB environments.  At the last minute, the client requested that the PDB names be specific and enumerated.  So this got me thinking, is there a way to rename a Pluggable Database (PDB) after it has been built?  The answer is yes!  

Former co-worker at Oracle, Mike Detrick documents the process over on his blog as well (here).  This brief write up will serve as a reminder to the topic as well.

To rename an Oracle Pluggable Database, the following has to be done:

1. Take the Oracle Pluggable Database offline

$ sqlplus / as sysdba
SQL > alter pluggable database <NAME> close;
SQL> alter pluggable database <NAME> open restricted;

SQL> show pdbs;

CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 OGGTST READ WRITE YES

2. Connect to the PDB and rename the PDB

SQL> alter session set container=OGGTST;
SQL> alter pluggable database rename global_name to TESTPDB;

SQL> show pdbs;

CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
3 TSTPDB READ WRITE YES

3. Bring the renamed PDB back online

SQL> alter session set container=CDB$ROOT;
SQL> alter pluggable database TSTPDB close;
SQL> alter pluggable database TSTPDB open read write;

SQL> show pdbs;

CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 TSTPDB READ WRITE NO

Please note that when you change the PDB name, its underlying directory structure will not change.  

Enjoy!!!

Please follow and like:
Comments
  • Com tanto conteúdo e artigos, alguma vez se deparou com problemas de plágio ou violação de direitos de autor? O meu site tem muito conteúdo exclusivo que eu próprio criei ou

  • Appreciating the time and energy you put into your site and in depth information you present. It’s nice to come across a blog every once in a while that isn’t the same out of date rehashed material. Great read! I’ve bookmarked your site and I’m adding your RSS feeds to my Google account.

  • Hi there, just became alert to your blog through Google, and found that it is really informative. I am gonna watch out for brussels. I’ll appreciate if you continue this in future. Lots of people will be benefited from your writing. Cheers!

  • I’m typically to running a blog and i really recognize your content. The article has really peaks my interest. I am going to bookmark your website and maintain checking for new information.

  • Businessiraq.com is more than just a directory; it’s a platform that connects talent with opportunity through its robust Job and Tender Directory. Businesses can efficiently advertise job openings while job seekers can easily find positions suited to their skills and career aspirations in Iraq. By incorporating localized SEO strategies that highlight employment opportunities in Iraq and tender submissions, the site maximizes its reach among both employers and potential employees. This not only benefits individual careers but also contributes to the overall growth of the Iraqi economy by filling essential roles across various sectors.

  • Hey! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good gains. If you know of any please share. Thank you!

  • Have you ever considered writing an ebook or guest authoring on other blogs? I have a blog centered on the same ideas you discuss and would really like to have you share some stories/information. I know my audience would value your work. If you are even remotely interested, feel free to send me an email.

  • Have funds disappeared on your QIWI wallet?We understand how stressful that can be.Stay calm—our company specializes in recovering missing money from QIWI wallets.With expert knowledge, we’re sure we can assist you.Drop us a message and let’s start the process of getting your money back.

Leave a Reply

Your email address will not be published. Required fields are marked *

Enquire now

Give us a call or fill in the form below and we will contact you. We endeavor to answer all inquiries within 24 hours on business days.