Tuesday, September 24, 2013

Multitenant Self-Service Provisioning - Clone PDB

Previous post, I wrote about Multitenant Self-Service Provisioning (BETA) - Database 12c. It's very useful.for learning PDB. After installatuon by using pdbss_ins.sql script, "APEX" pdb was created.
[oracle@test12c pdbss]$ grep "create pluggable database" *
pdbss_ins.sql:        'create pluggable database APEX admin user PDB_ADMIN identified by ' ||

SQL> connect / as sysdba
Connected.

SQL> select name, open_mode from v$pdbs;
NAME                           OPEN_MODE
------------------------------ ----------
PDB$SEED                       READ ONLY
APEX                           READ WRITE

SQL> alter session set container=APEX;

Session altered.

SQL> select tablespace_name, file_name from dba_data_files;

TABLESPACE_NAME      FILE_NAME
-------------------- ------------------------------------------------------------------------------------------------------------------------
SYSTEM               /u01/app/oracle/oradata/testcdb/TESTCDB/E71C92249E61151EE0436F6FA8C041D1/datafile/o1_mf_system_942fn5mw_.dbf
SYSAUX               /u01/app/oracle/oradata/testcdb/TESTCDB/E71C92249E61151EE0436F6FA8C041D1/datafile/o1_mf_sysaux_942fng96_.dbf

SQL> select tablespace_name, file_name from dba_temp_files;
TABLESPACE_NAME      FILE_NAME
-------------------- ------------------------------------------------------------------------------------------------------------------------
TEMP                 /u01/app/oracle/oradata/testcdb/TESTCDB/E71C92249E61151EE0436F6FA8C041D1/datafile/o1_mf_temp_942fob67_.dbf
Anyway, I didn't explain more what happened after using pdbss_ins.sql script. Readers can test and read it by themselves.
Previous post, I wrote about creating PDB. So, This post is about Cloning PDB (TESTPDB01).
SQL>  select name, open_mode from v$pdbs;

NAME                           OPEN_MODE
------------------------------ ----------
PDB$SEED                       READ ONLY
APEX                           READ WRITE
TESTPDB01                      READ WRITE
PDB status was "READ WRITE", Changed to "READ ONLY". When selected on "Clone".... It asked to change PDB status.


Selected "Clone" again, then found as below picture.


Now, CLONPDB pdb was created.
SQL> select name, open_mode from v$pdbs;

NAME                           OPEN_MODE
------------------------------ ----------
PDB$SEED                       READ ONLY
APEX                           READ WRITE
TESTPDB01                      READ ONLY
CLONEPDB                       READ WRITE
Related Posts
Multitenant Self-Service Provisioning (BETA) - Database 12c

No comments: