su - oracle <<EOO
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
/u01/app/oracle/product/11.2.0/dbhome_1/bin/sqlplus /nolog <
shutdown immediate
EOS
/u01/app/oracle/product/11.2.0/dbhome_1/bin/exp [username case sensitive]/[password case sensitive] file=/tmp/hasil.dmp
mv /tmp/hasil.dmp /tmp/data_`date +%Y%m%d_%H%M%S`.dmp
/u01/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start
EOO
No comments:
Post a Comment