有个表testa(opdate date),需要定期自动将opdate<sysdate-10的数据备份到OS上,并删除,写了shell
exp scott/tiger tables=testa query=\" where opdate\<sysdate-10\"
if [ #? -eq 0]
then
sqlplus scott/tiger << END
delete from testa where opdate<sysdate-10;
commit;
exit;
END
fi
但是现在有个问题exp失败了 #?仍然是0,各位还有什么高见解决这个问题