Creating a clone of a remote pluggable database across a database link can be a powerful tool for managing and replicating data across Oracle databases. However, this process isn’t immune to challenges. One such obstacle is the occurrence of ORA-00283 and ORA-28374 errors during cloning. In this blog, we’ll delve into the root causes of these errors and provide a step-by-step guide to resolving them effectively.
The ORA-00283 error (“recovery session canceled due to errors”) and the ORA-28374 error (“typed master key not found in wallet”) can be encountered when attempting to clone a remote pluggable database across a database link. These errors indicate issues in the recovery and encryption processes, respectively, and can disrupt the cloning procedure.
In this particular case, the following error was encountered on our target CDB
SQL> create pluggable database pdb_seed_p15 from pdbcln@pdb_seed.rem keystore identified by "Jambolaya$%";
create pluggable database pdb_seed_p15 from pdbcln@pdb_seed.rem keystore identified by "Jambolaya$%"
*
ERROR at line 1:
ORA-00283: recovery session canceled due to errors
ORA-28374: typed master key not found in wallet
Analyzing the Problem: When you encounter the ORA-00283 and ORA-28374 errors, it’s crucial to assess the situation. Begin by understanding the database status and configuration:
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
5 PDBCLN READ WRITE NO
Correcting the Database Mode: To address the incorrect mode issue, follow these steps on the source CDB:
SQL> alter pluggable database PDBCLN close immediate instances=all;
Pluggable database altered.
SQL>
SQL> alter pluggable database PDBCLN OPEN READ ONLY instances=all;
Pluggable database altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDBCLN READ ONLY NO
SQL>
These actions ensure that the PDB is correctly set to “READ ONLY” mode for cloning.
Moving back to the target CDB, you can proceed with creating the clone using a command similar to the following:
CREATE PLUGGABLE DATABASE PDB_SEED_P15
FROM pdbcln@pdb_seed.rem
KEYSTORE IDENTIFIED BY "Jambolaya$%";
This command creates a new PDB named PDB_SEED_P15
based on the target CDB from the remote PDB named PDBCLN
and specifies the necessary keystore for encryption.
After the cloning process, you need to ensure the successful creation and opening of the cloned PDB:
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ WRITE NO
3 PDB_SEED_P15 MOUNTED
SQL> alter pluggable database PDB_SEED_P15 open instances=all;
Pluggable database altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ WRITE NO
3 PDB_SEED_P15 READ WRITE NO
SQL>
The process of creating a clone of a remote pluggable database across a database link can be accompanied by challenges, as evidenced by the ORA-00283 and ORA-28374 errors. By understanding the reasons behind these errors and following the outlined steps, you can systematically diagnose and resolve the issues, ensuring a smooth and successful cloning procedure. Remember that a comprehensive understanding of Oracle database concepts and meticulous execution of the provided steps are essential for overcoming such hurdles. With the insights gained from this guide, you’ll be better equipped to manage remote pluggable database cloning while minimizing disruptions.