This discussion is archived
9 Replies Latest reply: Sep 8, 2013 7:03 PM by Hemant K Chitale RSS

Connectivity issue with RAC & Standby.

sanora600 Newbie
Currently Being Moderated

Hi Experts,

 

need your help!!

 

I have this connectivity in my tnsnames.ora (TWO_TASK=DBNAME_BALANCE). when i try to connect, sometime it gets me connected and some time it gives error as below, from this i can understand sometime when it is connecting it is mistakenly going to Dataguard node, hence getting this error. I just wanted to know the concept arround it, like below

 

1. How it choose the node where it needs to connect?

2. why is it going to standby node(data guard node)?

3. HOw service play a part in it?

4. Any other document which can clear the mist arround it.

 

 

sqlplus APPLSYSPUB/PUB

SQL*Plus: Release 10.1.0.5.0 - Production on Thu Aug 29 00:23:12 2013

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

ERROR:

ORA-01033: ORACLE initialization or shutdown in progress

 

 

 

 

Primary_node(rac)=rac*.xyz.com

datagurad_node(rac)=dg_rac*.xyz.com

 

DBNAME_BALANCE=

        (DESCRIPTION=

            (ADDRESS_LIST=

                (LOAD_BALANCE=YES)

                (FAILOVER=YES)

                (ADDRESS=(PROTOCOL=tcp)(HOST=rac101-vip.xyz.com)(PORT=1558))

                (ADDRESS=(PROTOCOL=tcp)(HOST=rac097-vip.xyz.com)(PORT=1558))

                (ADDRESS=(PROTOCOL=tcp)(HOST=rac098-vip.xyz.com)(PORT=1558))

                (ADDRESS=(PROTOCOL=tcp)(HOST=rac099-vip.xyz.com)(PORT=1558))

                (ADDRESS=(PROTOCOL=tcp)(HOST=dg_rac099-vip.xyz.com)(PORT=1558))

                (ADDRESS=(PROTOCOL=tcp)(HOST=dg_rac097-vip.xyz.com)(PORT=1558))

                (ADDRESS=(PROTOCOL=tcp)(HOST=dg_rac101-vip.xyz.com)(PORT=1558))

                (ADDRESS=(PROTOCOL=tcp)(HOST=dg_rac098-vip.xyz.com)(PORT=1558))

            )

            (CONNECT_DATA=

                (SERVICE_NAME=DBNAME.xyz.com)

            )

        )

  • 1. Re: Connectivity issue with RAC & Standby.
    Hemant K Chitale Oracle ACE
    Currently Being Moderated

    With LOAD_BALANCE, Oracle expects all addressses to be pointing to the same database --- thus it assumes that the dg_rac* addresses are the same database as the rac* addresses.

     

     

    Hemant K Chitale


  • 2. Re: Connectivity issue with RAC & Standby.
    sanora600 Newbie
    Currently Being Moderated

    There is a way to make the CLIENT aware that which is primary (rac*  or dg_rac*), that is the reason we have "srvctl add services ..... -primary"

  • 3. Re: Connectivity issue with RAC & Standby.
    Hemant K Chitale Oracle ACE
    Currently Being Moderated

    The *CLIENT* wouldn't be aware of what you've done through srvctl

     

    Hemant K Chitale

  • 4. Re: Connectivity issue with RAC & Standby.
    989730 Newbie
    Currently Being Moderated

    sorry, i meant that if we define the services using srvctl ...... -primary, then it will try to connect to only DB which is running in Primary mode, check the below syntax.

     

    srvctl add service -db db_unique_name -service service_name

      [-role [PRIMARY][,PHYSICAL_STANDBY][,LOGICAL_STANDBY][,SNAPSHOT_STANDBY]]

      [-policy {AUTOMATIC | MANUAL}]

      [-failovertype {NONE | SESSION | SELECT | TRANSACTION}]

      [-failovermethod {NONE | BASIC}] [-failoverdelay integer]

      [-failoverretry integer] [-clbgoal {SHORT | LONG}]

      [-rlbgoal {SERVICE_TIME | THROUGHPUT | NONE}] [-notification {TRUE | FALSE}]

      [-edition edition_name] [-pdb pluggable_database]

      [-sql_translation_profile sql_translation_profile]

      [-commit_outcome {TRUE | FALSE}] [-retention retention]

      [-replay_init_time replay_init_time] [-session_state {STATIC | DYNAMIC}]

      [-global {TRUE | FALSE}] [-maxlag max_lag_time] [-force] [-verbose]

  • 5. Re: Connectivity issue with RAC & Standby.
    Hemant K Chitale Oracle ACE
    Currently Being Moderated

    srvctl configures services on the server.  It doesn't configure every client (which is independently configured) to not attempt a connection to the standby.

    If the client-side tnsnames.ora has an entry for the standby with load_balancing, it will try to load balance connections between the primary and the standby !!!

    You would configure load_balancing on the client to connect between two nodes in a RAC environment (if pre-11gR2 SCAN)  or two databases that have synchronous replication (e.g advanced replication or golden gate).

     

     

    Hemant K Chitale


  • 6. Re: Connectivity issue with RAC & Standby.
    989730 Newbie
    Currently Being Moderated

    hi Hemanth,

     

    i have a similar configuration as in the first post i gave in production, and though the client has both  rac & dg_rac(given above) hostnames, the connection goes to only primary & never a connection is refused.... and I am trying to understand how?

     

    Thanks you,

    sanjay

  • 7. Re: Connectivity issue with RAC & Standby.
    Hemant K Chitale Oracle ACE
    Currently Being Moderated

    THINK About it !!   Do you want user sessions to be connecting to the Physical Standby (which may be not open or open only readonly) when the Primary is UP ?  WHY ?

     

    You should want *failover* from Primary to Standby.  NOT load balancing between the Primary and the Standby.

     

    Hemant K Chitale

  • 8. Re: Connectivity issue with RAC & Standby.
    989730 Newbie
    Currently Being Moderated

    can you please elaborate how the connection is going to only primary(irrespective of whether primary is dg_rac or rac). i just wanted to understand how it is working as client is unaware which of this is primary in this dg_rac or rac.

     

    Thank you,

    sanjay

  • 9. Re: Connectivity issue with RAC & Standby.
    Hemant K Chitale Oracle ACE
    Currently Being Moderated

    >i have a similar configuration as in the first post i gave in production, and though the client has both  rac & dg_rac(given above) hostnames, the connection goes to only primary & never a connection is refused

     

    I don't how how it is working "successfully" unless

    a).  You don't have LOAD_BALANCE configured

    OR

    b).  The DG is an Active DataGuard environment which allows Query sessions

     

     

    Hemant K Chitale

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points