cancel
Showing results forΒ 
Search instead forΒ 
Did you mean:Β 

RMAN error

manjunath_nm
Level 4

Hi,

 

I just configured script based Rman hot backup and am getting some error like (backup failed to backup the requested file code(6)), like this and below i copied the bphdb log please help on this.

 

 

 

16:47:49.120 [29575] <2> logparams: -sb -rdbms oracle -S backup1 -to 300 -c dbapps -s Full -clnt dbapps1.elxsimatix.net -FULL -kl 28 -b dbapps1.elxsimatix.net_1321442720 -jobid 1815 
16:47:49.736 [29575] <4> bphdb: Module: libncf, Release: 7.1 , Build: 00/00/0000 00:00:00 CDT (00000000)
16:47:49.736 [29575] <4> bphdb: System: HP-UX, DBAPPS1, B.11.31, U, ia64, {5}
16:47:49.806 [29575] <4> bphdb: Current code page: ICU: ibm-1051_P100-1995, Max. character width: 1, Substitution character: 0x1A [.], Unicode substitution character: 0xfffd [..]
16:47:49.806 [29575] <4> bphdb: Running as user '0', primary group '3'
16:47:49.806 [29575] <4> bphdb: Environment variable _=/usr/openv/netbackup/bin/bpcd
16:47:49.806 [29575] <4> bphdb: Environment variable MANPATH=/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/usr/local/man/%L:/usr/local/man:/opt/VRTS/vxfs5.0/man:/opt/ldapux/share/man/%L:/opt/ldapux/share/man:/opt/ipf/man:/opt/ldapux/ypldapd/man:/opt/samba/man:/opt/samba/WTEC_Support_Tools/man:/opt/samba/cfsm_man:/opt/cifsclient/share/man:/opt/openssl/man:/opt/openssl/prngd/man:/opt/wbem/share/man:/opt/graphics/common/man:/opt/amgr/man/%L:/opt/amgr/man:/opt/sec_mgmt/share/man:/usr/dt/share/man:/opt/caliper/man/%L:/opt/caliper/man:/opt/drd/share/man/%L:/opt/drd/share/man:/opt/dsau/man:/opt/resmon/share/man/%L:/opt/resmon/share/man:/opt/gnome/man:/opt/ignite/share/man/%L:/opt/ignite/share/man:/opt/propplus/share/man:/usr/contrib/kwdb/share/man:/opt/perl_32/man:/opt/perl_64/man:/opt/prm/man/%L:/opt/prm/man:/opt/psb/healthtest/share/man:/opt/sfm/share/man:/opt/swm/share/man/%L:/opt/swm/share/man:/opt/swa/share/man/%L:/opt/swa/share/man:/opt/ssh/share/man:/opt/sentinel/man/%L:/opt/sentinel/man:/opt/langtools/share/man/%L:/opt/langtools/share/man:/opt/openssl/fips/0.9.7/man:/opt/openssl/fips/0.9.8/man:/opt/gwlm/man/%L:/opt/gwlm/man:/opt/icod/man/%L:/opt/icod/man
16:47:49.813 [29575] <4> bphdb: Environment variable SSH_TTY=/dev/pts/3
16:47:49.813 [29575] <4> bphdb: Environment variable PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:/opt/gvsd/bin:/opt/ipf/bin:/opt/nettladm/bin:/opt/fcms/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/sas/bin:/opt/graphics/common/bin:/opt/atok/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/sec_mgmt/bastille/bin:/opt/caliper/bin:/opt/drd/bin:/opt/dsau/bin:/opt/dsau/sbin:/opt/resmon/bin:/opt/firefox:/opt/gnome/bin:/opt/ignite/bin:/opt/propplus/bin:/usr/contrib/kwdb/bin:/opt/perl_32/bin:/opt/perl_64/bin:/opt/prm/bin:/opt/sfm/bin:/opt/swm/bin:/opt/sec_mgmt/spc/bin:/opt/ssh/bin:/opt/swa/bin:/opt/hpsmh/bin:/opt/thunderbird:/opt/sentinel/bin:/opt/langtools/bin:/opt/gwlm/bin:/sbin:/home/root:/usr/local/bin
16:47:49.813 [29575] <4> bphdb: Environment variable OLDPWD=/opt
16:47:49.813 [29575] <4> bphdb: Environment variable LC_ALL=C
16:47:49.813 [29575] <4> bphdb: Environment variable COLUMNS=80
16:47:49.813 [29575] <4> bphdb: Environment variable EDITOR=vi
16:47:49.813 [29575] <4> bphdb: Environment variable LOGNAME=root
16:47:49.813 [29575] <4> bphdb: Environment variable MAIL=/var/mail/root
16:47:49.813 [29575] <4> bphdb: Environment variable SFTP_UMASK=
16:47:49.813 [29575] <4> bphdb: Environment variable ERASE=^H
16:47:49.813 [29575] <4> bphdb: Environment variable SFTP_PERMIT_CHOWN=1
16:47:49.813 [29575] <4> bphdb: Environment variable USER=root
16:47:49.813 [29575] <4> bphdb: Environment variable SHLVL=1
16:47:49.813 [29575] <4> bphdb: Environment variable PS=/bin/ps -ea
16:47:49.813 [29575] <4> bphdb: Environment variable IS_NETBACKUP_DAEMON=YES
16:47:49.813 [29575] <4> bphdb: Environment variable SHELL=/usr/local/bin/bash
16:47:49.813 [29575] <4> bphdb: Environment variable inetdfile=/etc/inetd.conf
16:47:49.814 [29575] <4> bphdb: Environment variable HOME=/
16:47:49.814 [29575] <4> bphdb: Environment variable SSH_CLIENT=10.1.14.20 51476 22
16:47:49.814 [29575] <4> bphdb: Environment variable SSH_CONNECTION=10.1.14.20 51476 10.1.14.13 22
16:47:49.814 [29575] <4> bphdb: Environment variable TERM=xterm
16:47:49.814 [29575] <4> bphdb: Environment variable PWD=/opt/NetBackup_7.1_HPIA
16:47:49.814 [29575] <4> bphdb: Environment variable TZ=IST-5:30
16:47:49.814 [29575] <4> bphdb: Environment variable SFTP_PERMIT_CHMOD=1
16:47:49.814 [29575] <4> bphdb: Environment variable LINES=24
16:47:49.826 [29575] <4> bphdb: INF - setenv NB_ORA_POLICY=dbapps
16:47:49.826 [29575] <4> bphdb: INF - setenv NB_ORA_CLIENT=dbapps1.elxsimatix.net
16:47:49.826 [29575] <4> bphdb: INF - setenv NB_ORA_MODE=B
16:47:49.827 [29575] <4> bphdb: INF - NB_ORA_POLICY=dbapps
16:47:49.827 [29575] <4> bphdb: INF - NB_ORA_SCHED not defined.
16:47:49.827 [29575] <4> bphdb: INF - NB_ORA_PC_SCHED=Full
16:47:49.827 [29575] <4> bphdb: INF - NB_ORA_SERV=backup1
16:47:49.827 [29575] <4> bphdb: INF - NB_ORA_PC_BTYPE not set
16:47:49.827 [29575] <4> bphdb: INF - setenv NB_ORA_FULL=1
16:47:49.827 [29575] <4> bphdb: INF - setenv NB_ORA_INCR=0
16:47:49.827 [29575] <4> bphdb: INF - setenv NB_ORA_CINC=0
16:47:49.827 [29575] <4> bphdb: INF - setenv NB_ORA_SCHEDULED=1
16:47:49.827 [29575] <4> bphdb: INF - setenv NB_ORA_PARENT_JOBID=1815
16:47:49.827 [29575] <4> bphdb: INF - BACKUP START 29575
16:47:50.025 [29575] <4> bphdb: INF - CONTINUE BACKUP message received
 
16:47:50.026 [29575] <4> bphdb: INF - Processing /usr/openv/netbackup/ext/db_ext/oracle/samples/rman/hot_database_backup_TATAELXSI.sh
16:47:50.028 [29575] <4> bphdb: INF - Waiting for the child status
16:47:50.029 [29576] <4> bphdb: INF - Child executing /usr/openv/netbackup/ext/db_ext/oracle/samples/rman/hot_database_backup_TATAELXSI.sh
16:47:50.029 [29576] <32> bphdb: FTL - Child exec of /usr/openv/netbackup/ext/db_ext/oracle/samples/rman/hot_database_backup_TATAELXSI.sh failed.
16:47:50.030 [29576] <32> bphdb:    errno = 13: Permission denied
16:47:50.030 [29576] <16> bphdb: ERR - bphdb exit status = 29: failed trying to exec a command
 
16:47:50.087 [29576] <4> bphdb: INF - EXIT STATUS 29: failed trying to exec a command
 
16:47:51.032 [29575] <16> bphdb: ERR - Script exited with status = 29 <failed trying to exec a command>
16:47:51.032 [29575] <8> bphdb: WRN - Directory /usr/openv/netbackup/logs/bpdbsbora does not exist
16:47:51.032 [29575] <8> bphdb: WRN - Directory /usr/openv/netbackup/logs/bpubsora does not exist
16:47:51.032 [29575] <16> bphdb: ERR - bphdb exit status = 6: the backup failed to back up the requested files
 
16:47:51.032 [29575] <4> bphdb: INF - EXIT STATUS 6: the backup failed to back up the requested files
39 REPLIES 39

Yasuhisa_Ishika
Level 6
Partner Accredited Certified
Permission of the script is correct. As I wrote, "permission denied" error occured by other reason. Could you try to run the script by root user, and post whole output? Template is easy way to configure oracle backup. With teplate, you don't have to write script. Check administrator's guide for detail.

manjunath_nm
Level 4

 

Hi,

How to fix this Error

-bash-3.2# ./TATAELXS.sh
/usr/lib/hpux64/dld.so: Unable to find library 'libclntsh.so.10.1'.
-bash: line 45: 23330 Killed                  /appdb0/app/oracle/product/10.2.0.2//bin/rman target sys/manager nocatalog msglog ./TATAELXS.sh.out append  <<EOF
RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
SEND'NB_ORA_CLIENT=dbapps1.elxsimatix.net,NB_ORA_SERV=backup1';
BACKUP
    INCREMENTAL LEVEL=0
    SKIP INACCESSIBLE
    TAG hot_db_bk_level0
    FILESPERSET 5
    # recommended format
    FORMAT 'bk_%s_%p_%t'
    DATABASE;
    sql 'alter system archive log current';
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
# backup all archive logs
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
BACKUP
   filesperset 20
   FORMAT 'al_%s_%p_%t'
   ARCHIVELOG ALL DELETE INPUT;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
#
# Note: During the process of backing up the database, RMAN also backs up the
# control file.  This version of the control file does not contain the
# information about the current backup because nocatalog has been specified.
# To include the information about the current backup, the control file should
# be backed up as the last step of the RMAN section.  This step would not be
# necessary if we were using a recovery catalog.
#
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
BACKUP
    # recommended format
    FORMAT 'cntrl_%s_%p_%t'
    CURRENT CONTROLFILE;
RELEASE CHANNEL ch00;
}
EOF
 

Marianne
Level 6
Partner    VIP    Accredited Certified

Questions we should have asked right in the beginning:

NBU version and patch level?

Client OS?   (HP-UX,  B.11.31, ia64)

Oracle version? (seems to be 10.2.0.2, right?)

Has Oracle DBA verified that RMAN can be used to write backups to disk?

A quick Google search about the latest error points to LD_LIBRARY_PATH that is probably not defined in oracle user's profile, incorrect symbolic links, incorrect permissions on $ORACLE_HOME ....
In short - all Oracle and OS related.

manjunath_nm
Level 4

NBU Version: 7.1

Oracle Version: 10.2.0.2

Client OS :HP-UX,  B.11.31, ia64

echo $LD_LIBRARY_PATH=/appdb0/app/oracle/product/10.2.0.2/lib:/usr/dt/lib:/usr/openwin/lib:/appdb0/app/oracle/product/10.2.0.2/ctx/lib

echo $SHLIB_PATH=/appdb0/app/oracle/product/10.2.0.2/lib:/usr/dt/lib:/usr/openwin/lib:/appdb0/app/oracle/product/10.2.0.2/ctx/lib:/usr/lib:/appdb0/app/oracle/product/10.2.0.2/lib32

is there any changes i need to do on above?

manjunath_nm
Level 4

echo $ORACLE_HOME= /appdb0/app/oracle/product/10.2.0.2

Marianne
Level 6
Partner    VIP    Accredited Certified

Please ask your Oracle DBA to verify that RMAN can be used to write backups to disk.

As I've said in my previous post - Google found links related to OS and RMAN.

I cannot say from NBU point of view what needs to be done to fix this, other than verifying that the NBU plugin is linked correctly - see p. 38 of Oracle Admin Guide UNIX, Linux  http://www.symantec.com/docs/TECH127053 .

Marcio_Almeida
Level 4
Certified

hello, check this script that is attached. The same is used here in the environment, and works perfectly. Analyze each line or compare with your script. At the end of the script has a field for sending email. Change xxx@xx.com.br mail to your e-mail administration.

Maybe this script can also serve for you. Try and report the result.
Regards, MΓ‘rcio Almeida.

Yasuhisa_Ishika
Level 6
Partner Accredited Certified
libclntsh.so.10.1 is needed by rman program, but no such file exist under library paths. As Marianne wrote, you should check whether rman works and ask to OS/DB admins.

Will_Restore
Level 6

above you list contents of  /appdb1/app/oracle/product/10.2

but your listed paths are  /appdb0/app/oracle/product/10.2.0.2/

manjunath_nm
Level 4

hi all,

 

RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> 21> 22> 23> 24> 25> 26> 27> 28> 29> 30> 31> 32> 33> 34> 35> 36> 37>
38> 39> RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> 21> 22> 23> 24> 25> 26> 27> 28> 29> 30> 31> 32> 33> 34> 35>
36> 37> 38> 39>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of allocate command on ch00 channel at 01/20/2012 17:04:41
ORA-19554: error allocating device, device type: SBT_TAPE, device name:
ORA-27211: Failed to load Media Management Library
 

 

How to fix this issue?

Marianne
Level 6
Partner    VIP    Accredited Certified

Have you verified that the NBU plugin is linked correctly? 

see p. 38 of Oracle Admin Guide UNIX, Linux  http://www.symantec.com/docs/TECH127053 .

manjunath_nm
Level 4

Yup! everything linked properly and also run the script /usr/openv/netbackup/oracle_link but no luck still same error.

manjunath_nm
Level 4

Hi

 

When we execute the same script Directly(usr/openv/netbackup/ext/db_ext/oracle/samples/rman/./oracle_script) as oracle user, it works fine but the same script fails when it tries to execute as root user.

Yasuhisa_Ishika
Level 6
Partner Accredited Certified

Please post more information like below.

  • content of the script you tested
  • name of "oracle user"
  • full output of script in each case
  • output of "echo ${ORACLE_HOME}"
  • output of "ls -l ${ORACLE_HOME}/lib/libobk*"

Will_Restore
Level 6

your script should contain

  su - $ORACLE_USER -c "$CMD_STR"

and ORACLE_USER variable needs to be properly set for your environment

manjunath_nm
Level 4

$ORACLE_USER= teldb

echo $ORACLE_HOME=/appdb1/app/oracle/product/10.2

lrwxr-xr-x   1 teldb      dba             34 Jan 23 11:44 /appdb1/app/oracle/product/10.2/lib/libobk.so -> /usr/openv/netbackup/bin/libobk.so
 

script and script.out file attached below

Yogesh9881
Level 6
Accredited

when you executing script or initiate backup policy from master ....

pls post .out files from /usr/openv/netbackup/ext/db_ext/oracle/samples/rman/

manjunath_nm
Level 4

Above TestMS.sh_txt is the rman out file i just renamed as .txt for refferance.

Marianne
Level 6
Partner    VIP    Accredited Certified

If you can run the script on the client as user teldb, it should work running the same script as root.

Your script contailns the following:

ORACLE_USER=teldb

if [ "$CUSER" = "root" ]
then
    su - $ORACLE_USER -c "$CMD_STR" >> $RMAN_LOG_FILE
    RSTAT=$?
else
    /usr/bin/sh -c "$CMD_STR" >> $RMAN_LOG_FILE
    RSTAT=$?
fi

You can see in the output file that the 'su - .. ' is working, because the ORACLE_USER is set to teldb:

ORACLE_USER: teldb

Still something wrong with the link:

ORA-27211: Failed to load Media Management Library

 

ONE POSSIBILITY:

If it works when logged in as user teldb, there is possibly some ENV variable missing in teldb's startup files. 'su - teldb' in the script will simply apply what is in the shell startup file (e.g. .profile).

SUGGESTION:
Add a line in the script to echo ENV output. 

Then run the script as teldb. Next, rename output file and run the script again as root.

Compare ENV output.

 

Will_Restore
Level 6

This thread has covered every possible mishap with NetBackup for Oracle client configuration.  indecision