I found a problem connecting my web application using JDBC or Spring to a SQLServer database (not Express).
At some point in my code, I call:
this.conn = DriverManager.getConnection(db_connect_string, db_userid, db_password);
and the application works correctly, but it waits and does not continue. The same thing happens with another web application:
getJdbcTemplate().query(...)
If I look at db using:
SELECT SPID, STATUS, PROGRAM_NAME, LOGINAME=RTRIM(LOGINAME), HOSTNAME, CMD FROM MASTER.DBO.SYSPROCESSES WHERE DB_NAME(DBID) = 'myDB' AND DBID != 0
I see that there is a connection, but "AWAITING COMMAND". No exception is handled; it just waits for something.
The SQL Server profiler for this connection (audit login) returns:
-- network protocol: TCP/IP set quoted_identifier on set arithabort off set numeric_roundabort off set ansi_warnings on set ansi_padding on set ansi_nulls on set concat_null_yields_null on set cursor_close_on_commit off set implicit_transactions off set language us_english set dateformat mdy set datefirst 7 set transaction isolation level read committed
It works until a few weeks ago. I think this should be related to the configuration of SQLServer, but I am pretty sure that I have not changed anything. We can eliminate the problem with the firewall, because the connection is correctly created. Can anyone help me please?
thanks Andrea
source share