4 Replies Latest reply: Apr 30, 2012 2:23 PM by onedbguru RSS

    RAC Services in 11gR2

    sandeep_dba
      Hi,

      Need clarification on services.

      I've a 2node RAC 11gR2.
      I want to configure service for example srvc1 on both node1& node2 with the following features.
      On node1 - for srvc1 preferred instance is inst1 and available instance is inst2 and failover type is select.
      On node2 - for same srvc1 service preferred instance is inst2 and available instance is inst1 and failover type is select
      and as well load balance need to done between node1& node2.

      So that what ever session connected to node1 will failover to node2 and vice versa and load balance will be happened.

      In this way is it possible to configure the same service on 2 nodes?

      Thanks,
      Sandeep
        • 1. Re: RAC Services in 11gR2
          hitgon
          Hi,

          http://docs.oracle.com/cd/E11882_01/rac.112/e17264/configwlm.htm


          http://www.ardentperf.com/pub/schneider-services.pdf

          Regards
          Hitgon

          Edited by: hitgon on Apr 30, 2012 11:55 AM
          • 2. Re: RAC Services in 11gR2
            sandeep_dba
            Hi,

            Thanks for the reply.

            Could you please confirm, is it possible to create services in that fashion as i mentioned in my thread?
            If yes, how to create a single service to serve both load balance and as well failover on both nodes.


            Thanks,
            Sandeep
            • 3. Re: RAC Services in 11gR2
              kuljeet singh -
              On node1 - for srvc1 preferred instance is inst1 and available instance is inst2 and failover type is select.
              On node2 - for same srvc1 service preferred instance is inst2 and available instance is inst1 and failover type is select
              you have to create 2 service to achieve this.
              see below
              srvctl add service -d DBNAME -s SRVC1 -r inst1 -a inst2 -P BASIC -e SELECT -m BASIC -z 180 -w 5
              srvctl add service -d DBNAME -s SRVC2 -r inst2 -a inst1 -P BASIC -e SELECT -m BASIC -z 180 -w 5
              • 4. Re: RAC Services in 11gR2
                onedbguru
                Here is a good place to start: http://docs.oracle.com/cd/E11882_01/rac.112/e16795/hafeats.htm
                A service created as -r node1,nod2 will load balance **AND** fail over to the other node automatically - regardless of which instance you connected initially. If you are using SCAN, again don't try to something manually that is already being done for you by Oracle. Most that try to out-think SCAN usually get it wrong.

                Some light reading:

                http://www.oracle.com/technetwork/database/features/availability/maa-wp-11gr2-client-failover-173305.pdf

                From:
                http://docs.oracle.com/cd/E11882_01/network.112/e10836/concepts.htm

                "Due to dynamic service registration, a listener is always aware of all instances and dispatchers regardless of their location. Depending on the load information, a listener decides which instance and, if shared server is configured, to which dispatcher to send the incoming client request.

                In a shared server configuration, a listener selects a dispatcher in the following order:

                Least-loaded node
                Least-loaded instance
                Least-loaded dispatcher for that instance
                In a dedicated server configuration, a listener selects an instance in the following order:

                Least-loaded node
                Least-loaded instance
                If a database service has multiple instances on multiple nodes, then the listener chooses the least-loaded instance on the least-loaded node. If shared server is configured, then the least-loaded dispatcher of the selected instance is chosen.
                "