1 Reply Latest reply on Apr 11, 2014 2:16 PM by Harm Joris ten Napel-Oracle

    ORA-28362: master key not found

    User356375

      Hi,

       

      I trying to create wallet on our 12C database but getting below error.

       

      DB : 12C OS : Linux 6

       

      [oracle@wls033 wallet]$ sqlplus "/as syskm"

       

       

      SQL*Plus: Release 12.1.0.1.0 Production on Fri Apr 11 07:43:43 2014

       

       

      Copyright (c) 1982, 2013, Oracle.  All rights reserved.

       

       

       

       

      Connected to:

      Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production

      With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics

      and Real Application Testing options

       

       

      SQL> show user

      USER is "SYSKM"

      SQL> select * from v$encryption_wallet;

       

       

      WRL_TYPE

      --------------------

      WRL_PARAMETER

      --------------------------------------------------------------------------------

      STATUS                         WALLET_TYPE          WALLET_OR FULLY_BAC

      ------------------------------ -------------------- --------- ---------

          CON_ID

      ----------

      FILE

      /u01/app/oracle/12.1.0/wallet

      NOT_AVAILABLE                  UNKNOWN              SINGLE    UNDEFINED

               0

       

       

       

       

      SQL> ADMINISTER KEY MANAGEMENT CREATE KEYSTORE '/u01/app/oracle/12.1.0/wallet' IDENTIFIED BY password;

       

       

      keystore altered.

       

       

      SQL> select * from v$encryption_wallet;

       

       

      WRL_TYPE

      --------------------

      WRL_PARAMETER

      --------------------------------------------------------------------------------

      STATUS                         WALLET_TYPE          WALLET_OR FULLY_BAC

      ------------------------------ -------------------- --------- ---------

          CON_ID

      ----------

      FILE

      /u01/app/oracle/12.1.0/wallet

      CLOSED                         UNKNOWN              SINGLE    UNDEFINED

               0

       

       

       

       

      SQL> ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY password;

       

       

      keystore altered.

       

       

      SQL> select * from v$encryption_wallet;

       

       

      WRL_TYPE

      --------------------

      WRL_PARAMETER

      --------------------------------------------------------------------------------

      STATUS                         WALLET_TYPE          WALLET_OR FULLY_BAC

      ------------------------------ -------------------- --------- ---------

          CON_ID

      ----------

      FILE

      /u01/app/oracle/12.1.0/wallet

      OPEN_NO_MASTER_KEY             PASSWORD             SINGLE    UNDEFINED

               0

       

       

       

       

      SQL> ADMINISTER KEY MANAGEMENT SET ENCRYPTION KEY IDENTIFIED BY password WITH BACKUP USING 'password key backup';

      ADMINISTER KEY MANAGEMENT SET ENCRYPTION KEY IDENTIFIED BY password WITH BACKUP USING 'password key backup'

      *

      ERROR at line 1:

      ORA-28362: master key not found

       

       

       

       

      SQL> select * from v$encryption_wallet;

       

       

      WRL_TYPE

      --------------------

      WRL_PARAMETER

      --------------------------------------------------------------------------------

      STATUS                         WALLET_TYPE          WALLET_OR FULLY_BAC

      ------------------------------ -------------------- --------- ---------

          CON_ID

      ----------

      FILE

      /u01/app/oracle/12.1.0/wallet

      CLOSED                         UNKNOWN              SINGLE    UNDEFINED

               0

       

       

       

       

      SQL>  ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY password;

       

       

      keystore altered.

       

       

      SQL> ADMINISTER KEY MANAGEMENT SET KEY IDENTIFIED BY password WITH BACKUP USING 'emp_key_backup';

      ADMINISTER KEY MANAGEMENT SET KEY IDENTIFIED BY password WITH BACKUP USING 'emp_key_backup'

      *

      ERROR at line 1:

      ORA-28362: master key not found

       

      SQLNET.ORA

       

      [oracle@wls033 admin]$ cat sqlnet.ora

      # sqlnet.ora Network Configuration File: /u01/app/oracle/12.1.0/network/admin/sqlnet.ora

      # Generated by Oracle configuration tools.

       

       

      ENCRYPTION_WALLET_LOCATION =

        (SOURCE =

          (METHOD = file)

          (METHOD_DATA =

            (DIRECTORY =/u01/app/oracle/12.1.0/wallet)

          )

        )

        • 1. Re: ORA-28362: master key not found
          Harm Joris ten Napel-Oracle

          hi

           

          I will need to read up on the new keystore management SQL in version 12, however to create a wallet for the first time the 11g syntax should still be sufficient:

           

          alter system set encryption key identified by "<wallet_password>";

           

          (when issued a second time it will rekey the MK and upgrade the wallet after a migration)

           

          Please list the contents of directory /u01/app/oracle/12.1.0/wallet , to list the wallet contents use: mkstore -wrl /u01/app/oracle/12.1.0/wallet -list

           

          greetings,

           

          Harm ten Napel