DISQUS

Tech-Recipes: Dropping everything from an Oracle database | Oracle | Tech-Recipes

  • ptigga · 5 years ago
    Just a warning: On Oracle 10g this made my database completely unusable. I couldn't even login using SYSDBA. I could stop it but not start it again.

    It didn't matter too much because it was a development database that I wanted to drop the data from, but it did put the database in such a state that I couldn't reload a new file into it using imp.

    Instead I've had to use the Database Configuration Assistant to create a new blank database again.
  • u02sgb · 5 years ago
    Ok, sorry about that :oops: . I used to use this to wipe a database before reloading a backup. I've changed it so your no longer logging in as sys. I think the original way probably wiped out your data dictionary, Doh!
  • Anonymous · 4 years ago
    This is a vary bad idea. There are a number of schemas besides SYS and SYSTEM that need to be intact to have a usable database. It takes about 30 seconds to make a new blank database, much faster then dropping everything. Remove the database, rebuild it and reload your export.
  • alex · 10 months ago
    or you can drop specific users and all it's objects using:

    DROP USER <user_name> CASCADE
  • fabiyiolawale · 2 months ago
    I'm loving this..I am creating a database for an application called POSSE..Everytime i miss out a step or an error occur,i'll need to do that back again(i mean delete the DB and create a new 1)..now diz just helped me..nice work mate..cheers