This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,294 Users
  • 2,269,776 Discussions
  • 7,916,824 Comments

Discussions

How to configure a TCP Keep-alive in JDBC connection string

Hello,

I am using a JDBC connection string to connect to an oracle database, I am having idle connections because the response time is greater than 350 seg. therefore I am trying to add in the JDBC connection new network parameters but in my test identified that I have not sent a keep-alive packed I have doubts about the configuration, Could you help me with an example ?

My JDBC connection:

jdbc:oracle:thin:@(DESCRIPTION=(FAILOVER=on)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.4.50)(PORT=1522)))(CONNECT_DATA=(SERVICE_NAME=GTRPRSVCOS)))

New parameters:

ENABLE=BROKEN, SO_KEEPALIVE, TCP_KEEPIDLE, TCP_KEEPINTVL, TCP_KEEPCNT

jdbc:oracle:thin:@(DESCRIPTION=(FAILOVER=on)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.4.50)(PORT=1522)))(CONNECT_DATA=(SERVICE_NAME=GTRPRSVCOS))(ENABLE=BROKEN)(SO_KEEPALIVE=true)(TCP_KEEPIDLE=60)(TCP_KEEPINTVL=30)(TCP_KEEPCNT=15)) 

I appreciate your help,

Tagged:

Answers