Experience: is what you get soon after you need it.

Experience: is what you get soon after you need it.

Rasul Allah (sal Allahu alaihi wa sallam) said: "Restore the trusts of those who trust you, and deal not falsely with him who deals falsely with you." [Abu Dawud, Tirmidhi]

Search This Blog

Wednesday, November 22, 2017

ORA-19913: unable to decrypt backup

In Oracle Cloud or in 12c using secure backup you will encounter the below error while restore/recovery process..

ORA-19913: unable to decrypt backup

channel ORA_AUX_SBT_TAPE_1: restoring SPFILE
output file name=/u01/app/oracle/product/12.2.0/dbhome_1/dbs/spfileERPPRDSTBY.ora
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 11/21/2017 19:35:48
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
ORA-19849: error while reading backup piece from service erpprd
ORA-19913: unable to decrypt backup
ORA-19660: some files in the backup set could not be verified
ORA-19685: SPFILE could not be verified
ORA-19849: error while reading backup piece from service erpprd
ORA-19913: unable to decrypt backup



RMAN> show ENCRYPTION FOR DATABASE;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name ERPPRD are:
CONFIGURE ENCRYPTION FOR DATABASE ON;

RMAN>


RMAN> show ENCRYPTION ALGORITHM;

RMAN configuration parameters for database with db_unique_name ERPPRD are:
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default


Fix:
Either  disable the encryption or set a password or use a wallet

Below I will set a password  for backup and use the same password for decryption.

RMAN>set encryption on identified by 'welcome1';
RMAN> backup database plus archivelog all;


During restore/recovery:

RMAN>set decryption password 'welcome1';
RMAN>restore database ...




Warning: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE has been deprecated

In 12c using cuurent logfile is deprecated and if you issue the below command:

ALTER DATABASE RECOVER  managed standby database using current logfile disconnect

You will notice the below warning in the alert log file.

Warning: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE has been deprecated




Instead of using the current log file, use below command.

SQL> alter database recover managed standby database disconnect nodelay;

Friday, November 3, 2017

Using dbaascli in - Oracle Cloud



[root@ERPDEV dbaascli]# ./dbaascli list
DBAAS CLI version 1.0.0


DBAAS>


Very Long Text, press q to quit
Available commands:
 cloud sync
 database bounce
 database changepassword
 database start
 database status
 database stop
 dataguard failover
 dataguard reinstate
 dataguard status
 dataguard switchover
 dbpatchm
 dv off
 dv off cdb
 dv off pdb
 dv on
 dv on cdb
 dv on pdb
 elogger list
 gg setup
 gg status
 glassfish start
 glassfish status
 glassfish stop
 listener bounce
 listener start
 listener status
 listener stop
 mrec
 netsec config
 netsec config encryption
 netsec config integrity
 netsec deconfig
 netsec deconfig encryption
 netsec deconfig integrity
 netsec status
 netsec status encryption
 netsec status integrity
 ore setup
 ore status
 orec
 sampleschema create
 sampleschema drop
 tde config
 tde deconfig
 tde rotate
 tde rotate masterkey
 tde status
 tfa install
 tfa uninstall





[root@ERPDEV dbaascli]# ./dbaascli list
DBAAS CLI version 1.0.0


DBAAS>
[root@ERPDEV dbaascli]# ./dbaascli database status
DBAAS CLI version 1.0.0
Executing command database status
Database Status:
Database is open
Database name: ERPDEV

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
PL/SQL Release 12.1.0.2.0 - Production
CORE    12.1.0.2.0      Production
TNS for Linux: Version 12.1.0.2.0 - Production
NLSRTL Version 12.1.0.2.0 - Production


[root@ERPDEV dbaascli]# ./dbaascli database stop
DBAAS CLI version 1.0.0
Executing command database stop
Database stopped in immediate


[root@ERPDEV dbaascli]# ps -ef| grep smon
root     21779 19335  0 09:47 pts/0    00:00:00 grep smon



[root@ERPDEV dbaascli]# ./dbaascli database start
DBAAS CLI version 1.0.0
Executing command database start
Database started


[root@ERPDEV dbaascli]# ps -ef| grep smon
oracle   22231     1  0 09:48 ?        00:00:00 ora_smon_ERPDEV
oracle   22346     1  0 09:48 ?        00:00:00 /usr/bin/perl /var/opt/oracle/misc/dbcsmonitor.pl /var/opt/oracle/tfa/erpdev/tfa_home /var/opt/oracle/tfa/repository/suptools/erpdev/dbcsmon /var/opt/oracle/tfa/repository/suptools/erpdev/dbcsmon/oracle
root     22948 19335  0 09:49 pts/0    00:00:00 grep smon


[root@ERPDEV dbaascli]# ./dbaascli database status
DBAAS CLI version 1.0.0
Executing command database status
Database Status:
Database is open
Database name: ERPDEV

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
PL/SQL Release 12.1.0.2.0 - Production
CORE    12.1.0.2.0      Production
TNS for Linux: Version 12.1.0.2.0 - Production
NLSRTL Version 12.1.0.2.0 - Production



[root@ERPDEV dbaascli]# ./dbaascli database bounce
DBAAS CLI version 1.0.0
Executing command database bounce
Database stopped in immediate
Database started


[root@ERPDEV dbaascli]# ./dbaascli database status
DBAAS CLI version 1.0.0
Executing command database status
Database Status:
Database is open
Database name: ERPDEV

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
PL/SQL Release 12.1.0.2.0 - Production
CORE    12.1.0.2.0      Production
TNS for Linux: Version 12.1.0.2.0 - Production
NLSRTL Version 12.1.0.2.0 - Production



[root@ERPDEV dbaascli]# ./dbaascli listener status
DBAAS CLI version 1.0.0
Executing command listener status
Starting listener

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 02-NOV-2017 09:55:26

Copyright (c) 1991, 2017, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ERPDEV.compute-586447955.oraclecloud.internal)(PORT=1623)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date                01-NOV-2017 11:26:55
Uptime                    0 days 22 hr. 28 min. 30 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/ERPDEV/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ERPDEV.compute-586447955.oraclecloud.internal)(PORT=1623)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1623)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=ERPDEV.compute-586447955.oraclecloud.internal)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/ERPDEV/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "ERPDEV.586447955.oraclecloud.internal" has 1 instance(s).
  Instance "ERPDEV", status READY, has 1 handler(s) for this service...
Service "ERPDEV.586447955.oraclecloud.internalXDB" has 1 instance(s).
  Instance "ERPDEV", status READY, has 1 handler(s) for this service...
Service "demos.586447955.oraclecloud.internal" has 1 instance(s).
  Instance "ERPDEV", status READY, has 1 handler(s) for this service...
Service "erpdevpdb1.586447955.oraclecloud.internal" has 1 instance(s).
  Instance "ERPDEV", status READY, has 1 handler(s) for this service...
The command completed successfully

[root@ERPDEV dbaascli]#


[root@ERPDEV dbaascli]# ./dbaascli netsec status
DBAAS CLI version 1.0.0
Executing command netsec status

Displaying configuration for network encryption:

server encryption status: [enabled]
type    = required
methods = AES256,AES192,AES128

client encryption status: [disabled]

Displaying configuration for network integrity:

server integrity status: [enabled]
checksum_level = required
methods        = SHA1

client integrity status: [disabled]





[root@ERPDEV dbaascli]# ./dbaascli  sampleschema create
DBAAS CLI version 1.0.0
Executing command sampleschema create
Enter SYSTEM password
Enter SYS password
Enter HR password
Enter OE password
Enter PM password
Enter IX password
Enter SH password
Enter BI password
Enter default tablespace users
Enter temporary tablespace temp
Log location /var/opt/oracle/log/sampleschema/