Drop [oracle] database (and clean after yourself)

Hey I’ve got to document this so I don’t forget how to cleanup after myself:

  1. FIRST, find out which files to cleanup after dropping the database thanks to geekinterview.com
    select * from dba_data_files;
    select * from v$logfile;
    select * from v$controlfile;
    archive log list
    initSID.ora
    In addition you can clean the UDUMP, BDUMP, scripts etc
  2. Now go ahead and drop that datatabase (the one that’s already backed up):
    ORACLE_SID=<OAS Repository SID>
    export ORACLE_SID
    sqlplus /nolog
    conn / as sysdba
    shutdown immediate
    startup mount exclusive restrict;
    drop database;
    exit
  3. Now go and cleanup those files!
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s