 |
|
ss
Oracle Tips by Burleson |
Database Deletion
Databases are deleted by shutting them down
and then removing all of their associated files from the system. No
command to perform this is provided by Oracle prior to Oracle9i. In
Oracle9i, the DROP TABLESPACE command enables the DBA to drop the
operating system files, as well as the logical database structures.
The Database Creation Assistant (DBCA) does allow a DBA to remove a
database in 8i and 9i. Let's look at an example using the DBCA on
Linux.
The DBCA is started by issuing the DBCA
command at the Oracle user in Linux or UNIX (or selecting it from
the appropriate menu in Windows or NT.) The first screen that is
displayed is shown in Figure 2.21. Select the Next button to display
the Operations screen (see Figure 2.22). There, select the option
Delete a Database and then select the Next button.
Welcome Screen of the Database Configuration
Assistant
Operations screen of the Database
Configuration Assistant.
The DBCA will display the Database screen
next (shown in Figure 2.23). On the Database screen, select the
database you wish to delete and then select the Next button.
Database screen of the Database
Configuration Assistant.
Once you have made a database selection, the
DBCA will show a Summary screen (shown in Figure 2.24) to give you a
first chance to abort the deletion, just in case you chose the wrong
database SID on the previous screen. Once you have verified that the
database being deleted is in fact the one you want deleted, select
the OK button to continue with the deletion process.
Summary Screen of the Database Configuration
Assistant
After you select OK on the Summary screen,
the DBCA program gives you one last chance to decide not to delete
the instance. This screen isn't titled, so I call it the "Are you
really, really sure" screen; it’s shown in Figure 2.25.. If you are
really, really sure you want to delete the database, select Yes, and
the delete operation will commence. This is the point of no return.
The "Are you really, really sure?" screen of
the Database Configuration Assistant.
The next screen shown in the DBCA for the
database deletion process displays the actual deletion status
(Figure 2.26), that is, the progression through the various steps of
deleting a database: connect, delete the instance and datafiles, and
update network files. Following the final step, the DBCA
automatically goes to the completion screen.
Database deletion status screen of the
Database Configuration Assistant.
The final screen of the deletion process is
the Database Deletion Completed screen )shown in Figure 2.27). It
asks the question "Do you want to perform another operation?" The
choices are Yes, to return to DBCA, or No, exit from DBCA. If you
are done deleting databases, choose No.
Database deletion completion screen of the
Database Configuration Assistant.
Manual Database Deletion
If you must manually delete a database,
first log in as a DBA account, then use the following commands to
get a listing of all the datafiles associate with the database:
See Code Depot
Once you have your file listing, shut down
the database. And I suggest doing a complete, final backup (rest
assured, someone will require something from this database sometime
in the future) of the database before deleting it.

www.oracle-script.com |