To see witch session id, that run command against a database, you can run this:
1 2 3 |
SELECT session_id FROM sys.dm_exec_sessions WHERE database_id = db_id('DBName') |
To see witch session id, that run command against a database, you can run this:
1 2 3 |
SELECT session_id FROM sys.dm_exec_sessions WHERE database_id = db_id('DBName') |