This content has been marked as final. Show 4 replies
Hi,1 person found this helpful
Edited by: hitgon on Apr 30, 2012 11:55 AM
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.
On node1 - for srvc1 preferred instance is inst1 and available instance is inst2 and failover type is select.you have to create 2 service to achieve this.
On node2 - for same srvc1 service preferred instance is inst2 and available instance is inst1 and failover type is select
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
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:
"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 dispatcher for that instance
In a dedicated server configuration, a listener selects an instance in the following order:
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.