Friday, August 4, 2017

ORA-27191: sbtinfo2 returned error

While creating the standby database from active database with

duplicate target database for standby from active database
spfile
set audit_file_dest='/u01/app/oracle/admin/dev1tstd/adump'
set db_unique_name='dev1tstd'
set fal_server='dev1tstp1','dev1tstp2'
set instance_number='1'
NOFILENAMECHECK;

I was getting the error:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 08/03/2017 10:48:17
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
ORA-27191: sbtinfo2 returned error
Additional information: 3475


Please note that I am running the duplicate database from primary database. 

The reason for this issue was simple, I had a wrong configuration setup in RMAN for primary and that was 

CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';

I had to clear it so that it starts using disk a device 

CONFIGURE DEFAULT DEVICE TYPE clear;

This fixed the issue.

ORA-17628: Oracle error 19505 returned by remote Oracle server

I am trying to rebuild dataguard for a recently refreshed database in our development environment.

While creating the duplicate database from active database using RMAN I am getting the error:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 08/03/2017 09:58:18
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 08/03/2017 09:58:18
ORA-17628: Oracle error 19505 returned by remote Oracle server

As the error says that there are some issues with the remote database and that in my case is the new DR database.

While looking at the alert logs of the DR database what I have found that I was getting the error as below:

NOTE: failed to open SPFILE +DATA/dev1tstd/parameterfile/spfiledev1tstd.ora

Reason was that $ORACLE_HOME/dbs already had an initdev1tstd1.ora file which stores spfile location and that was going to +DATA/dev1tstd/parameterfile/spfiledev1tstd.ora . After the refresh of primary database what I did was rm -rf +DATA/dev1tstd and rm -rf +FRA/dev1tstd which wiped the spfile.

To fix it I just had to rename the initdev1tstd1.ora to initdev1tstd1.ora.old and try the duplicate command again and it fixed the issue.