Hi,
I created a new service in rac database with 2 instances with rac 1 as prefered instance and rac 2 as available instance.I created the following tns and listener entries
devtest =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = fusion-vip)(PORT = 1522))
(ADDRESS = (PROTOCOL = TCP)(HOST = fusion2-vip)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = devtest)
)
)
Node 1 fusion listener
LISTENER1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = fusion-vip)(PORT = 1522))
# (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
)
)
SID_LIST_LISTENER1=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=devtest)
(ORACLE_HOME=/ora11g/app1/oracle/product/11.2.0)
(SID_NAME=dev1))
)
Node 2 fusion2 listener
LISTENER1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = fusion2-vip)(PORT = 1522))
# (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
)
)
SID_LIST_LISTENER1=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=devtest)
(ORACLE_HOME=/ora11g/app1/oracle/product/11.2.0)
(SID_NAME=dev2))
)
Here is the config of the service
./srvctl config service -s devtest -d dev
Service name: devtest
Service is enabled
Server pool: dev_devtest
Cardinality: 1
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: NONE
Failover method: NONE
TAF failover retries: 0
TAF failover delay: 0
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: NONE
Preferred instances: dev1
Available instances: dev2
As expected when both the instances are up and when I make a connection using connection string devtest the connection goes to the prefered instance dev1.
But when I bring down the listener in fusion(node 1 with prefered instance) and make a new connection with 'devtest' the connection goes to instance 2 even though the service hasn't failed over.Is it the expected behaviour or am i missing something.