Hi,
I have created a JDBC connection to a SQL database, using the typical connection settings:
Transaction Type NO_TRANSACTION
DataSource Class com.microsoft.jdbcx.sqlserver.SQLServerDataSource
portNumber 1433
networkProtocol
Other Properties selectedMethod=Cursor
Enable Connection Pooling true
Minimum Pool Size 0
Maximum Pool Size 10
Pool Increment Size 1
Block Timeout (msec) 30000
Expire Timeout (msec) 30000
Startup Retry Count 2
Startup Backoff Timeout (sec) 10
I then have an adapter service which has 1 input parameter and should retrieve anywhere from zero to 10 (max) records. It’s taking almost 20 seconds to retrieve the data.
If I run the same Select statement in MS Query Analyzer, it barely takes a second.
Try the IP Address of the Database instead of the hostname. Perhaps the hostname resolution is slow.
If the problem still remains, get thread dumps, which will show where your service is waiting. If it’s waiting for response from the database, then check with your DBA.