Thursday, March 29, 2012

ORA-19870, ORA-19507, ORA-27029, ORA-19511 : Error received from media manager layer

run
{
ALLOCATE CHANNEL ch0 DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(NB_ORA_CLIENT=SERVERNAME.com,
NB_ORA_POLICY=,
NB_ORA_SERV=MASTER_BACKUPSERVER.com)';
RESTORE controlfile from 'c-2440775812-20120222-00';
}


using target database control file instead of recovery catalog
allocated channel: ch0
channel ch0: sid=427 devtype=SBT_TAPE
channel ch0: Veritas NetBackup for Oracle - Release 6.5 (2010042404)

Starting restore at 07-MAR-12

channel ch0: restoring control file
released channel: ch0
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 03/07/2012 12:25:51
ORA-19870: error reading backup piece c-2440775812-20120222-00
ORA-19507: failed to retrieve sequential file, handle="c-2440775812-20120222-00", parms=""
ORA-27029: skgfrtrv: sbtrestore returned error
ORA-19511: Error received from media manager layer, error text:
--see the text here --


Cause      No.   Message                                       
sbtopen   7000 Backup file not found (only returned for read)
          7001 File exists (only returned for write)         
          7002* Bad mode specified                            
          7003 Invalid block size specified                  
          7004 No tape device found                          
          7005 Device found, but busy; try again later       
          7006 Tape volume not found                         
          7007 Tape volume is in-use                         
          7008 I/O Error                                     
          7012* Invalid argument(s) to sbtopen                
sbtclose   7020* Invalid file handle or file not open          
          7021* Invalid flags to sbtclose                     
          7022 I/O error                                     
          7023 O/S error                                     
          7024* Invalid argument(s) to sbtclose               
          7025 Can't connect with Media Manager              
sbtwrite   7040* Invalid file handle or file not open          
          7041 End of volume reached                         
          7042 I/O error                                     
          7043 O/S error                                     
          7044* Invalid argument(s) to sbtwrite               
sbtread   7060* Invalid file handle or file not open          
          7061 EOF encountered                               
          7062 End of volume reached                         
          7063 I/O error                                     
          7064 O/S error                                     
          7065* Invalid argument(s) to sbtread                
sbtremove  7080 Backup file not found                         
          7081 Backup file in use                            
          7082 I/O Error                                     
          7083 Can't connect with Media Manager              
          7084 Permission denied                             
          7085 O/S error                                     
          7086* Invalid argument(s) to sbtremove              
sbtinfo   7090 Backup file not found                         
          7091 I/O Error                                     
          7092 Can't connect with Media Manager              
          7093 Permission denied                             
          7094 O/S error                                     
          7095* Invalid argument(s) to sbtinfo                
sbtinit   7110* Invalid argument(s) to sbtinit                
          7111 O/S error                                     


-check content of /usr/openv/netbackup/bp.conf


SERVER = masterserver.com
SERVER = devserver.com
SERVER = prodserver.com
EMMSERVER = masterserver.com
CLIENT_NAME = devserver.com
CLIENT_NAME = prodserver.com


THINGS TO CHECK

1) check link between Oracle and Netbackup.
lrwxr-xr-x   1 oracle     dba             36 Mar  7  2011 libobk.sl -> /usr/openv/netbackup/bin/libobk.sl64

Below are the API library for different Platform.

NetBackup API libraries

Platform        Oracle    Library Name     
AIX             32-bit    libobk.a              
AIX             64-bit    libobk.a64            
HP-UX           32-bit    libobk.sl           
HP-UX           64-bit    libobk.sl64         
IRIX            64-bit    libobk.so64          
Linux           32-bit    libobk.so           
Linux           64-bit    libobk.so64         
Linux Itanium   64-bit    libobk.so   
IBM pSeries     64-bit    libobk.so     
Solaris(SPARC)  32-bit    libobk.so.1                  
Solaris (SPARC) 64-bit    libobk.so64.1
Tru64           64-bit    libobk.so.1            

1 Use RMAN to make a backup directly to disk. Do not use NetBackup.
2 Use RMAN with NetBackup to create a backup.
3 Check the /usr/openv/netbackup/logs/dbclient directory permissions. They should be set to 777.
4 Look for a log file in /usr/openv/netbackup/logs/dbclient
If no log file exists, libobk is not linked into Oracle properly.

Note: you dont need to shutdown all instances.
You can create softlink without shutting down Database.
ln -s /usr/openv/netbackup/bin/libobk.sl64 /u01/app/oracle/product/10.2.0.3.0_1/lib/libobk.sl

if you want to create softlink safely , execute /usr/openv/netbackup/bin/oracle_link as below.

/usr/openv/netbackup->/usr/openv/netbackup/bin/oracle_link
Fri Mar 23 16:26:48 EDT 2012
All Oracle instances should be shutdown before running this script.

Please log into the Unix system as the Oracle owner for running this script

Do you want to continue? (y/n) [n] y


LIBOBK path: /usr/openv/netbackup/bin
ORACLE_HOME: /u01/app/oracle/product/10.2.0.3.0_1
Oracle version: 10.2.0.3.0
Linking LIBOBK (64 bits):
Moving libobk.sl to libobk.sl.back
ln -s /usr/openv/netbackup/bin/libobk.sl64 /u01/app/oracle/product/10.2.0.3.0_1/lib/libobk.sl
Done

Please check the trace file located in /tmp/make_trace.18515
to make sure the linking process was successful.



2) Check using sbttest.

(ncsci012):dncryp:/u01/app/oracle/product/10.2.0.3.0_1/dbs->sbttest mml.tst
The sbt function pointers are loaded from libobk.sl library.
-- sbtinit succeeded
-- sbtinit (2nd time) succeeded
sbtinit: Media manager supports SBT API version 2.0
sbtinit: Media manager is version 5.0.0.0
sbtinit: vendor description string=Veritas NetBackup for Oracle - Release 6.5 (2010042404)
sbtinit: allocated sbt context area of 8 bytes
sbtinit: proxy copy is supported
-- sbtinit2 succeeded
-- regular_backup_restore starts ................................
MMAPI error from sbtbackup: 7501, VxBSACreateObject: Failed with error:
   Server Status:  Communication with the server has not been initiated or the server status has not been retrieved from the serve
-- sbtbackup failed


% sbttest
The program displays the list of possible arguments for the program:

Error: backup file name must be specified
Usage: sbttest backup_file_name # this is the only required parameter
               <-dbname database_name>
               <-trace trace_file_name>
               <-remove_before>
               <-no_remove_after> 
               <-read_only>
               <-no_regular_backup_restore>
               <-no_proxy_backup>
               <-no_proxy_restore>
               <-file_type n>
               <-copy_number n>
               <-media_pool n>
               <-os_res_size n>
               <-pl_res_size n>
               <-block_size block_size> 
               <-block_count block_count>
               <-proxy_file os_file_name bk_file_name 
               [os_res_size pl_res_size block_size block_count]>
               <-libname sbt_library_name>


3) Read More into logfiles.
/usr/openv/netbackup/logs/dbclient

4) check below directory and files
/opt/openv/netbackup/db/altnames/No.Restrictions

No comments:

Post a Comment