经常听到删库跑路,刚刚好读《Oracle Database Administrator s Guide 11g Release 2 (11.2) 》有个drop database,搞一波。
SQL> drop database;
drop database
*
ERROR at line 1:
ORA-01586: database must be mounted EXCLUSIVE and not open for this operation
#不能直接删除,需要将数据库开启到mount EXCLUSIVE状态先关闭数据库:
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
#启动到mount状态:
SQL> startup mount;
ORACLE instance started.
Total System Global Area 784998400 bytes
Fixed Size 2257352 bytes
Variable Size 478154296 bytes
Database Buffers 301989888 bytes
Redo Buffers 2596864 bytes
Database mounted.
#将数据库设置为EXCLUSIVE状态: