How to delete / drop a database?
To drop a database from batch file
echo connect / as sysdba >xyz.tmp
echo shutdown abort; >>xyz.tmp
echo startup mount exclusive restrict; >>xyz.tmp
echo drop database; >>xyz.tmp
echo exit; >>xyz.tmp;
sqlplus.exe /nolog @xyz.tmp
del xyz.tmp
To drop a database from shell script
echo connect / as sysdba >xyz.tmp
echo shutdown abort; >>xyz.tmp
echo startup mount exclusive restrict; >>xyz.tmp
echo drop database; >>xyz.tmp
echo exit; >>xyz.tmp;
sqlplus.exe /nolog @xyz.tmp
rm xyz.tmp
No comments:
Post a Comment