How to detect SqlServer connection leaks in a ASP.net applications?

Found this thread researching a similar problem. I came up with the following sql as a good way to debug leaky connections in SQL Server: SELECT S.spid, login_time, last_batch, status, hostname, program_name, cmd, ( select text from sys.dm_exec_sql_text(S.sql_handle) ) as last_sql FROM sys.sysprocesses S where dbid > 0 and DB_NAME(dbid) = ‘<my_database_name>’ and loginame=”<my_application_login>” order … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)