Friday, May 9, 2008

Exporting Entire Oracle Database backup using a Shell script

REM: Exporting Entire Oracle Database backup using a Shell script
REM:
REM:*****************************************
REM: NOTE: PLEASE TEST THIS SCRIPT BEFORE USE.
REM: Author will not be responsible for any damage that may be cause by this script.
REM:*****************************************

#!/bin/sh
# Exporting Entire Oracle Database backup

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/9.2.0
export ORACLE_SID=
filename='FULL_'
v_date=\"`date +%Y%m%d`\"

echo 'Exporting Entire Oracle Database ....'
${ORACLE_HOME}/bin/exp / full=y file=${filename}${v_date}.dmp log=${filename}${v_date}.log

echo 'Transferring the Oracle Export Dump file to Remote location ....'

smbclient // -U % -c \"put ${filename}${v_date}.dmp\"
smbclient // -U % -c \"put ${filename}${v_date}.log\"

No comments:

Post a Comment

Thanks for you valuable comments !