Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
4Activity
0 of .
Results for:
No results containing your search query
P. 1
Rman Bkup.sh

Rman Bkup.sh

Ratings:

4.5

(2)
|Views: 334|Likes:
Published by Srinadh Jyothi
RMAN backup script
RMAN backup script

More info:

Published by: Srinadh Jyothi on Apr 01, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less

05/10/2014

pdf

text

original

 
#!/usr/bin/ksh#----------------------------------------------------------------------------# Script : rman_bkup.ksh# Desc : To perform Oracle RMAN backup commands# Date : 10/22/2003# Usage : rman_bkup.ksh <[ -r rman_db_name ]># < -t target_db_name ># <[ -b backup_type ]># <[ -a d | t ]># [ -e email | p ]# [ -c d | <rman_script> ]# [ -s tablespace_name ]# [ -v nb_ora_serv ]# [ -y nb_ora_policy ]# [ -i nb_ora_client ]# [ -x start_logseq ]# [ -z end_logseq ]# [ -l no_of_log_files ]# [ -w parameter_file ]# [ -p k | r ]# [ -m ]# [ -n ]# [ -o ]# [ -g ]# [ -d ]# [ -u ]# [ -q ]## where:# -r rman_db_name - recovery manager database name.# -t target_db_name - target database name.# -b backup_type - valid backup types:# 0 - level zero backup# 1 - level one backup# 2 - level two backup# a - archivelog backup# d - duplicate archivelog backup# t - tablespace backup# b - full database backup# -a t - backup to tape# -a d - backup to disk# -s tablespace_name - tablespace name, needed during# tablespace backup.# -m - Remove old disk backup files from the# old dir & move previous backup files to# the old dir.# -e email - email address to use.# -e p - use the email address in the# db_config.dat configuration file.# -y nb_ora_policy - Netbackup policy to use for the Oracle# backup.# -v nb_ora_serv - Name of the Netbackup master server.# -i nb_ora_client - Name of the Netbackup client.# -c d - Use the default compiled RMAN script.# -c rman_script - Name of the RMAN command script.# If this parameter is passed parameters# [<-b backup_type >] and [<-a d|t>]# are not anymore required.
 
# -x start_logseq - Backup archivelog starting from this# sequence number.# -z end_logseq - Backup archivelog ending from this# sequence number.# -l no_of_log_files - Number of RMAN log files to retain.# -w parameter_file - Allows the script to get and set up# some or all its backup configuration# parameters by using this parameter# file. It overwrites backup parameter# settings past in the script, if the# parameter has been defined in the# file.# -p k - Include the archive log in the backup# and keep it.# -p r - Include the archive log in the backup# and remove it.# -n - Don't do any backup, just create the# command file.# -o - Over write the command file and# continue backup.# -g - Use the Netbackup enviromental# variables to set up the backup to# be done.# -d - Backup only datafiles that have not# been backup. Use in conjunction# with full database backup.# -u - Do an RMAN NOCATALOG backup.# If this parameter is passed parameter# <[ -r rman_db_name ]> is not anymore# required.# -q - Compress the RMAN disk backup files.##----------------------------------------------------------------------------# REQUIRED FILE:## Make sure the following file exist and are located in the directory this# script resides.## db_config.dat##----------------------------------------------------------------------------#----------------------------------------------------------------------------# Replace the CURR_DIR variable (below) with the directory path where this# script is currently located.#----------------------------------------------------------------------------sCnt=`ps -ef | awk '$1 == "oracle"' | grep -v grep | grep -c rman`if [ $sCnt -gt "0" ]thenexitelseCURR_DIR=/orabin/apps/oracle/dbadm/general/configCONFIG_FILE=$CURR_DIR/.db_config#SBT_LIB="/usr/openv/netbackup/bin/libobk.so64.1"sScriptName=$(basename $0)sUser=$(whoami)sGroup=$(groups)
 
sHostName=$(hostname)sFileNames=${sScriptName%.ksh}AWK="/usr/bin/awk"PSEF="/usr/bin/ps -ef"GREP="/usr/bin/grep"WC="/usr/bin/wc -l"CAT="/usr/bin/cat"CHMOD="/usr/bin/chmod"LS="/usr/bin/ls"TOUCH="/usr/bin/touch"MAILX="/usr/bin/mailx"RM="/usr/bin/rm"MV="/usr/bin/mv"COMPRESS="/usr/bin/compress"UNCOMPRESS="/usr/bin/uncompress"SORT="/usr/bin/sort"DF="/usr/bin/df"DATE="/usr/bin/date"ID="/usr/bin/id"ENV="/usr/bin/env"TAIL="/usr/bin/tail"typeset -i iSw=0typeset -i iCtr=0typeset -i iStartSeq=0typeset -i iEndSeq=0typeset -i iNoOfLogFiles=10typeset -i iLogFiles=0typeset -u sMoveRemove=""typeset -u sNoBackup=""typeset -u sOverWrite=""typeset -u sGetNbEnv=""typeset -u sNotBackup=""typeset -u sNoCatalog=""typeset -u sCompress=""sRmanDb=""sTargetDb=""sDiskTape=""sBkupType=""RMAN=""sPassword=""sRmanUser=""sTargetUser=""sPwdRman=""sPwdTarget=""sStr=""sBackupDir=""sTag=""sMsgLog=""sParamFile=""sRmanFileName=""sTablespace=""sMail=""

Activity (4)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
juanpi2050 liked this
rdandu4 liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->