RE: Oracle RAC service/instance mapping question

From: John Hallas <john.hallas_at_bjss.co.uk>
Date: Thu, 17 Apr 2008 17:07:18 +0100
Message-ID: <E02CB9B2777CF8459C86C49B48C48EC603C0ECDC@exchange.bjss.co.uk>


srvctl add service -d RAC1 -s service1 -r RAC1 -a RAC2 srvctl add service -d RAC2 -s service2 -r RAC2 -a RAC1

Where -r is preferred and -a is available

To force a service back to the original node after failover use

srvctl relocate service -d TEST -s service1 -i RAC2 -t RAC1

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Harvinder Singh Sent: 17 April 2008 16:21
To: oracle-l_at_freelists.org
Subject: Oracle RAC service/instance mapping question

Hi,

We have a 2 node cluster Oracle 10g on Linux AS4 in a test environment. Database Name : Test
Service: Both RAC1 and RAC2 as primary
Service1 : RAC1 is primary and RAC2 is failover Service2 : RAC2 is primary and RAC1 is failover Since we are using distributed transactions we are using load_balancing and service_name (service1 and service2) in tnsnames.ora on application machines.
Application server1 tnsnames entry:
test =
  (DESCRIPTION =
    (ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.101)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.102)(PORT = 1521))
    )
    (CONNECT_DATA =
(SERVICE_NAME = service1)
(fail_over = on)

    )
  )

Application server2 tnsnames entry:
test =
  (DESCRIPTION =
    (ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.102)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.101)(PORT = 1521))
    )
    (CONNECT_DATA =
(SERVICE_NAME = service2)
(fail_over = on)

    )
  )

We have setup both the remote and local listener parameters and everything looks fine and lsnrctl status shows the following information:
Service "service1" has 1 instance(s).
  Instance "rac1", status READY, has 1 handler(s) for this service... Service "service2" has 1 instance(s).
  Instance "rac2", status READY, has 2 handler(s) for this service...

When we shutdown the rac2, service2 is serviced by rac1 and we can see following in the listener status:
Service "service1" has 1 instance(s).
  Instance "rac1", status READY, has 1 handler(s) for this service... Service "service2" has 1 instance(s).
  Instance "rac1", status READY, has 1 handler(s) for this service...

Now all the connections from both application machines goes to instance "RAC1", Now when the RAC2 is started again all the connections are still going to RAC1 and we are not using resources of RAC2. What command or steps we need to do to make sure that when RAC2 server is up all the request for service2 connections starts going to RAC2 and not RAC1?

Thanks
--Harvinder  

--
http://www.freelists.org/webpage/oracle-l




The information included in this email and any files transmitted with it may contain information that is confidential and it must not be used by, or its contents or attachments copied or disclosed, to persons other than the intended addressee. If you have received this email in error, please notify BJSS.
In the absence of written agreement to the contrary BJSS’ relevant standard terms of contract for any work to be undertaken will apply.
Please carry out virus or such other checks as you consider appropriate in respect of this email. BJSS do not accept responsibility for any adverse effect upon your system or data in relation to this email or any files transmitted with it.
BJSS Limited, a company registered in England and Wales (Company Number 2777575), VAT Registration Number 613295452, Registered Office Address, First Floor, Coronet House, Queen Street, Leeds, LS1 2TW
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Apr 17 2008 - 11:07:18 CDT

Original text of this message