2 Replies Latest reply: Oct 18, 2012 10:46 AM by expressoteam RSS

    connection strings for clients at time of failover or switchover

    User447797-OC
      Hi

      Oracle RDBMS 11.2.0.2, 4 node RAC, ASM on RHEL 5.6

      We created one physical standby dataabse. How do we need to create oracle net connection strings for clients to connect. And how to make it unchanged even at time of failover or switchover, without any change at the client after failover or switchover so that client doesn't know the conversion.
        • 1. Re: connection strings for clients at time of failover or switchover
          mseberg
          Hello;

          Transparent Application Failover for Data Guard

          Example one :
          ernie =
           (DESCRIPTION =
              (ADDRESS_LIST =
                 (ADDRESS = (PROTOCOL = TCP)(HOST = primary.host)(PORT = 1521))
                 (ADDRESS = (PROTOCOL = TCP)(HOST = standby.host)(PORT = 1521))
                 )
                 (CONNECT_DATA =
                 (SERVICE_NAME = ernie)
              )
           )
           
          Example two :
          BEGIN
           
             DBMS_SERVICE.CREATE_SERVICE('ernie','ernie');
          
          END;
          Example three :
           BEGIN
           
             DBMS_SERVICE.START_SERVICE('ernie');
          
           END;
           /
          Example four
          BEGIN
             DBMS_SERVICE.MODIFY_SERVICE
             ('ernie',
             FAILOVER_METHOD => 'BASIC',
             FAILOVER_TYPE => 'SELECT',
             FAILOVER_RETRIES => 200,
             FAILOVER_DELAY => 1);
          END;
          /
          Example five :
          CREATE TRIGGER CHECK_ERNIE_START AFTER STARTUP ON DATABASE
          DECLARE
           V_ROLE VARCHAR(30);
          BEGIN
           SELECT DATABASE_ROLE INTO V_ROLE FROM V$DATABASE;
           IF V_ROLE = 'PRIMARY' THEN
           DBMS_SERVICE.START_SERVICE('ernie');
           ELSE
           DBMS_SERVICE.STOP_SERVICE('ernie');
           END IF;
          END;
          /
          Best Regards

          mseberg
          • 2. Re: connection strings for clients at time of failover or switchover
            expressoteam
            for details on mseberg steps check:

            http://uhesse.com/2009/08/19/connect-time-failover-transparent-application-failover-for-data-guard/


            hth