DBAsupport.com Forums - Powered by vBulletin
Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: how to delete a DATABASE from command prompt ?

  1. #11
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    One sure fire method for deletion would be:
    cd /
    rm -R *

    this works best if you can do an su first.


    But if you want to keep you job you can log in as sys and do an alter database backup controlfile to trace, shut down the database and look for the file in the trace directory and it will tell you where all of the files are located. If this was NT/2000/XP then you could use the ORADIM command to remove the database. If it is Unix and you don't want to try the previous method then you need to delete the database files and edit the following files: oratab, tnsnames.ora and listener.ora, removing any references to the database you are deleting. You could also just shut down the database and set the :Y to :N for that database in the oratab to keep it from restarting on reboot. Becuase as soon as you delete the database someone will want it. I deleted an Oracle 8.0.6 database recently and the next day someone wanted it to compile some old code. Just my thoughts.

  2. #12
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    If u delete the way suggested by all these guys will ofcourse do, but if u have WIN as OS then the registry contents will be left with & u cant do anything but to delete manually if u know have knowledge of contests in registry .

    If u delete manully all the said files and say u want to create a new DB with that DB name u were using, OS will not allow u to do so as u r left with registry contents.....

    S if u use ORDIM then it will delete service & contents in registry as well.

    Regrds
    abhay.
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

  3. #13
    Join Date
    May 2002
    Posts
    2,645
    Originally posted by abhaysk

    S if u use ORDIM then it will delete service & contents in registry as well.
    That would be ORADIM.

  4. #14
    Join Date
    Nov 2002
    Location
    Dublin, Ireland
    Posts
    133
    And also comment out or delete your bad db line from the "oratab" file - should be in /var/opt/oracle
    What else?
    Giani

  5. #15
    Join Date
    Nov 2002
    Location
    Dublin, Ireland
    Posts
    133
    ohh... remove the password file as welll
    $ORACLE_HOME/dbs/orapw$ORACLE_SID
    make sure to remove the right one.
    Giani

  6. #16
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434

    Smile

    Originally posted by stecal
    That would be ORADIM.
    Stecal :

    That was typing mistake
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

  7. #17
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    Use this to identify all files:

    select name from v$controlfile
    union all
    select member from v$logfile
    union all
    select name from v$datafile
    union all
    select name from v$tempfile;

    Nobody seemed to mention v$tempfile.
    And be careful with the listener. Some other DBs might be using it.
    Oracle Certified Master
    Oracle Certified Professional 6i,8i,9i,10g,11g,12c
    email: ocp_9i@yahoo.com

  8. #18
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    I hope someone from Oracle is reading this!? Goes in the same category as uninstalling version 7 in NT. Rumours have it that version 12i will come bundled with crow-bar, flame-thrower and machette (part of DBA Studio).
    "The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width