Tuesday, June 11, 2013

SQLServerDriver timeout

http://docs.oracle.com/cd/E21764_01/web.1111/e13753/mssqlserver.htm#i1074598

LoginTimeout The amount of time, in seconds, that the driver waits for a connection to be established before timing out the connection request.
Valid Values 0| x where x is a number of seconds.
If set to 0, the driver does not time out a connection request.
If set to x, the driver waits for the specified number of seconds before returning control to the application and throwing a timeout exception.
Default: 0
Data Type: int


QueryTimeout Sets the default query timeout (in seconds) for all statements created by a connection.
Valid Values: -1 |0 | x where x is a number of seconds.
If set to x, the driver uses the value as the default timeout for any statement created by the connection. To override the default timeout value set by this connection option, call the Statement.setQueryTimeout() method to set a timeout value for a particular statement.
If set to -1, the query timeout functionality is disabled. The driver silently ignores calls to the Statement.setQueryTimeout() method.
If set to 0 (the default), the default query timeout is infinite (the query does not time out).
Default: 0
Data Type: int


After you apply these settings QueryTimeout=60 and LoginTimeout=30 to the weblogic.jdbc.sqlserver.SQLServerDriver, you get this error message on test:

Connection test failed with the following exception: weblogic.common.resourcepool.ResourceDeadException: 0:weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: [FMWGEN][SQLServer JDBC Driver]Login has timed out.



No comments: