Skip to content

How to Resolve ORA-46669: the target keystore does not exist

  • by

ORA-46669

Tried to merge the target keystore with the source one, but it failed with ORA-46669.

SQL> administer key management merge keystore '/u01/app/oracle/product/19.0.0/db_1/admin/ORCLCDB/wallet/tde' identified by "welcome1" into existing keystore '+DATA/ORCLCDB/wallet' identified by "welcome1" with backup;
administer key management merge keystore '/u01/app/oracle/product/19.0.0/db_1/admin/ORCLCDB/wallet/tde' identified by "welcome1" into existing keystore '+DATA/ORCLCDB/wallet' identified by "welcome1" with backup
*
ERROR at line 1:
ORA-46669: the target keystore does not exist

Incorrect Target Location

ORA-46669 means that the key in the target location you specified in the statement cannot be found, you should inspect the location again.

Let's see the location we specified.

[grid@primary01 ~]$ asmcmd ls -l +DATA/ORCLCDB/wallet
Type  Redund  Striped  Time  Sys  Name
                             N    tde/

There's none. Let's drill down one more level.

[grid@primary01 ~]$ asmcmd ls -l +DATA/ORCLCDB/wallet/tde
Type       Redund  Striped  Time             Sys  Name
KEY_STORE  UNPROT  COARSE   FEB 14 14:00:00  N    ewallet.p12 => +DATA/ORCLCDB/KEY_STORE/ewallet.312.1096640881

We found the key.

Solution

So the solution is to specify the correct path of target keystore in the statement.

SQL> administer key management merge keystore '/u01/app/oracle/product/19.0.0/db_1/admin/ORCLCDB/wallet/tde' identified by "welcome1" into existing keystore '+DATA/ORCLCDB/wallet/tde' identified by "weclome1" with backup;

keystore altered.

In this case, we have learned that directly using WALLET_ROOT to specify the path in key management is not always the right way to do it.

As for incorrect source wallet location, it belongs to another error. You may see ORA-46638: merging of the two keystores failed, these errors are really related to each other.

Leave a Reply

Your email address will not be published.