To see witch session id, that run command against a database, you can run this:
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:
SELECT session_id
FROM sys.dm_exec_sessions
WHERE database_id = db_id('DBName')