This page provides information on how Dbvisit StandbyMP synchronizes Pluggable Databases (PDBs) from Primary database to standby database.
1. Introduction and Concept
Oracle SE2 Supports up to three pluggable database in 19c SE2 and only one PDB in prior versions. Dbvisit Alyways synchronizes the standby database on CDB level, so any change done in PDB is automatically reflected on standby.
Dbvisit StandbyMP also automatically synchronizes newly added PDBs on primary to the standby. This feature is by default enabled and is defined by three DDC parameters with following default values:
PDB_SYNC = Y BCKDIR = [DBVISIT_BASE]/standbymp/oracle/backup BCKDIR_DR = [DBVISIT_BASE]/standbymp/oracle/backup
Synchronization of newly added PDB (regardless whether it’s created as clone from another PDB, clone from PDB$SEED or plugged-in) is done in several steps:
detection that new PDB was added on primary database (if PDB_SYNC = Y)
backup of newly added PDB on primary database is done according to BCKDIR DDC parameter
transfer of PDB backup to standby database is done according to BCKDIR_DR DDC parameter
restore of PDB backup on standby database
The automatic standby update (ASU) is enabled and running during all those steps and all those steps are done automatically without user intervention.
For further explanation and how to change these parameters refer to:
2. Automatic PDB Synchronization Process
If your DDC parameter PDB_SYNC is set to Y value (default), then any PDB added on primary wil trigger automatically the PDB sycnhronization process in the background. For the PDB sycnhronization to succeed, you must ensure that the locations of BCKDIR and BCKDIR_DR have sufficient free space for the PDB backup.
The synchronization is automatically executed on primary whenever any PDB is added, for example running on primary:
SQL> create pluggable database pdb99 from pdb2; SQL> alter system switch logfile;
Will result in automatic trigger of PDB sync task visible in the GUI:
The backup will be done on primary server to location specified in BCKDIR. The backups taken are by default compressed RMAN backup (this is driven by DDC parameter RMAN_DBF_BACKUP_TYPE).
Your standby database is still synchronized in the background by archivelogs. They are still transferred and applied. This is possible because the new PDB datafiles on standby are excluded from recovery and will be shown as missing:
SQL> select file#,error from v$datafile_header where error is not null; 163 FILE MISSING 164 FILE MISSING 165 FILE MISSING
Once the export job finished, PDB backup will be transferred to standby server to directory defined as BCKDIR_DR. Once the transfer is finished, PDB will be restored during next ASU archivelog apply job.
During the synchronization, following message will appear in log gap report:
Even if log gap report indicates 0 gap, the standby database is now inconsistent because of missing PDB datafiles.
Standby database will become consistent again only after the PDB restore finishes. The v$datafile_header will no longer contain “FILE MISSING” in the ERROR column and log gap report will no longer include the Warning message.
3. Manual PDB Synchronization Process
If parameter PDB_SYNC is set to N (non-default value) the newly added PDB on primary is not synchronized to standby. Note that the ASU transfer and appply job behavior after you add new PDB to your primary is the same as with the PDB_SYNC = Y:
To manually synchronize the PDB to standby you have to manually run the dbvctl refresh_pdb function. The function has following syntax:
dbvctl -f refresh_pdb -d <ddc> [-a guid=<comma separated list of PDB GUID>]
An example how to manually synchronize PDB to your standby:
A. Disable Automated Standby Update (ASU) Post Tasks - Automatic Standby Update (ASU)
B. Determine the PDB ID on primary:
SQL> select guid from v$pdbs where name='PDB99'; GUID -------------------------------- 2EF5B88B32425203E063E708A8C097C0
C. Make sure that your DDC parameters BCKDIR and BCKDIR_DR point to appropriate location
D. Run the refresh_pdb procedure
On primary server run the refresh_pdb providing it with GUID of the PDB you want to synchronize:
$ /usr/dbvisit/standbymp/oracle/dbvctl -d SLASH -f refresh_pdb -a guid=2EF5B88B32425203E063E708A8C097C0
Example output:
Once the export finishes, archivelog transfer and apply job will run automatically. Apply job will trigger restore job.
After the restore and apply job complete, proceed to next step
E. Enable ASU
Comments