Oracle & MySQL Support

InfraStack-Labs Oracle & MySQL DBA Services help you manage, maintain, and optimize your critical Oracle systems. We deliver 24/7, year-round support with flexible monthly contracts that don’t lock you in.

Please contact me :- ajith.narayanan@infrastack-labs.in

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 !