cancel
Showing results for 
Search instead for 
Did you mean: 

AIX Oracle Backup

Casey_King
Level 6
Server: AIX 5.3.0.0
Oracle Client: 10.1.0
Netbackup: 5.1MP3

I created a policy in the netbackup admin console. The file it is trying to execute is
hot_database_backup.sh

When I execute the command an error returns:

EXIT STATUS 29: failed trying to exec a command


I am wading into new water here and I am wanting to know what files I need to manipulate to get this oracle backup to run properly. Any help or suggestions would be great.
15 REPLIES 15

Stumpr2
Level 6
Make sure file has execute perms for user oracle
Make sure it is run by user oracle

Casey_King
Level 6
I modified the hot_database_backup.sh file:

# hot_database_backup.sh
# ---------------------------------------------------------------------------
# This script uses Recovery Manager to take a hot (inconsistent) database
# backup. A hot backup is inconsistent because portions of the database are
# being modified and written to the disk while the backup is progressing.
# You must run your database in ARCHIVELOG mode to make hot backups. It is
# assumed that this script will be executed by user root. In order for RMAN
# to work properly we switch user (su -) to the oracle dba account before
# execution. If this script runs under a user account that has Oracle dba
# privilege, it will be executed using this user's account.
# ---------------------------------------------------------------------------

# ---------------------------------------------------------------------------
# Determine the user which is executing this script.
# ---------------------------------------------------------------------------

# CUSER=`id |cut -d"(" -f2 | cut -d ")" -f1`
CUSER=`oracle |cut -d"(" -f2 | cut -d ")" -f1`

##########################

The permissions on the file are as follows:

Group: dba
Owner: oracle

The error message I receive now is:

/usr/openv/netbackup/ext/db_ext/oracle/scripts/hot_database_backup.sh: oracle: cannot execute

The log file shows:

14:40:35.659 <2> logparams: -sb -rdbms oracle -S w2ks1 -to 1200 -c oracle-test -s Daily-Full -clnt edidev -FULL -b edidev_1173728553 -jobid 360699
14:40:35.661 <4> bphdb: INF - setenv NB_ORA_POLICY=oracle-test
14:40:35.661 <4> bphdb: INF - setenv NB_ORA_CLIENT=edidev
14:40:35.661 <4> bphdb: INF - setenv NB_ORA_MODE=B
14:40:35.661 <4> bphdb: INF - NB_ORA_POLICY=oracle-test
14:40:35.661 <4> bphdb: INF - NB_ORA_SCHED not defined.
14:40:35.661 <4> bphdb: INF - NB_ORA_PC_SCHED=Daily-Full
14:40:35.661 <4> bphdb: INF - NB_ORA_SERV=w2ks1
14:40:35.661 <4> bphdb: INF - NB_ORA_PC_BTYPE not set
14:40:35.661 <4> bphdb: INF - setenv NB_ORA_FULL=1
14:40:35.661 <4> bphdb: INF - setenv NB_ORA_INCR=0
14:40:35.661 <4> bphdb: INF - setenv NB_ORA_CINC=0
14:40:35.661 <4> bphdb: INF - setenv NB_ORA_SCHEDULED=1
14:40:35.662 <4> bphdb: INF - BACKUP START
14:40:35.823 <4> bphdb: INF - CONTINUE BACKUP message received.
14:40:35.823 <4> bphdb: INF - Processing /usr/openv/netbackup/ext/db_ext/oracle/scripts/hot_database_backup.sh
14:40:35.835 <4> bphdb: INF - bphdb still working.
14:40:35.835 <4> bphdb: INF - Keepalives will be sent every 600 seconds.
14:40:35.835 <4> bphdb: INF - Waiting for the child status.
14:40:35.835 <4> bphdb: INF - Child executing /usr/openv/netbackup/ext/db_ext/oracle/scripts/hot_database_backup.sh
14:40:36.135 <16> bphdb: ERR - Script exited with status = 1
14:40:36.136 <4> bphdb: file /tmp/obackup_class deleted.
14:40:36.136 <16> bphdb: ERR - bphdb exit status = 6: the backup failed to back up the requested files

14:40:36.136 <4> bphdb: INF - EXIT STATUS 6: the backup failed to back up the requested files

Rakesh_Khandelw
Level 6
NetBackup oracle agent works in conjuction with RMAN, all it does provide a library for RMAN to enable to direct to tape write through NetBackup. If you do not have RMAN configured or if you are not using it properly backup will not run properly.

Script in question need to be on the client and usually it's a wrapper which get called by NetBackup, which further calls for actual RMAN script to perform backup operation.

In your case I don't see it configured that way. Have you taken care of that part already?


Also make sure you that you have linked NetBackup library file to oracle library as mentioned in admin guide.

Check for forward as well as for reverse lookup for master/media server from client and for client from master/media server.Message was edited by:
RK

Casey_King
Level 6
Here is what I have done thus far:

Through reading the Netbackup for Oracle System Administrator's Guide for UNIX, I am using the "hot_database_backup.sh script copied from /install_dir/netbackup/ext/db_ext/oracle/samples/rman.

I made modifications to the .sh file as posted earlier, and then I linked Netbackup for Oracle with RMAN. This is the output of the make_trace file that was created as a result of running the ./oracle_link script:

##############


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) y
LIBOBK_PATH: /usr/openv/netbackup/bin
O_HOME: /u01/app/oracle/product/10.1.0/db_1
O_VERSION: 10.1.0.5.0
linking Oracle v10.1.0.5.0 for rs6000_51 .
ln -s /usr/openv/netbackup/bin/libobk.a64 /u01/app/oracle/product/10.1.0/db_1/li
b/libobk.a
Done

#########################

The file permissions are still as stated earlier as well. Concerning the forward and reverse looking...I am confused on what you are talking about. Sorry for my incompetence, still trying to get this figured out.

Rakesh_Khandelw
Level 6
I was referring to DNS name resoultion. Run nslookup command to check IP address using the hostname and then same IP address to check the defined host names in DNS tables.

Dennis_Strom
Level 6
here is what I have.
oracle database backups exports datapump
good thread
http://forums.symantec.com/discussions/thread.jspa?threadID=68448&tstart=0

Oracle replication should be addressed by your companies
needs and or hardware software limitation.

Take a look at this pdf or html from Oracle web site.

http://download-east.oracle.com/docs/cd/B14117_01/server.101/b10732/toc.htm

Using any replication tool requires hardware and a Good System
Administrator that is knowledgeable in his or her field.

Cloning or BCV's replicate data as a 1 to 1 copy, brake the clone
and mount it on a different mount, start the database
(not recovery needed) and you now have an perfect replica of
your production database.

SNAP or Snaps replicate data at a block level and only
keep track of the changes, in the case of a database snap
the data base must be copied and recovered and in some
cases logs need to be applied.

Data pump ships with oracle
http://builder.com.com/5100-6388_14-5800445.html

RAC is super expensive, I know what the concept is but
have not worked with it.

to seach for failures.
Have you searched http://metalink.oracle.com for this message?

Backup and recovery best practices for Oracle 10g with NetBackup 6
http://h71028.www7.hp.com/ERC/downloads/4AA0-8102ENW.pdf

Casey_King
Level 6
I ran nslookup on from the client and server (both name and IP)...no issues in resolution.

Casey_King
Level 6
From the data dump perspective, it looks like I would need to talk to the dba and discuss this option. Is this the preferred method for backing up the dbase? Maybe I am looking at it wrong. From my understanding, I need to get backups running on the dbase to backup and clear out the log files as with SAP. Within Netbackup I run daily backups in order to backup changes, and clear out the directory with logs for SAP.

Dennis_Strom
Level 6
I have one Oracle database that I backup. When I took over it was done with a script through Netbackup. I did not understand exactly what was going on. After sitting down with the DBA we both came to the conclusion (his idea actually) that he would just dump the database (back it up to disk) and I would back that up. He knows when my backups run and works around that. I have since talked to him about automating it through Netbackup but he prefers the way we are doing it. He know what we have when it was done and how to get everything back if anything happens.

This works for us. Others prefer other solutions.

Casey_King
Level 6
hmm...I think it is then time to have a chat with the DBA and see what he wants to do. I like the option you and your DBA are currently using, and I will see what his thoughts are on it as well. This dbase has been up and running for two weeks and I know I need to get a good backup pretty soon.

Dennis_Strom
Level 6
It simplifies backups and you do not worry about paying for an agent.

Rakesh_Khandelw
Level 6
Data Dump option may simplify the process but

i) It requires additional space, which is equivalent to your DB size
ii) you are performing additional I/O on your DB server. First during the backup/dump to disk and then backup to tape will perfom another I/O operation, this additional I/O may impact overall application/DB performance.

If you can afford to have additional disk (which can be multiple TBs in some cases), I would suggest you to do offhost backup using either shadow image if your storage is Hitachi or TimeFinder/BCV if your storage is EMC or Symantec/Veritas Snap mirror which works with disks from any vendor.

$0.02

J_S__Darman_Tua
Level 3
Certified
Have you try to run the script with user "root" ? without change the parameter below (run as default script):

CUSER=`id |cut -d"(" -f2 | cut -d ")" -f1`
# CUSER=`oracle |cut -d"(" -f2 | cut -d ")" -f1`

and please try this command in your environtment :

# id |cut -d"(" -f2 | cut -d ")" -f1
root
# oracle |cut -d"(" -f2 | cut -d ")" -f1
sh: oracle: not found.

from "root" or login using user "oracle"

# su - oracle
$ id |cut -d"(" -f2 | cut -d ")" -f1
oracle
$

so, if you want to make it run using user oracle, you must execute the command in user oracle session, not change the script. I think

Stumpr2
Level 6
yes, this was the very first response that I told Casey.

Casey_King
Level 6
Bob,

After taking it all in, and then having a night to sleep on it and reading another post with some "spoon feeding" it finally clicked.

I went back to the default settings in the hot_database_backup.sh

##############

# Determine the user which is executing this script.
# ---------------------------------------------------------------------------

# CUSER=`id |cut -d"(" -f2 | cut -d ")" -f1`
CUSER=`id |cut -d"(" -f2 | cut -d ")" -f1`

###########################

File permissions:

Group: DBA
Owner: root

################

The backup is running, and I am sure it will take awhile to complete. Thanks for working with me, and getting me on track.