I was cloning a PDB from another PDB when I faced this error:
SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED 2 PDB$SEED READ ONLY NO 3 TECH01 READ WRITE NO SQL> select file_name from cdb_data_files; FILE_NAME /u01/app/oracle/oradata/TECHCDB/system01.dbf /u01/app/oracle/oradata/TECHCDB/sysaux01.dbf /u01/app/oracle/oradata/TECHCDB/undotbs01.dbf /u01/app/oracle/oradata/TECHCDB/users01.dbf /u01/app/oracle/oradata/TECHCDB/TECH01/pdbseed/system01.dbf /u01/app/oracle/oradata/TECHCDB/TECH01/pdbseed/sysaux01.dbf /u01/app/oracle/oradata/TECHCDB/TECH01/ts_tde.dbf /u01/app/oracle/oradata/TECHCDB/TECH01/TS_16K.DBF /u01/app/oracle/oradata/TECHCDB/TECH01/USERSDB1.DBF 9 rows selected. SQL>!mkdir /u01/app/oracle/oradata/TECHCDB/TECH02 SQL>!ls -ld /u01/app/oracle/oradata/TECHCDB/TECH02 drwxrwxr-x 2 oracle oracle 4096 Jan 30 12:37 /u01/app/oracle/oradata/TECHCDB/TECH02 SQL> !ls -ltr /u01/app/oracle/oradata/TECHCDB/TECH02 total 0 SQL>show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED 2 PDB$SEED READ ONLY NO 3 TECH01 READ WRITE NO SQL> alter pluggable database TECH01 close; Pluggable database altered. SQL>alter pluggable database TECH01 open read only; Pluggable database altered. SQL>create pluggable database TECH02 from TECH01 FILE_NAME_CONVERT = ('/u01/app/oracle/oradata/TECHCDB/TECH01/','/u01/app/oracle/oradata/TECHCDB/TECH02'); Pluggable database created. SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED 2 PDB$SEED READ ONLY NO 3 TECH01 READ ONLY NO 4 TECH02 MOUNTED SQL> alter pluggable database TECH02 open; Warning: PDB altered with errors. SQL> show errors No errors. SQL>show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED 2 PDB$SEED READ ONLY NO 3 TECH01 READ WRITE NO 4 TECH02 READ WRITE YES SQL> alter pluggable database TECH02 close; Pluggable database altered. SQL>alter pluggable database TECH02 open read write; Warning: PDB altered with errors. SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED 2 PDB$SEED READ ONLY NO 3 TECH01 READ WRITE NO 4 TECH02 READ WRITE YES
Then I was wondering what shall I do now once the command is “show errors” but replied “No errors.”, and it didn’t give any clear message that was different from “Warning: PDB altered with errors.”. I came to a realization after doing some research and I found that the view pdb_plug_in_violations and found out the reason of the warning and it was because my database has Transparent Data Encryption configured and was missing the keys from the source database as showed below:
SQL> select message,time from pdb_plug_in_violations; MESSAGE< TIME PDB needs to import keys from source. 30-JAN-20 12.47.01.691154 PM SQL> select * from v$encryption_wallet; WRL_TYPE WRL_PARAMETER STATUS WALLET_TYPE WALLET_OR FULLY_BAC CON_ID FILE /u01/app/oracle/admin/TECHCDB/wallet NOT_AVAILABLE UNKNOWN SINGLE UNDEFINED 0
So I have copied the keys from the source and I have solved my problem. I hope that when you face any warning with your PDB you can use this to help you track the possible problems in your database.
Hi! I am Bruno, a Brazilian born and bred, and I am also a naturalized Swedish citizen. I am a former Oracle ACE and, to keep up with academic research, I am a Computer Scientist with an MSc in Data Science and another MSc in Software Engineering. I have over ten years of experience working with companies such as IBM, Epico Tech, and Playtech across three different countries (Brazil, Hungary, and Sweden), and I have joined projects remotely in many others. I am super excited to share my interests in Databases, Cybersecurity, Cloud, Data Science, Data Engineering, Big Data, AI, Programming, Software Engineering, and data in general.
(Continue reading)