用SEHLL删除ORACLE用户!
su oracle -c "${ORACLE_HOME}/bin/sqlplus /nolog" <<EOF
connect / as sysdba
drop user tccs CASCADE
exit
EOF
ret=$?
if [[ $ret != 0 ]]
then
print "user has delete failed!"
return $ret
else
print "user deleted done."
fi;
好像这个SHELL搞不定啊!!
------解决方案--------------------
shell脚本如下:
Perl code
#!bin/bash
su - oracle <<EOF
/u01/app/oracle/product/10.2.0/db_1/bin/sqlplus -S / as sysdba
drop user tccs CASCADE;
exit
EOF