DBA Hub

📋Steps in this guide1/2

How to rename a pluggable database ( PDB) - DBACLASS DBACLASS

We can easily rename a pluggable database. Follow below steps. Start the PDB with restrict mode SQL> alter session set container=PROD_CL; Session altered. SQL> shutdown immediate; Pluggable Database closed. SQL> startup open restrict Pluggable Database opened. Rename the pdb SQL> alter pluggable database PROD_CL rename global_name to PROD_MN; Pluggable database altered. SQL> show con_name; CON_NAM

oracle clusteringintermediate
by OracleDba
13 views
1

Overview

We can easily rename a pluggable database. Follow below steps. Start the PDB with restrict mode Rename the pdb

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
SQL> alter session set container=PROD_CL;

Session altered.

SQL> shutdown immediate;
Pluggable Database closed.
SQL> startup open restrict
Pluggable Database opened.
2

Section 2

Restart the PDB

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
SQL> alter pluggable database PROD_CL rename global_name to PROD_MN;

Pluggable database altered.

SQL> show con_name;

CON_NAME
------------------------------
PROD_MN

SQL> shutdown immediate;
Pluggable Database closed.
SQL> startup
Pluggable Database opened.

SQL> conn sys/oracle@cdb1 as sysdba
Connected.
SQL> select name,open_mode from v$pdbs;

NAME			       OPEN_MODE
------------------------------ ----------
PDB$SEED		       READ ONLY
ORCL			       READ WRITE
PROD			       READ WRITE
PROD_MN 		       READ WRITE

Comments (0)

Please to add comments

No comments yet. Be the first to comment!