Oracle 18c-Creating a Point-in-Time Clone of a PDB Snapshot
Description:-
- In this article we are going to see Creating a Point-in-Time Clone of a PDB Snapshot.
- Oracle Database 18c brings an excellent functionality which can be clearly used to create new non-productive environments based on a point in time of our production PDB, as well as having an immediate restoration point in front of a massive load, a pass to important production or other activity that could affect our productive system.
Oracle 18c-PDB Snapshot Carousel Here
Let’s start the Demo:-
Step1:-Login in to PDB2 pluggable database
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
———- —————————— ———- ———-
2 PDB$SEED READ ONLY NO
3 PDB2 MOUNTED
4 PDB1 READ WRITE NO
SQL> alter pluggable database pdb2 open;
Pluggable database altered.
SQL> alter session set container=pdb2;
Session altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
———- —————————— ———- ———-
3 PDB2 READ WRITE NO
Step2:-For the Demo purpose i created table in PDB2 database
Step3:-Going to take snapshot of pdb2 database.
ALTER PLUGGABLE DATABASE SNAPSHOT test_pdb2_mondayload;
SET LINESIZE 150
COL CON_NAME FORMAT a10
COL SNAPSHOT_NAME FORMAT a25
COL SNAP_SCN FORMAT 9999999
COL FULL_SNAPSHOT_PATH FORMAT a45
SELECT CON_ID, CON_NAME, SNAPSHOT_NAME,SNAPSHOT_SCN AS snap_scn, FULL_SNAPSHOT_PATH
FROM DBA_PDB_SNAPSHOTS ORDER BY SNAP_SCN;
Note:- Assume that today Wednesday,Development team asking we need Monday snapshot data. using below method we will create separate DB using the snapshot “TEST_PDB2_MONDAYLOAD”
Step4:-Login in to CDB Database
SQL> conn /as sysdba
Connected.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
———- —————————— ———- ———-
2 PDB$SEED READ ONLY NO
3 PDB2 READ WRITE NO
4 PDB1 READ WRITE NO
Step5:-Creating a Point-in-Time Clone of a PDB Snapshot
CREATE PLUGGABLE DATABASE pdb2_copy FROM pdb2 USING SNAPSHOT TEST_PDB2_MONDAYLOAD;
Step6:-Crosscheck Monday data.
successfully completed the Cloned using PDB snapshot
Catch Me On:- Hariprasath Rajaram
LinkedIn: https://www.linkedin.com/in/hari-prasath-aa65bb19/
Facebook: https://www.facebook.com/HariPrasathdba
FB Group: https://www.facebook.com/groups/894402327369506/
FB Page: https://www.facebook.com/dbahariprasath/?
Twitter: https://twitter.com/hariprasathdba