Connect time fail over [message #447272] |
Fri, 12 March 2010 16:54 |
naren.sarkar
Messages: 16 Registered: April 2008
|
Junior Member |
|
|
I would like to implement connect time fail over from my JDBC thin client. The client will try to first connect with dedicated connection mode, if the connection time crosses more than two seconds, then connection will be opened with shared mode. To implement this, I have put the following connection string in my JDBC URL. I am able to connect to database with this URL, however it seems fail over does not work. Is it because, my database listener is not configured with dynamic service registration. If I implement the dynamic service registration, is fail over going to work? Note, I want to fail over in the same database instance but with different listener.
(DESCRIPTION_LIST =
(FAILOVER = TRUE)
(LOAD_BALANCE = FALSE)
(DESCRIPTION =
(CONNECT_TIMEOUT=2)
(RETRY_COUNT=0)
(ADDRESS =
(PROTOCOL = TCP)
(HOST = myhostt)
(PORT = 1862)
)
(CONNECT_DATA =
(SERVICE_NAME = service_name_1)
(SERVER = DEDICATED)
)
)
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = myhost)
(PORT = 1531)
)
(CONNECT_DATA =
(SERVICE_NAME = service_name_2)
(SERVER = SHARED)
)
)
)
[Updated on: Mon, 15 March 2010 11:47] by Moderator Report message to a moderator
|
|
|
|
Re: Connect time fail over [message #447355 is a reply to message #447276] |
Sat, 13 March 2010 21:48 |
naren.sarkar
Messages: 16 Registered: April 2008
|
Junior Member |
|
|
I know that JDBC driver does not use tnsname.ora. What I mean is tnsname string can be used as a jdbc connection string. I would like to implement connect time fail over in my JDBC connection. I hope, I am able to explain my requirement. I have read both thin and OCI driver support connect time fail over. However, I am unable to test this with static listener configuration.
|
|
|
|
Re: Connect time fail over [message #447358 is a reply to message #447272] |
Sat, 13 March 2010 22:07 |
naren.sarkar
Messages: 16 Registered: April 2008
|
Junior Member |
|
|
Thanks for giving this link. I know about it. Although, load balancing is working in my case. However, fail over is not working. My connection is working like a normal connection and simply ignoring failover setting. I am trying to failover to another listener for the same database instance.
|
|
|
|
|
|
|
|
|
Re: Connect time fail over [message #447520 is a reply to message #447517] |
Mon, 15 March 2010 12:29 |
|
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
>One listener will open the connection in the database in dedicated mode and other will open in shared mode.
As far as I know, it is not the listener that determines whether to use DEDICATED or SHARED mode, it is the client.
What leap in logic do you think that if there is a problem getting connected via DEDICATE mode, that this problem won't have the same negative impact on completing a new SHARED connection?
Instead if finding & fixing root cause, you are looking for SILVER BULLET solution.
|
|
|