C:\>%oracle_home%\bin\sqlplus /nolog
SQL*Plus: Release 10.2.0.3.0 - Production on Fri Jun 12 09:51:26 2009
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 629145600 bytes
Fixed Size 2056992 bytes
Variable Size 192941280 bytes
Database Buffers 427819008 bytes
Redo Buffers 6328320 bytes
Database mounted.
Database opened.
SQL> drop database;
drop database
*
ERROR at line 1:
ORA-01586: database must be mounted EXCLUSIVE and not open for this operation
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount exclusive;
ORACLE instance started.
Total System Global Area 629145600 bytes
Fixed Size 2056992 bytes
Variable Size 197135584 bytes
Database Buffers 423624704 bytes
Redo Buffers 6328320 bytes
Database mounted.
SQL> drop database;
drop database
*
ERROR at line 1:
ORA-12719: operation requires database is in RESTRICTED mode
SQL> alter system enable restricted session;
System altered.
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
mts
SQL> drop database;
Database dropped.
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64
bit Production
With the Partitioning, OLAP and Data Mining options
SQL>
数据库必须处于MOUNT状态,且设置了RESTRICTED SESSION。执行了DROP DATABASE命令后,Oracle自动删除控制文件,和记录在控制文件中记录的数据文件和在线重做日志文件,如果数据库使用了SPFILE,那么SPFILE文件也会删除。这个命令不会删除归档文件和备份文件。
阅读(805) | 评论(0) | 转发(0) |