手工刪除Oracle 12C資料庫

來源:互聯網
上載者:User

Oracle 12C資料庫除了可以使用DBCA刪除掉以外,我們還可以使用drop database命令將其刪除。
這種刪除方法非常簡單,不過必須滿足以下2點要求:
1、資料庫必須處於mount狀態,不允許為open狀態;
2、資料庫必須處於restricted受限制模式下。

[oracle@rhel6u4 ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Thu Jun 27 23:56:36 2013
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> startup mount;
ORACLE instance started.
#oracle必須啟動到mount狀態。

Total System Global Area  521936896 bytes
Fixed Size                  2290264 bytes
Variable Size             432016808 bytes
Database Buffers           79691776 bytes
Redo Buffers                7938048 bytes
Database mounted.

SQL> alter system enable restricted session;
#讓oracle處於restricted這種受限制模式
System altered.

SQL> drop database;
#刪除oracle資料庫。

Database dropped.

本文出自 “Helloblock的DBA足跡” 部落格,請務必保留此出處http://helloblock.blog.51cto.com/7899615/1294418

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.