Home » RDBMS Server » Networking and Gateways » Connect time fail over (Oracle 9.2.0.6, Linux 64 bit)
Connect time fail over [message #447272] Fri, 12 March 2010 16:54 Go to next message
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 #447276 is a reply to message #447272] Fri, 12 March 2010 17:06 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>I would like to implement connect time fail over from my JDBC thin client.

JDBC thin client does not use tnsnames.ora file.
Re: Connect time fail over [message #447355 is a reply to message #447276] Sat, 13 March 2010 21:48 Go to previous messageGo to next message
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 #447356 is a reply to message #447355] Sat, 13 March 2010 21:53 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
http://wiki.oracle.com/page/JDBC
Re: Connect time fail over [message #447358 is a reply to message #447272] Sat, 13 March 2010 22:07 Go to previous messageGo to next message
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 #447360 is a reply to message #447358] Sat, 13 March 2010 22:19 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
What evidence do you have that failover will/should work on obsoleted version (v9.2) in non-standard configuration (2 listeners on same DB)?
Re: Connect time fail over [message #447362 is a reply to message #447360] Sat, 13 March 2010 22:44 Go to previous messageGo to next message
naren.sarkar
Messages: 16
Registered: April 2008
Junior Member
I thought multiple listeners for the same database is helpful to distribute the client load. Do think multiple listeners for the same database are not advisable?
Re: Connect time fail over [message #447364 is a reply to message #447362] Sat, 13 March 2010 22:55 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>I thought multiple listeners for the same database is helpful to distribute the client load.
NO!

Oracle listener is NOT involved with interactions between client & DB.

Oracle listener only facilitates the initial connection request from client.
Re: Connect time fail over [message #447517 is a reply to message #447364] Mon, 15 March 2010 11:37 Go to previous messageGo to next message
naren.sarkar
Messages: 16
Registered: April 2008
Junior Member
Hi,
You were responding to my other posting related to slow connection which can be found here http://www.orafaq.com/forum/?t=msg&th=155987&123143/

In order to mitigate, slow connection in the production environment on urgent basis, we have devised above strategy. Let me explain the strategy. We have configured two listeners for the production database. One listener will open the connection in the database in dedicated mode and other will open in shared mode.

By default oracle client will try to connect to first listener(configured with dedicated mode), if connection is not opened within 2 seconds, then first listener will forward the request to second listener which is configured to open the connection in the shared mode.

I have learnt about this from below mentioned two articles.
http://www.akadia.com/services/ora_net8_failover.html
http://www.akadia.com/services/ora_net8_taf.html
Re: Connect time fail over [message #447518 is a reply to message #447517] Mon, 15 March 2010 11:50 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Good Luck with your snipe hunt

http://en.wikipedia.org/wiki/Snipe_hunt
Re: Connect time fail over [message #447519 is a reply to message #447517] Mon, 15 March 2010 11:50 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
This is a very interesting question, I don't know the answer and hope you will find and share it with us.

Regards
Michel
Re: Connect time fail over [message #447520 is a reply to message #447517] Mon, 15 March 2010 12:29 Go to previous message
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.
Previous Topic: Oracle Heteregenous Services
Next Topic: Oracle forms login problem
Goto Forum:
  


Current Time: Thu Nov 21 11:12:47 CST 2024