ORA-07286: sksagdi: cannot obtain device information



Error:

RMAN-00571: 
==============
RMAN-00569: 
=============== 
ERROR MESSAGE STACK FOLLOWS 
===============
RMAN-00571: ========================================
RMAN-03002: failure of restore command at 04/23/2013 18:27:34
ORA-19870: error while restoring backup piece archive_3840_1_813515387
ORA-07286: sksagdi: cannot obtain device information.
Linux-x86_64 Error: 2: No such file or directory


When:

While restoring archives from veritas netbackup using rman on db server

Background:

1. Two node Oracle 11g RAC on Linux 
2. Veritas Netbackup configured on both nodes 
3. Full Back up & Archive backup Policy scheduled on Veritas
4. Veritas uses Storage Media server instead of TAPE to store RMAN backup sets
5. Veritas Backup policies calls rman scripts supplied by Veritas software binaries & modified as per DB setup
6. RMAN scripts uses multinode channel method for backup/restoration high availability 
7. RMAN creates channels to each node during full db & archive backup

Archive Backup command:

CMD_STR="
ORACLE_HOME=$ORACLE_HOME
export ORACLE_HOME
ORACLE_SID=$ORACLE_SID
export ORACLE_SID
$RMAN target $TARGET_CONNECT_STR nocatalog msglog $RMAN_LOG_FILE append << EOF
RUN {
sql 'alter system switch logfile';
# backup all archive logs
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE'  CONNECT 'sys/Oracle_123@REMCORP1' ;
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE'  CONNECT 'sys/Oracle_123@REMCORP2' ;
BACKUP
   filesperset 20
   FORMAT 'archive_%s_%p_%t'
   ARCHIVELOG ALL DELETE INPUT ;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
}
EOF
"


Archives restore command:

CMD_STR="
ORACLE_HOME=$ORACLE_HOME
export ORACLE_HOME
ORACLE_SID=$ORACLE_SID
export ORACLE_SID
$RMAN target $TARGET_CONNECT_STR nocatalog msglog $RMAN_LOG_FILE append << EOF
RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE'  CONNECT 'sys/Oracle_123@REMCORP1' ;
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE'  CONNECT 'sys/Oracle_123@REMCORP2' ;
set archivelog destination to '/dump/backup/logmnr';
restore archivelog from logseq 5948 until logseq 5949 thread 1;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
}
EOF
"

Cause:

During restoration, rman was looking out for the backup handle “archive_3840_1_813515387” which was part of backup piece /STU1/remedy-ebu-db2_1366714776_C1_F1 stored on Media server.

Below is truncated the output of list backup to identify the backup set required for particular archivelog file restoration from Backup Media server to local file system .

RMAN> List backup;

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
3759    1.08G      SBT_TAPE    00:00:29     23-APR-13
        BP Key: 3759   Status: AVAILABLE  Compressed: NO  Tag: TAG20130423T162946
        Handle: archive_3840_1_813515387   Media: /STU1/remedy-ebu-db2_1366714776_C1_F1

  List of Archived Logs in backup set 3759
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    5948    7845989896085 23-APR-13 7845991024579 23-APR-13
  1    5949    7845991024579 23-APR-13 7845991026707 23-APR-13
  2    3375    7845988715315 23-APR-13 7845991027317 23-APR-13

RMAN backup channels are created during backup which helps to restore if any of the node is down during recovery.

Due to multinode channeling during backup execution, restoration command was also formed with channels connecting to two instances.

If archivelog destination is not supplied in restore command then rman will restore the archives in ASM archive destination (or current db archive destination) by default

RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE'  CONNECT 'sys/Oracle_123@REMCORP1' ;
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE'  CONNECT 'sys/Oracle_123@REMCORP2' ;
set archivelog destination to '/dump/backup/logmnr';
restore archivelog from logseq 5948 until logseq 5949 thread 1;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
}

As we have specified set archivelog destination to '/dump/backup/logmnr';” along with channels to restore backup from media device, rman assumes that file location ‘/dump/backup/logmnr' is shared across two nodes.

And just because /dump/backup/logmnr' is not shared storage, channel is unable to find the archive location to restore the archives resulting into ORA-19870: error while restoring backup piece archive_3840_1_813515387

Due to multinode channeling,  depending upon the instance channel which has taken backup of piece /STU1/remedy-ebu-db2_1366714776_C1_F1 will try to retrieve & restore the archives to that particular instance location when archive destination supplied is not shared resulting into ORA-07286: sksagdi: cannot obtain device information during retrieval.

Workaround/Solution:

Solution is to have shared archive destination across RAC instances such as ASM disk group or ACFS shared file system (11gR2) supporting multinode channels during restoration.

Workaround is to remove multinode channels & execute restoration from only a node with single channel which has taken the backup of particular set of archives to be restored.

Make sure archive destination specified is accessible

Also make sure media such as storage disk or TAPE is available

e.g.

RUN {
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE'  CONNECT 'sys/Oracle_123@REMCORP2' ;
set archivelog destination to '/dump/backup/logmnr';
restore archivelog from logseq 5948 until logseq 5949 thread 1;
RELEASE CHANNEL ch01;
}

No comments:

Post a Comment