SQL Server获取数据库的当前连接状态

SELECT * FROM [Master].[dbo].[SYSPROCESSES] WHERE [DBID]=(SELECT [DBID] FROM [Master].[dbo].[SYSDATABASES] WHERE [NAME]='数据库名')

posted @ 2017-05-31 14:24  TanSea  阅读(593)  评论(0编辑  收藏  举报