Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1090859
  • 博文数量: 276
  • 博客积分: 10077
  • 博客等级: 上将
  • 技术积分: 2513
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-24 20:31
文章分类

全部博文(276)

文章存档

2020年(1)

2015年(5)

2012年(2)

2011年(6)

2010年(7)

2009年(224)

2008年(31)

我的朋友

分类: Oracle

2009-06-12 10:02:22


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文件也会删除。这个命令不会删除归档文件和备份文件。
阅读(718) | 评论(0) | 转发(0) |
0

上一篇:工作

下一篇:shell notes

给主人留下些什么吧!~~