ORA-19913: unable to decrypt backup – solution

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarANKUSH THAVALI
  • 02 Nov, 2021
  • 0 Comments
  • 1 Min Read

ORA-19913: unable to decrypt backup – solution

ORA-19913: UNABLE TO DECRYPT BACKUP – SOLUTION

While restoring database, I received below error.

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 11/11/2019 04:53:47
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
ORA-19870: error while restoring backup piece /u02/work/038_08-Nov-2019_Gouranga_arisg51d_refresh/rman/arisg51p_03-Nov-2019_13-39-15_full_cf.bkp
ORA-19913: unable to decrypt backup

From verification found, this backup was taken with encryption enabled database and there is wallet configure also.

So while you restore, then start the database in ‘nomount’ state and see the below status. If it is closed, then you can’t restore. So follow the below steps to start restore database.

— start in nmount

[oracle@example01 ~]$ sqlplus / as sysdba

SQL> select status from v$encryption_wallet;

STATUS
————————————————————————
CLOSED

SQL> quit

status must be ‘open’

— fix/ Solution

copy the wallets files and configure in sqlnet.ora also, then verify the status

e.g.,

coped below wallet files to your location something like this: /u01/app/oracle/admin//wallet Then, point your wallet in ‘sqlnet.ora’ file.

$ cd $ORACLE_HOME/network/admin
$ cat sqlnet.ora
ENCRYPTION_WALLET_LOCATION =
(SOURCE = (METHOD = FILE)
(METHOD_DATA = (DIRECTORY = /u01/app/oracle/admin/$ORACLE_UNQNAME/wallet)
)
)

SQL> select status from v$encryption_wallet;

STATUS
————————————————-
OPEN

But ensure, to enable encryption while restore the database like what is enabled during backup.

e.g.,

CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM ‘AES128’; # default

— Encryption enabled with key AES256

RMAN> CONFIGURE ENCRYPTION FOR DATABASE ON;

new RMAN configuration parameters:
CONFIGURE ENCRYPTION FOR DATABASE ON;
new RMAN configuration parameters are successfully stored

RMAN> CONFIGURE ENCRYPTION ALGORITHM ‘AES256’;

new RMAN configuration parameters:
CONFIGURE ENCRYPTION ALGORITHM ‘AES256’;
new RMAN configuration parameters are successfully stored

Note that you can enable the encryption only after restoring the controlfile.