Shell Script Freeze and Unfreeze oracle db 10g for begin/end backup(apply with backup agent)

** Myself
Freeze script
 
orauser=oracle
su - ${orauser}   << BOF 2>&1
export ORACLE_SID=$orasid
sqlplus /nolog << EOF 2>&1
connect / as sysdba
alter database begin backup;
EOF
BOF
 
Unfreeze script
orauser=oracle
su - ${orauser}   << BOF 2>&1
export ORACLE_SID=$orasid
sqlplus /nolog << EOF 2>&1
connect / as sysdba
alter database end backup;
EOF
BOF

0 comments:

Loading