Introduction
Those people who still make use of the GUI's, (puts his hand up), then this feature will be welcomed. In 12.2 we saw the introduction of refreshable PDBs. This meant you could refresh a PDB that was in read only mode. (And only ever been in read-only). The cloned DBA would be used for reporting mainly, but there are potentially other good reasons to have a clone. But prior to 23c, you needed to create the clone and refresh the DB using such SQL as listed below.
SQL> CREATE PLUGGABLE DATABASE myRefreshablePDB FROM mySourceDB@<connection string> REFRESH MODE MANUAL;
SQL> ALTER PLUGGABLE DATABASE myRefreshablePDB REFRESH;
In 23c, you can do this via the DBCA gui. You can clone and create a refreshable DB and set the refresh mode.
Benefits
Using DBCA, allows you to create response files to use in DBCA in silent mode. And thus make automation easier.
Silent Mode Options
Silent Mode Parameter | Description |
---|---|
-createAsRefreshablePDB {[TRUE][FALSE]} | Specify true to create the pluggable database as a refreshable PDB. |
-refreshMode {[AUTO][MANUAL]} | Specify the refresh mode of the pluggable database. |
-refreshInterval <time interval> | Specify the time interval in minutes to perform automatic refresh of the PDB. If no refresh interval is provided, then manual refresh is configured. |
Example DBCA Silent Install Command
./dbca -silent
-createPluggableDatabase
-createFromRemotePDB
-sourceDB MySourcePDB
-remotePDBName MyRemotePDB
-remoteDBConnString MyRemoteDBHost:1521/MyRemotePDB
-remoteDBSYSDBAUserName SYS
-remoteDBSYSDBAUserPassword <remote db sys password>
-dbLinkUsername <Remote DbLink Common User Name>
-dbLinkUserPassword <Remote DbLink Password>
-sysDBAUserName SYS
-sysDBAPassword <Source Password>
-pdbName MyRefreshPDB
-createAsRefreshablePDB true
-refreshMode auto
-refreshInterval 120
Pre-Requisites
There are some pre-requistes to abide by. These are listed below. Please check the manual, in case they change over time
The local user in the root container must have CREATE PLUGGABLE DATABASE
The remote PDB is in local undo mode.
The both PDBs are in ARCHIVELOG mode.
The common user in the remote PDB that the DB Link uses must have CREATE PLUGGABLE DATABASE and CREATE SESSION.
The both PDBs have the same options installed.
Published 14th November 2023