oracle删除数据库(生产环境禁止操作)

以下操作仅供学习,生产环境禁止操作

Step 1: 关闭数据库实例

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

Step 2:启动到数据库实例到mount状态
使用exclusive restart或普通模式都可以

SQL> startup mount exclusive restrict;
或
SQL> startup mount;
 

Step 3: 修改参数为允许受限的会话模式
这一步骤是必须的,否则在drop database时会报ORA-01586: database must be mounted EXCLUSIVE and not open for this operation

SQL> alter system enable restricted session;
 
Step 4:使用drop database命令来清除数据库
SQL> drop database;
posted @ 2025-09-02 16:33  黄多鱼  阅读(10)  评论(0)    收藏  举报