Shell 调用SQLPLUS

#!/bin/bash
export ORACLE_SID=PROD
export ORACLE_HOME=/u01/sq/ora_1/db/12.1.0.2

$ORACLE_HOME/bin/sqlplus -S "test/test" < sysdate -6;
PROMPT "CONFIRM RECORDS"
select count(1) from test.t1;
commit;
spool off
exit;
EOF
date
echo "Delete sucess!"

 

你可能感兴趣的:(Shell 调用SQLPLUS)