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
    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;
  3. Now go and cleanup those files!

Tags: , , ,

Leave a Comment