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/bashsu - oracle <<EOF/u01/app/oracle/product/10.2.0/db_1/bin/sqlplus -S / as sysdbadrop user tccs CASCADE; exit EOF