oracle数据库创建账号手工删除数据库drop database

手工删除数据库drop database

 

简单过程如下,10g版本以上,数据库要处于mount状态,RESTRICTED 模式下

sys@STANDBY3(dtydb5)> shutdown           

数据库已经关闭。

已经卸载数据库。

ORACLE 例程已经关闭。

sys@STANDBY3(dtydb5)> startup mount;

ORACLE 例程已经启动。

  www.2cto.com  

Total System Global Area 3140026368 bytes

Fixed Size                  2230600 bytes

Variable Size             771753656 bytes

Database Buffers         2348810240 bytes

Redo Buffers               17231872 bytes

数据库装载完毕。

sys@STANDBY3(dtydb5)> drop database;

drop database

*

第 1 行出现错误:

ORA-12719: 操作要求数据库处于 RESTRICTED 模式下

 

sys@STANDBY3(dtydb5)> alter system enable restricted session;

 

系统已更改。

sys@STANDBY3(dtydb5)> drop databoracle账号ase;

 

数据库已删除。

 

说明:

1,10g以上才能有drop database命令

2,The DROP DATABASE command deletes these files from operating system.

* Datafiles  www.2cto.com  

* Online Redo Log Files

* Controlfiles

* SPFILE (if it exists)

 

The DROP DATABASE command does not delete the following files:

* init.ora (text version of the Oracle initialization file)

* password file

* entries in listener files

* entries in oratab file

3,win NT环境下文件不会自动删除

 

 

作者 hijk139

此条目发表在oracle metalink账号分类目录,贴了标签。将固定链接加入收藏夹。