Problem Description
The Oracle DTC restore is failing with the following error: ORA-28365: wallet is not open
Cause
During the restore process, the recovery operation cannot proceed because the wallet is not open. This happens when the wallet location is either not correctly defined or not accessible to the RMAN process on the destination server.
Traceback
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 03/26/2024 10:30:57
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement:
alter database recover logfile '+FRA/crih/1_32219_990986691.dbf'
ORA-00283: recovery session canceled due to errors
ORA-28365: wallet is not open
Resolution
By default, RMAN retrieves the wallet from the location specified in the sqlnet.ora file. However, during the restore process, the sqlnet.ora file is not updated automatically on the destination server. You must manually configure the wallet location in the sqlnet.ora file.
Follow the steps below to resolve the issue:
Verify the Default Wallet Location
The wallet is usually downloaded to the default location on the destination server:
$ORACLE_BASE/admin/<DB_NAME>/wallet
Check for Wallet Files
Ensure the necessary wallet files (
cwallet.sso
andewallet.p12
) have been downloaded to the destination server.Run the following command:
ls -l /u01/app/oracle/admin/ORCL/wallet
Expected Output:
total 16
-rw------- 1 oracle oinstall 5243 Dec 1 10:00 cwallet.sso
-rw------- 1 oracle oinstall 6174 Dec 1 10:00 ewallet.p12
Verify the sqlnet.ora File
The sqlnet.ora file should include the wallet location. By default, this file is located at:
$ORACLE_HOME/network/admin/sqlnet.ora
cat $ORACLE_HOME/network/admin/sqlnet.oraEnsure it contains the following parameters:
ENCRYPTION_WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = /u01/app/oracle/admin/ORCL/wallet)
)
)
Validate the Wallet Location
Confirm that the DIRECTORY field matches the actual wallet folder path on the destination server.
Create the
sqlnet.ora
File (If Missing)If the sqlnet.ora file is not present, create it in the default location (
$ORACLE_HOME/network/admin/
) with the above content.
Ensure Correct Permissions
Verify that the wallet folder and files are owned by the correct user and group (
oracle:oinstall
), and the permissions are set securely.Run the following command:
ls -l /u01/app/oracle/admin/ORCL/wallet
Expected Output:
-rw------- 1 oracle oinstall 5243 Dec 1 10:00 cwallet.sso
-rw------- 1 oracle oinstall 6174 Dec 1 10:00 ewallet.p12To fix ownership and permissions, run:
chown -R oracle:oinstall /u01/app/oracle/admin/ORCL/wallet
The directory
/u01/app/oracle/admin/ORCL/wallet
and all files/subdirectories within it will be owned by the oracle user and assigned to the oinstall group.
chmod -R 700 /u01/app/oracle/admin/ORCL/wallet
Allowing
700
permissions will ensure the owner of the directory will have read, write, and execute permissions recursively under /wallet folder , which is the oracle user in this example.
Retry the Restore
After making the changes:
Retry the restore process by unchecking the "Restore Wallet Files" option in the restore settings.
This ensures RMAN uses the existing wallet files since they were successfully downloaded during the initial restore attempt.
Note
The wallet location and parameters in this guide use default paths. Customer environment has custom configurations, consult the customers Oracle DBA team for assistance.