Pricey All,
On this submit i’m going to share easy methods to preform PDB clone from Distant PDB .
Create clones of your PDB throughout the similar DB (Container Database) in a
DB System. This operation is called native cloning.
>>> OCI console stage we are able to do that .
Create clones of your PDB to a distinct database (Container Database)
of a distinct DB system. This operation is called distant cloning.
>>> OCI console stage we can’t carry out the distant clone .
————————————————
Supply DB : PRODDB ( distant ) ( ex: pdb , pdb1 )
TARGET DB : TESTDB ( native ) ( ex: pdb )
Supply DB system identify : PRODDB01
Vacation spot DB system identify: TESTDB01
Supply PDB identify : PDB1 ( PRODDB )
Clone PDB identify : CLONE_PDB2 ( TESTDB )
Vacation spot db needs to be archive log mode enabled and native undo enabled needs to be true.
Step1 : Supply Database preparation ( PRODDB)
> create consumer in CDB$ROOT and grant the create session and create pluggable database position.
> create some take a look at information on pdb1.
/u01/app/oracle/product/19.0.0/db_home/rdbms/admin/utlsampl.sql
CREATE USER c##clone IDENTIFIED BY Welcome_123 CONTAINER=ALL;
GRANT CREATE SESSION, CREATE PLUGGABLE DATABASE TO c##clone CONTAINER=ALL;
Step 2 :: Put together the vacation spot database ( TESTDB )
> local_undo_enabled needs to be true
> archive log mode needs to be enabled
> replace the supply db tnsnames.ora entry on this db.
> create the db_link on this server ( TESTDB) utilizing supply db consumer ( PRODDB).
> take a look at the db hyperlink
choose property_name,property_value from database_properties the place property_name=”LOCAL_UNDO_ENABLED”;
archive log listing;
bounce the listener to replace the modifications ..
take a look at the connection for Distant db from Native db ..
> create a db hyperlink in your vacation spot db ( TESTDB ) to pointing to the supply db ( PRODDB)
CREATE PUBLIC DATABASE LINK clone_pdb_dblink CONNECT TO c##clone recognized by Welcome_123 utilizing ‘PRODDB’;
observe : Examine if the connectivity by means of database hyperlink works positive on vacation spot CDB. As we’re not utilizing the database hyperlink with the identical identify because the database it connects to, we have to moreover set the global_names parameter to false. Else, you’ll encounter ORA-02085 error.
alter session set global_names=false;
choose * from twin@clone_pdb_dblink;
Step3 : Report PDB clone exercise
> create distant pdb ( PRODDB) to native pdb( testdb)
> begin the newly cloned pdb.
> do the sanity verify which we have now created some dummy information verify that was there or not.
Create a New PDB within the Native DB by cloning the Distant PDB.
Right here we have to verify with FILE_NAME_CONVERT parameter for
file identify conversions as a result of we’re not utilizing OMF (Oracle Managed Recordsdata).
create pluggable database CLONE_PDB1 from pdb1@clone_pdb_dblink file_name_convert=(‘/u01/app/oracle/oradata/PRODDB/pdb1′,’/u01/app/oracle/oradata/TESTDB/clone_pdb1’);
alter pluggable database CLONE_PDB1 open
Thanks,
Srini