Tabs

Friday, January 9, 2015

Drop database in 11gR2 with RAC

I am planning to remove my cluster database which is running on 11gR2

Stop the entire cluster environment  
Murali[KMM]>srvctl stop database -d KMM_a

Start only one instance to edit the cluster_database parameter to FALSE

Murali[KMM]>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Fri Feb 10 16:03:03 2012

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup mount
ORACLE instance started.

Total System Global Area 2.6924E+10 bytes
Fixed Size                  2241104 bytes
Variable Size            1.3086E+10 bytes
Database Buffers         1.3824E+10 bytes
Redo Buffers               11227136 bytes
Database mounted.


SQL> alter system set cluster_database=FALSE scope=spfile sid='*';

System altered.


SQL> shutdown abort;
ORACLE instance shut down.

Now starting only one instance after editing below parameter CLUSTER_DATABASE parameters to FALSE

SQL> startup mount exclusive restrict
ORACLE instance started.

Total System Global Area 2.6924E+10 bytes
Fixed Size                  2241104 bytes
Variable Size            1.3086E+10 bytes
Database Buffers         1.3824E+10 bytes
Redo Buffers               11227136 bytes
Database mounted.

Make sure whether you have started in the restricted mode

SQL>  select logins,parallel from v$instance;

LOGINS     PAR
---------- ---
RESTRICTED NO

When you issue this command, this will drop the database including datafiles, control files, redo log files & archive log files

SQL> drop database;

Database dropped.

To drop the database including the backup, we can go for the below option
RMAN> DROP DATABASE INCLUDING BACKUPS NOPROMPT;

Murali[KMM]>srvctl  remove database -d dbname

No comments:

Post a Comment

Thank you for your Suggestions...