Quick Demo - Setting up PDB Refreshable Clone using DBLink

Описание к видео Quick Demo - Setting up PDB Refreshable Clone using DBLink

Hi,

In this video I will create a dblink between 2 database cloud service instances and have a pdb cloned from one cdb database to the other.
The video is around 25 minutes old but it is uneditted just to show you how long it takes to move around 26GB of data from one pdb to the other.
Both the databases are in the same network and the same subnet.
The shapes are VM.Standard2.2 which have a network bandwidth of 2Gbps
The source database has 512GB of available storage
The target database has 256GB of available storage (which limits the throughput and hence the performance of the transfer)
Moving 26GB took 462seconds

- The steps that I followed can be found below-

Source DB:
login to cdb and create a user
CREATE USER c##refresh IDENTIFIED BY WElcome_12# CONTAINER=ALL;
GRANT CREATE SESSION, CREATE PLUGGABLE DATABASE TO c##refresh CONTAINER=ALL;

Destination DB:
Make sure local_undo_enables is set to true
Local UNDO is necessary to ensure the source remains in read-write during the cloning process.
SELECT property_name, property_value FROM database_properties WHERE property_name = 'LOCAL_UNDO_ENABLED';


SSH to the target database
edit the tnsnames.ora to add the source cdb connection string
Add the source cdb to the tnsnames.ora in the target database

SOURCEDB =
(DESCRIPTION=(CONNECT_TIMEOUT=5)(TRANSPORT_CONNECT_TIMEOUT=3)(RETRY_COUNT=3)(ADDRESS_LIST=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)(HOST=hostip)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=servicename)))

Create dblink to the source dba on the target db
create public database link refresh_pdb connect to c##refresh identified by WElcome_12# using 'SOURCEDB';

Check if the dblink is working on the target db
alter session set global_names=false;
select * from dual@refresh_pdb;


show pdbs;

CREATE PLUGGABLE DATABASE pdbnameontarget FROM pdbnameonsource@dblinkname REFRESH MODE EVERY 15 MINUTES KEYSTORE IDENTIFIED BY TargetTDEWalletPassword;


-- Create the pluggable database
CREATE PLUGGABLE DATABASE clonepdb FROM ratpdb@refresh_pdb REFRESH MODE EVERY 15 MINUTES KEYSTORE IDENTIFIED BY TDEWalletPassword;

To read from db
alter pluggable database clonepdb open read only;

To refresh manually
ALTER PLUGGABLE DATABASE clonepdb CLOSE IMMEDIATE;
ALTER PLUGGABLE DATABASE clonepdb REFRESH;


Refresh modes
REFRESH MODE MANUAL;
REFRESH MODE EVERY 60 MINUTES;
REFRESH MODE NONE
-------------

Link to documentation:
https://docs.oracle.com/en/database/o...

#oracle #oci #cloud #cloudnative #iaas #paas #bulut #oci #oraclecloud #database #management

Комментарии

Информация по комментариям в разработке