manually drop and delete an Oracle database

Using DBCA command line to delete a database is quite simple:
dbca -silent -deleteDatabase -sourceDB dbSID2delete


The following describes MANUALLY delete a database:

Refrence:

Search "Oracle DBA Justin - How to drop/delete an Oracle database" on YouTube.
http://www.youtube.com/watch?v=NkI2Sbpjaf4

1. set the database SID
    export ORACLE_SID=mydb

2. sqlplus / as sysdba

3. make sure it's the correct database to delete
SQL>select name from v$database;
name
---------
mydb

4. shutdown the database
SQL>shutdown immediate;

5. YOU MAY WANT TO BACKUP THE DATABASE NOW

6. start the database not opened
    SQL>startup mount restrict;

    only control files loaded and restrict other users to sqlplus(logon) the database

7. drop the database now
    SQL>drop database;

8. database control files, log files, data files and SPFILES etc would be deleted.

Warning: this is only the steps to drop/delete an Oracle database from the video, it's not yet tested.

猜你喜欢

转载自jxee.iteye.com/blog/1691945
今日推荐