Databases Reference
In-Depth Information
How It Works
Identifying RMAN server sessions is crucial for tasks such as terminating an unwanted RMAN session. The best way to
terminate an RMAN session that's executing commands is to simply use the Ctrl+C combination. You can kill a server
session corresponding to an RMAN channel by executing the SQL statement alter system kill session .
Dropping a Database Using the RMAN Client
Problem
You are planning to drop a database and want to make sure you drop all the data files, online logs, and control files
pertaining to the database. Of course, you can drop a database from SQL*Plus using the drop database command.
However, if you can't access SQL*Plus, you can drop a database from RMAN instead.
Solution
Use the drop database command to drop a database from the RMAN prompt. Here are the steps to follow:
1.
Start up the database in :mount exclusive mode:
SQL> startup mount exclusive;
ORACLE instance started.
Total System Global Area 626327552 bytes
Fixed Size 2263520 bytes
Variable Size 457180704 bytes
Database Buffers 163577856 bytes
Redo Buffers 3305472 bytes
Database mounted.
SQL> exit
2.
From the RMAN interface, use the following command to drop the database:
RMAN> connect target /
connected to target database: ORCL (DBID=1316762630, not open)
RMAN> drop database;
3.
RMAN will require a confirmation from you that you really do want to drop the database.
Respond with yes, if that's what you intend to do:
Do you really want to drop the database (enter YES or NO)? yes
Database dropped.
RMAN>
Note how RMAN prompts you if you really want to drop the target database. By using the optional keyword
noprompt , you can prevent such a message. However, considering how critical the dropping of a database is, you may
simply ignore the noprompt keyword.
 
Search WWH ::




Custom Search