Skip to content

How to Resolve ORA-46659: master keys for the given PDB not found

ORA-46659

Saw ORA-46659 when I tried to clone a PDB with TDE remotely through a database link.

SQL> create pluggable database ERPAPP_CLONE from ERPAPP@erpapp_link storage unlimited tempfile reuse file_name_convert=('ERPAPP','ERPAPP_CLONE') keystore identified by "welcome1" parallel 16;
create pluggable database ERPAPP_CLONE from ERPAPP@erpapp_link storage unlimited tempfile reuse file_name_convert=('ERPAPP','ERPAPP_CLONE') keystore identified by "welcome1" parallel 16
*
ERROR at line 1:
ORA-17628: Oracle error 46659 returned by remote Oracle server
ORA-46659: master keys for the given PDB not found

ORA-46659 means that the source PDB has no master key been set, we should check all wallet statuses of the source database.

SQL> select inst_id, con_id, wallet_type, status from gv$encryption_wallet order by 1,2;

   INST_ID     CON_ID WALLET_TYPE          STATUS
---------- ---------- -------------------- ------------------------------
         1          1 AUTOLOGIN            OPEN
         1          2 AUTOLOGIN            OPEN
         1          3 AUTOLOGIN            OPEN
         1          4 AUTOLOGIN            OPEN
         2          1 AUTOLOGIN            OPEN
         2          2 AUTOLOGIN            OPEN
         2          3 AUTOLOGIN            OPEN
         2          4 AUTOLOGIN            OPEN

They look no problem at all.

Solution

So I decide to take the key to the destination as well by adding INCLUDING SHARED KEY.

SQL> create pluggable database ERPAPP_CLONE from ERPAPP@erpapp_link storage unlimited tempfile reuse file_name_convert=('ERPAPP','ERPAPP_CLONE') keystore identified by "welcome1" including shared key parallel 16;

Pluggable database created.

Is it a bug or something? I supposed that release 19.13 was a pretty decent patch level.

Leave a Reply

Your email address will not be published. Required fields are marked *