Friday, March 11, 2011

Drop database; SQL*Plus command

This command was introduced in Oracle10g and is very efficient.
The command will clean up all datafiles, online redo log files, controlfiles and spfile. It will not touch pfile & password file. On windows server, the service need to be deleted manually.
In case, one wants to remove archivelogs & backups execute this command from RMAN using the 'Including backups' option.
Word of caution here:::All RMAN backups associated with target database will be deleted from all configured device types.
Steps:
shutdown abort;  
startup mount exclusive restrict;   
drop database;  
Oracle mentions in it's document... that user must have SYSDBA system privilege to issue this statement. The database must be mounted in exclusive and restricted mode, and it must be closed.

Link::
http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/statements_8009.htm#i215798

2 comments:

  1. Hi Tejinder,
    I'm Shyju working in an IT firm in Dubai. I have find your blog which is very informative and I'm sure you have good knowledge in Oracle. I'm very new to Oracle and E-Business Suite. Here we have installed e-business suite 12 and Vision Database in a Windows 2003 machine. Now I want to access the Vision database. I can login to e-business suite with user which is there in Vision database(ie. username: cbrown and password:welcome).,and I have got sysadmin access also, but I could not find the table where the user cbrown resides.
    Can you give me some suggestions to find that table (using SQL+ or any other oracle client).

    ReplyDelete
  2. Hi Shyju,
    All users informations would be in system tables.
    eg: as in oracle it would be dba_users

    ReplyDelete