手動刪除資料庫

cnhtm發表於2010-02-05

刪除資料庫的通常方法是使用dbca。如果不是用dbca,也可以使用drop database的方法,下面演示其過程:

1、啟動資料庫到mount狀態

ora_test@oracle[/home/oracle]> sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Feb 8 22:59:07 2010

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to an idle instance.

idle> startup mount;
ORACLE instance started.

Total System Global Area 167772160 bytes
Fixed Size 1218292 bytes
Variable Size 71305484 bytes
Database Buffers 88080384 bytes
Redo Buffers 7168000 bytes
Database mounted.
[@more@]

2、限制session登入

idle> alter system enable restricted session;

System altered.

3、刪除資料庫

idle> drop database;

Database dropped.

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
idle> exit

4、清理其他檔案

ora_test@oracle[/home/oracle]> cd $ORACLE_HOME/dbs
ora_test@oracle[/oracle/app/10.1/dbs]> rm -rf *cnhtm*
ora_test@oracle[/oracle/app/10.1/dbs]> rm -rf *CNHTM*

ora_test@oracle[/oracle/app/10.1/dbs]> cd $ORACLE_BASE/admin
ora_test@oracle[/oracle/admin]> rm -rf cnhtm

--end--

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22049049/viewspace-1031199/,如需轉載,請註明出處,否則將追究法律責任。

相關文章