Note renaming a PDB does not automatically rename its associated directories or data files.
If you need to rename those, you can use the ALTER DATABASE MOVE DATAFILE command.
- Close PDB we are going to rename
sqlplus / as sysdba
ALTER PLUGGABLE DATABASE <current name> CLOSE IMMEDIATE; - Open the PDB in restricted mode:
ALTER PLUGGABLE DATABASE orclpdbee OPEN RESTRICTED; - Rename the PDB:
ALTER SESSION SET CONTAINER = <current name>;
ALTER PLUGGABLE DATABASE RENAME GLOBAL_NAME TO <new name>;
Restart the PDB: - Close the PDB again:
ALTER PLUGGABLE DATABASE CLOSE IMMEDIATE; - ALTER PLUGGABLE DATABASE OPEN;
- Verify the Changes:
SHOW PDBS;