方法1:
SELECT * FROM
[Master].[dbo].[SYSPROCESSES] WHERE [DBID]
IN
(
SELECT
[DBID]
FROM
[Master].[dbo].[SYSDATABASES]
WHERE
NAME='OIW21017'
)
方法2:
select * from [Master].[dbo].[SYSPROCESSES] where dbid = db_id('OIW12858')
断开会话:
语法:kill spid号
kill 82