0

I have a oracle data guard setup with nodes - one as primary and other as physical standby. I also, have configured the data guard broker on it.

The problem is when I tried to switch over , I just get the above error. In switch over process using DGMGRL (data guard broker), it successfully do the job of switch over but it is not able to start the satndby database after the switch over.I manually have to start and mount the standby database. it gives the output like this:

DGMGRL> show configuration

Configuration - broker1

  Protection Mode: MaxAvailability
  Databases:
    pri  - Primary database
    stby - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

DGMGRL> switchover to stby
Performing switchover NOW, please wait...
Operation requires a connection to instance "stby" on database "stby"
Connecting to instance "stby"...
Connected.
New primary database "stby" is opening...
Operation requires startup of instance "pri" on database "pri"
Starting instance "pri"...
Unable to connect to database
ORA-12545: Connect failed because target host or object does not exist

Failed.
Warning: You are no longer connected to ORACLE.

Please complete the following steps to finish switchover:
        start up and mount instance "pri" of database "pri"

DGMGRL>

I also checked the tnsping and service name in the tnsnames.ora which is correct. content of tnsnames.ora file is:

 PRI =
   (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = vcslx502-rana-vm1)(PORT = 1521))
      (CONNECT_DATA =
        (SERVER = DEDICATED)
        (SERVICE_NAME = pri)
      )
   )


 STBY =
   (DESCRIPTION=
       (ADDRESS = (PROTOCOL = TCP) (HOST = vcslx502-rana-vm2) (PORT = 1521))
       (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = stby)
       )
   )

and the query result of service name is as follows: at primary:

SQL>  select value from v$parameter where name='service_names';

VALUE
--------------------------------------------------------------------------------
pri

and at standby:

SQL> select value from v$parameter where name='service_names';

VALUE
--------------------------------------------------------------------------------
stby

I also, have checked the services and found that these both services running. below is the result of that... at primary:

[oracle@vcslx502-rana-vm1 admin]$ lsnrctl services

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 24-SEP-2014 11:45:15

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
Services Summary...
Service "pri" has 2 instance(s).
  Instance "pri", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0
         LOCAL SERVER
  Instance "pri", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:1 refused:0 state:ready
         LOCAL SERVER
Service "priXDB" has 1 instance(s).
  Instance "pri", status READY, has 1 handler(s) for this service...
    Handler(s):
      "D000" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: vcslx502-rana-vm1, pid: 29432>
         (ADDRESS=(PROTOCOL=tcp)(HOST=vcslx502-rana-vm1)(PORT=28706))
Service "pri_DGB" has 1 instance(s).
  Instance "pri", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:1 refused:0 state:ready
         LOCAL SERVER
The command completed successfully

and at standby:

[oracle@vcslx502-rana-vm2 admin]$ lsnrctl services

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 24-SEP-2014 11:40:30

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
Services Summary...
Service "stby" has 2 instance(s).
  Instance "stby", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0
         LOCAL SERVER
  Instance "stby", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:1 refused:0 state:ready
         LOCAL SERVER
Service "stby_DGB" has 1 instance(s).
  Instance "stby", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:1 refused:0 state:ready
         LOCAL SERVER
The command completed successfully

Can someone please help me so that every time whenever I do switchover using DGMGRL, I don't have to start and mount the standby database?

one more thing, I can do switchover process manually by running every command needed without getting any such error.

Thanks, Rana

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.