You are here:

Oracle/Clearing Oracle Database

Advertisement


Question
Hi.
I have a question about how to clearing Oracle 10.2.0.3 Database (clearing database files, free it) without deleteing it. Program which i use is in test implementation thats why I need restore backed up database very frequently and then import existing data.
How can I clear (drop) all data (tables, indexes ...)
from Oracle DataBase Instance to make it like just created one.
Thanks.

Answer
Hi Magerram,

NOTE: This will remove the database as well as all the data in this database. Tables and tablespaces will be dropped and removed!

SQL> shutdown abort;
SQL> startup mount exclusive restrict;
SQL> drop database;
SQL> exit

Reference: http://www.adp-gmbh.ch/ora/sql/drop_database.html

Alternatively, you can run the dbca (on either MS-Windows or Unix based operating system). The "Database Configuration Assistant" can also be used to drop your database using its GUI application.

Hope this helps.

Peter  

Oracle

All Answers


Answers by Expert:


Ask Experts

Volunteer


Peter Choi

Expertise

I am a senior Oracle DBA, PeopleSoft HCM specialist and Project Manager with 15+ years experience. I have been working with PeopleSoft (HRMS/HCM 5, 7, 7.x and 8.9, 9.x), Oracle RDBMS (7.3 - 11gR2) on various Unix and MS-Windows platforms, and some Oracle Application Server (9i - 11gR1). I also have experience with the configuration and administration of PeopleSoft's Internet Architecture (PIA) and the Oracle 11g Fusion Middleware and Oracle Business Intelligence (OBI).

©2012 About.com, a part of The New York Times Company. All rights reserved.