Thursday, January 10, 2013

Oracle timeout or readtimeout or read_timeout


oracle.net.READ_TIMEOUT : Pass oracle.net.READ_TIMEOUT as connection property to enable read timeout on socket. The timeout value is in milliseconds.

oracle.jdbc.ReadTimeout : read timeout while reading from the socket. This affects thin driver only. Timeout is in milliseconds.

Example:

Properties prop = new Properties ();
prop.put ("user", "SCOTT");
prop.put ("password", "TIGER");
prop.put ("oracle.net.READ_TIMEOUT", "180000"); //Here 180000 is milliseconds i.e.180 seconds or 3 minutes.
prop.put ("oracle.jdbc.ReadTimeout", "180000");  //Here 180000 is milliseconds i.e.180 seconds or 3 minutes.
conn = DriverManager.getConnection (url, prop);

References:




Important: Read the following article also:



No comments:

Post a Comment