Home » Server Options » Data Guard » dropping RAC standby database (Oracle12c)
dropping RAC standby database [message #657828] Wed, 23 November 2016 16:19 Go to next message
shrinika
Messages: 306
Registered: April 2008
Senior Member
I have two node RAC standby database. It is broken few months ago
and i need to rebuild from the scratch.

I need to drop the broken database before i restore.

Oracle recommedation is to use DBCA as per the below link.

https://docs.oracle.com/database/121/RILIN/dbcacrea.htm#RILIN405

I have some issue with x-window on my environment...

Can i use DROP DATABASE command to drop the RAC standby database?

Please let me know...
Re: dropping RAC standby database [message #657829 is a reply to message #657828] Wed, 23 November 2016 17:47 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Can i use DROP DATABASE command to drop the RAC standby database?
I give up.
Can you?
What happened when you issued DROP DATABASE command?

which OS name & version?
Re: dropping RAC standby database [message #657865 is a reply to message #657829] Thu, 24 November 2016 16:50 Go to previous messageGo to next message
shrinika
Messages: 306
Registered: April 2008
Senior Member
What happened when you issued DROP DATABASE command?

Not yet tried.. It is production.. just want to check before i try.

It is Redhat linux 6
Re: dropping RAC standby database [message #657868 is a reply to message #657865] Thu, 24 November 2016 18:04 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
shrinika wrote on Thu, 24 November 2016 14:50
What happened when you issued DROP DATABASE command?

Not yet tried.. It is production.. just want to check before i try.

It is Redhat linux 6
Some, many, most IT professionals actually test code.
Are you claiming that you do not have a test environment to test against?
Re: dropping RAC standby database [message #657873 is a reply to message #657865] Fri, 25 November 2016 01:23 Go to previous messageGo to next message
John Watson
Messages: 8960
Registered: January 2010
Location: Global Village
Senior Member
Just do it, man. If it doesn't work, do it manually:

Delete the files
Remove the registration from the OCR
Remove the Data Guard Broker configuration

You'll have to do those checks anyway, to make sure that it is really gone.
Re: dropping RAC standby database [message #657915 is a reply to message #657828] Sat, 26 November 2016 15:10 Go to previous messageGo to next message
shrinika
Messages: 306
Registered: April 2008
Senior Member
thanks. will do!
Re: dropping RAC standby database [message #658024 is a reply to message #657828] Wed, 30 November 2016 21:31 Go to previous messageGo to next message
shrinika
Messages: 306
Registered: April 2008
Senior Member
I dropped RAC database manually..

I still see the DB name when i run crsctl status resource -t command.

Here are the steps i followed..

Step1 shutdown both instance.


SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
TEST1

SQL>  shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
TEST2

SQL>  shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>

Step2 start the first instance with restrict mode

SQL> startup mount  restrict;
ORACLE instance started.

Total System Global Area  524288000 bytes
Fixed Size                  2926320 bytes
Variable Size             436209936 bytes
Database Buffers           79691776 bytes
Redo Buffers                5459968 bytes
Database mounted.
SQL>  alter system set cluster_database=FALSE scope=spfile;

System altered.

SQL> shutdown immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup mount restrict
ORACLE instance started.

Total System Global Area  524288000 bytes
Fixed Size                  2926320 bytes
Variable Size             415238416 bytes
Database Buffers          100663296 bytes
Redo Buffers                5459968 bytes
Database mounted.
SQL>

step3 drop the database

SQL> drop database;

Database dropped.

SQL>

[oracle@usbenhost01 ~]$ srvctl status database -d TEST
Instance TEST1 is not running on node usbenhost01
Instance TEST2 is not running on node usbenhost02
[oracle@usbenhost01 ~]$

step4 Remove the db from OCR

[oracle@usbenhost01 ~]$ srvctl remove database -d TEST
Remove the database TEST? (y/[n]) y
[oracle@usbenhost01 ~]$  srvctl status database -d TEST
PRCD-1120 : The resource for database TEST could not be found.
PRCR-1001 : Resource ora.test.db does not exist


Every thing looks good so far..

Why still TEST database name(ora.TEST.dg) is still appearing below?

Any clarification is much appreciated..


[oracle@usbenhost01 ~]$  crsctl status resource -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details                                                                                                                                                                   
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       usbenhost01              STABLE
               ONLINE  ONLINE       usbenhost02              STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       usbenhost01              STABLE
               ONLINE  ONLINE       usbenhost02              STABLE
ora.TEST.dg
               ONLINE  ONLINE       usbenhost01              STABLE
               ONLINE  ONLINE       usbenhost02              STABLE
ora.asm
               ONLINE  ONLINE       usbenhost01              Started,STABLE
               ONLINE  ONLINE       usbenhost02              Started,STABLE
ora.net1.network
               ONLINE  ONLINE       usbenhost01              STABLE
               ONLINE  ONLINE       usbenhost02              STABLE
ora.ons
               ONLINE  ONLINE       usbenhost01              STABLE
               ONLINE  ONLINE       usbenhost02              STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       usbenhost02              STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       usbenhost01              STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       usbenhost01              STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       usbenhost01              169.254.59.131 192.                                                                                                                                                             1
                                                             68.1.101,STABLE
ora.cvu
      1        ONLINE  ONLINE       usbenhost01              STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       usbenhost01              Open,STABLE
ora.oc4j
      1        ONLINE  ONLINE       usbenhost01              STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       usbenhost02              STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       usbenhost01              STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       usbenhost01              STABLE
ora.usben.db
      1        ONLINE  ONLINE       usbenhost01              Open,STABLE
      2        ONLINE  ONLINE       usbenhost02              Open,STABLE
ora.usbenhost01.vip
      1        ONLINE  ONLINE       usbenhost01              STABLE
ora.usbenhost02.vip
      1        ONLINE  ONLINE       usbenhost02              STABLE
--------------------------------------------------------------------------------
[oracle@usbenhost01 ~]$

Re: dropping RAC standby database [message #658035 is a reply to message #658024] Thu, 01 December 2016 02:36 Go to previous messageGo to next message
John Watson
Messages: 8960
Registered: January 2010
Location: Global Village
Senior Member
THat is disc group, not a database.
Re: dropping RAC standby database [message #658050 is a reply to message #657828] Thu, 01 December 2016 09:05 Go to previous message
shrinika
Messages: 306
Registered: April 2008
Senior Member
oh... thanks John!

Good catch.
Previous Topic: Activate 2nd standby database as primary
Next Topic: Physical Standby
Goto Forum:
  


Current Time: Mon Nov 18 10:20:57 CST 2024