Home » RDBMS Server » Server Administration » Problem in Integration shell script with HP-omniback
Problem in Integration shell script with HP-omniback [message #216408] Sat, 27 January 2007 04:14 Go to next message
sridharreddy_d
Messages: 3
Registered: July 2006
Location: kualalumpur
Junior Member
hi all,

I am using the following shell script to backup the archivelogs(say ,located at /arch directory)
to tape(hp-omniback) and then move the same archive files that are backed-up to tape to
another disk location(say,/u02/backup directory) using the shell script given below.

****************************************************************************************************
#environment settings
ORACLE_HOME=/app/oracle/product/9.2.0.5; export ORACLE_HOME
PATH=$PATH:$ORACLE_HOME/bin; export PATH
ORACLE_SID=ers2; export ORACLE_SID

#variable declaration
today=`date +"%H%M%d%m%Y"`
pass=`cat /EXPORT/logindet`

#query and spool the log file sequence numbers from both the threads
sqlplus -s /nolog << END
connect $pass
set pagesize 0 feedback off verify off heading off echo off
spool /EXPORT/seq_num1.dat
select min(sequence#)-1 from v\$log where thread#=1;
exit;
spool off
END

sqlplus -s /nolog << END
connect $pass
set pagesize 0 feedback off verify off heading off echo off
spool /EXPORT/seq_num2.dat
select min(sequence#)-1 from v\$log where thread#=2;
exit;
spool off
END

seq1=`cat /EXPORT/seq_num1.dat`
seq2=`cat /EXPORT/seq_num2.dat`

#rman tape backup
rman log=rman_log_$today<< EOF
connect target sys/manager@ers2;
connect catalog rman/rman@ersoms;
run {
allocate channel 'dev_0' type 'sbt_tape'
parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ers2,OB2BARLIST=ERSDB2_RMAN_ACHIVE_Daily)';
allocate channel 'dev_1' type 'sbt_tape'
parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ers2,OB2BARLIST=ERSDB2_RMAN_ACHIVE_Daily)';
allocate channel 'dev_2' type 'sbt_tape'
parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ers2,OB2BARLIST=ERSDB2_RMAN_ACHIVE_Daily)';
allocate channel 'dev_3' type 'sbt_tape'
parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ers2,OB2BARLIST=ERSDB2_RMAN_ACHIVE_Daily)';
change archivelog all crosscheck ;
backup archivelog until sequence $seq1 thread 1;
backup archivelog until sequence $seq2 thread 2;
release channel dev_1;
}
EOF

#error handling
err_count=`cat rman_log_$today |grep RMAN-00569 |wc -l`
if [ $err_count = 0 ]
then
sqlplus -s /nolog << END
connect $pass
set pagesize 0 feedback off verify off heading off echo off
spool move_to_disk.sh
select 'mv '||name ||' /archlog/archlog_bckp' from v\$archived_log
where sequence# < $seq1 and thread#=1
union
select 'mv '||name ||' /archlog/archlog_bckp' from v\$archived_log
where sequence# < $seq2 and thread#=2
;
spool off;
exit;
END
chmod 744 /EXPORT/RMAN/move_to_disk.sh
sh /EXPORT/RMAN/move_to_disk.sh 2> move_to_disk_err_log
else
echo "Please Check /EXPORT/rman_log for error"
fi
*****************************************************************************************************

The script works fine when I run at the shell but,as the client is using HP - omniback to schedule ,execute and
monitor backup & recovery operations I need to integrate the above script with omni back,i.e. the script should
work from omni back so that client can schedule and monitor backup&move job from OMNI GUI
Environment:
OS=>Solaris 5.9
DB=>Oracle 9.2.0.5.

I am not familer with HP-OMNI BACK tool,I tried to download a trial version for xp or linux but could not.

Please help me to integrate the above script with omni back.

Thanks in advance.

Sridhar
Re: Problem in Integration shell script with HP-omniback [message #216433 is a reply to message #216408] Sat, 27 January 2007 11:55 Go to previous message
cbruhn2
Messages: 41
Registered: January 2007
Member
You state that the mentioned script actually run using HP omniback for delivering backups to tape.
Quote:
I am using the following shell script to backup the archivelogs(say ,located at /arch directory)
to tape(hp-omniback) and then move the same archive files that are backed-up to tape to
another disk location(say,/u02/backup directory) using the shell script given below.


So as far as I can see you want us to tell you how you configure omniback to call the fore mentioned script?
I would talk to the guy's who are responsible for HP-omniback and tell them that they have to run your script placed in /xxx/yyy/backup or whatever.

best regards.
Previous Topic: Connect to Oracle 10g
Next Topic: ora-12638-credential-retrieval-failed
Goto Forum:
  


Current Time: Mon Dec 05 15:21:09 CST 2016

Total time taken to generate the page: 0.12175 seconds