Written by RavKumar YV Introduction Oracle Enterprise Manager Cloud Control 13c offers complete cloud solution including cloning functionalities like Create full clone database, Create test master database, Create CloneDB, Create Snapshot Test Master and Clone Management. Login to Enterprise Manager Cloud Control 13c as ‘sysman’ user privileges and select the option cloning under Oracle Database Select the option: From our list of databases in cloud control, we can right click on the database that we want to Create Full Clone Database and specify the following values for Source and Destination. The wizard will take us through the proper steps to perform to create the Create Full Clone database for Container Database (contdb). Source Database: Global Database Name: contdb Type: Single Instance Database Version: 12.1.0.2.0 Select the credentials for the following options: SYSDBA Database Credentials Database Host Credentials SYSASM ASM Credentials Destination Database: Global Database Name: clonedb Type: Single Instance Database SID: clonedb Select the credentials for the following options: Oracle Home Location Host Database Host Credentials Specify the following options for Configuration Tab: Database Files Location: File System / Automatic Storage Management (ASM) Recovery Files Location: Use Fast Recovery Area with location and size Database Credentials and Parallelism The default location for storage of datafiles is in place and we can use either OFA or ASM based on environment and we can set Fast Recovery Area (FRA) also. Set up the passwords in Database Credentials section. Based on your database size we can use parallel threads functionality. Before using the functionality of Parallel threads we have to consider the number of factors. Specify If any changes in Initialization Parameters If any scripts want to execute Pre Script, Post Script and SQL Script run as ‘sys’ user and specify the locations and we can create Test Master Database Specify the schedule for the Clone Database Check the summary for the following Source and Destination Database The following will create Test Master Pluggable database from the Source Container Database. Container Database: Clonedb Pluggable Database: Clonedb_CDBROOT In Destination Tab: Specify the following Pluggable Database Name: CLON_TM1 PDB Administrator Credentials: PDBADMIN Specify the storage location for the Pluggable Database for Destination Before creating Test Master Pluggable Database check the review Check the following series of steps Enable as a Test Master Database and Specify Container Database with Oracle Home directory and specify Parent Pluggable Database Name Now, time to login and check the newly created Clone database with ‘sysdba’ privileges SQL> connect sys/oracle@clonedb as sysdba Connected. SQL> select file_name from dba_data_files; FILE_NAME ----------------------------------------------------------------------------------------------------------------- /u01/app/oracle/oradata/clonedb/CLONEDB/datafile/o1_mf_system_14qvi8o9_.dbf /u01/app/oracle/oradata/clonedb/CLONEDB/datafile/o1_mf_sysaux_15qvi8o9_.dbf /u01/app/oracle/oradata/clonedb/CLONEDB/datafile/o1_mf_undotbs1_1cqvi8pn_.dbf /u01/app/oracle/oradata/clonedb/CLONEDB/datafile/o1_mf_users_1eqvi8po_.dbf /u01/app/oracle/oradata/clonedb/CLONEDB/datafile/o1_mf_example_1dqvi8pn_.dbf SQL> archive log list; Database log mode Archive Mode Automatic archival Enabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 1 Next log sequence to archive 2 Current log sequence 2 Check the name, status of Pluggable Databases and Open all the Pluggable Databases SQL> select name,open_mode from v$pdbs; NAME OPEN_MODE ------------------------------ ----------------- PDB$SEED READ ONLY PDB1 MOUNTED PDB2 MOUNTED SQL> alter pluggable database all open; Pluggable database altered. SQL> select name,open_mode from v$pdbs; NAME OPEN_MODE ------------------------------ ------------------- PDB$SEED READ ONLY PDB1 READ WRITE PDB2 READ WRITE Check the Control Files, Redo Log Files Locations of Clone Database SQL> select name from v$controlfile; NAME ------------------------------------------------------------------------------------------------------ /u01/app/oracle/oradata/clonedb/CLONEDB/controlfile/o1_mf_cfhtzxl9_.ctl /u01/app/oracle/fast_recovery_area/CLONEDB/controlfile/o1_mf_cfhtzxlh_.ctl SQL> select member from v$logfile; MEMBER --------------------------------------------------------------------------------------------------------------- /u01/app/oracle/oradata/clonedb/CLONEDB/onlinelog/o1_mf_3_cfhv4q47_.log /u01/app/oracle/fast_recovery_area/CLONEDB/onlinelog/o1_mf_3_cfhv4q8m_.log /u01/app/oracle/oradata/clonedb/CLONEDB/onlinelog/o1_mf_2_cfhv4ojk_.log /u01/app/oracle/fast_recovery_area/CLONEDB/onlinelog/o1_mf_2_cfhv4on2_.log /u01/app/oracle/oradata/clonedb/CLONEDB/onlinelog/o1_mf_1_cfhv4mfx_.log /u01/app/oracle/fast_recovery_area/CLONEDB/onlinelog/o1_mf_1_cfhv4mld_.log 6 rows selected. SQL> archive log list; Database log mode Archive Mode Automatic archival Enabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 1 Next log sequence to archive 2 Current log sequence 2 SQL> connect sys/oracle@192.168.56.100:1521/pdb1 as sysdba Connected. SQL> connect sys/oracle@clonedb as sysdba Connected. SQL> select name,open_mode from v$pdbs; NAME OPEN_MODE ------------------------------ ----------------- PDB$SEED READ ONLY PDB1 READ ONLY PDB2 READ WRITE PDB1_TM1 READ ONLY Login to Test Master Database of Pluggable Database (pdb1_tm1) and check the container ID and Container Name. SQL> alter session set container=pdb1_tm1; Session altered. SQL> connect sys/oracle@192.168.56.100:1521/pdb1_tm1 as sysdba Connected. SQL> show con_name CON_NAME ----------------- PDB1_TM1 SQL> show con_id CON_ID ----------------- 5 To preserve a PDB’s open mode across CDB restarts set the option: SAVE STATE SQL> alter pluggable database pdb1_tm1 save state; Pluggable database altered. SQL> connect sys/oracle@192.168.56.100:1521/clonedb as sysdba Connected. SQL> alter pluggable database pdb1 save state; Pluggable database altered. SQL> alter pluggable database pdb2 save state; Pluggable database altered. SQL> alter pluggable database pdb1_tm1 save state; Pluggable database altered. SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> connect sys/oracle as sysdba Connected to an idle instance. SQL> startup; ORACLE instance started. Total System Global Area 3154116608 bytes Fixed Size 2929352 bytes Variable Size 671092024 bytes Database Buffers 2466250752 bytes Redo Buffers 13844480 bytes Database mounted. Database opened. Check the status of all pluggable database including Test Master Pluggable Database (PDB1_TM1) SQL> select name,open_mode from v$pdbs; NAME OPEN_MODE ------------------------------ ------------------- PDB$SEED READ ONLY PDB1 READ ONLY PDB2 READ WRITE PDB1_TM1 READ ONLY Summary Oracle Enterprise Manager Cloud Control 13c also provides Increasing quality of Service, Enabling faster deployments in critical environments, Providing Resource Elasticity and Rapid Provisioning for mission critical applications.
↧