Linux – Oracle 11g TDE wallet autologin

linuxoracleoracle-11g-r2transparent-data-encryption

I have setup Oracle TDE for my 11.2.0.4 database. I created the wallet. I created the autologin wallet and everything looked good.

{ORACLE_HOME}/bin/orapki wallet create -wallet cwallet.sso -auto_login -pwd password
Oracle PKI Tool : Version 11.2.0.4.0 - Production
Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.

The encryption wallet itself was open:

SQL> select STATUS  FROM V$ENCRYPTION_WALLET;

STATUS
------------------
OPEN

But after I restarted the database the wallet status showed closed and I had to manually open it. So my autologin did not work.

SQL> select STATUS  FROM V$ENCRYPTION_WALLET;

STATUS
------------------
CLOSED

Can anyone explain what could be the problem or what am I missing here? Thanks.

Best Answer

Without knowing what exactly you did, all I can say is it should work, but if you use Grid Infrastructure, you may need some additional configuration.

ORA-28365: wallet is not open when starting database with srvctl or crsctl when TDE is enabled (Doc ID 2711068.1)

One more thing, in the -wallet parameter we specify a directory usually, and not cwallet.sso, which will be generated automatically.

Below just works:

SQL> select * from v$encryption_wallet;

WRL_TYPE             WRL_PARAMETER                                      STATUS
-------------------- -------------------------------------------------- ------------------
file                 /u01/app/oracle/admin/$ORACLE_SID/wallet           CLOSED

SQL> !orapki wallet create -wallet /u01/app/oracle/admin/$ORACLE_SID/wallet -auto_login -pwd Oracle.123
Oracle PKI Tool : Version 11.2.0.4.0 - Production
Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.


SQL> select * from v$encryption_wallet;

WRL_TYPE             WRL_PARAMETER                                      STATUS
-------------------- -------------------------------------------------- ------------------
file                 /u01/app/oracle/admin/$ORACLE_SID/wallet           OPEN_NO_MASTER_KEY

SQL> shu immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 2137886720 bytes
Fixed Size                  2254952 bytes
Variable Size             536872856 bytes
Database Buffers         1593835520 bytes
Redo Buffers                4923392 bytes
Database mounted.
Database opened.
SQL> select * from v$encryption_wallet;

WRL_TYPE             WRL_PARAMETER                                      STATUS
-------------------- -------------------------------------------------- ------------------
file                 /u01/app/oracle/admin/$ORACLE_SID/wallet           OPEN_NO_MASTER_KEY