如何用存储过程获取连接特定数据库的当前连接数?

chenylin 2003-05-06 12:12:53
如何用存储过程获取连接特定数据库的当前连接数?
比如:连接到TEST数据库
...全文
25 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
chenylin 2003-05-07
  • 打赏
  • 举报
回复
hugjchina(初学者):
谢谢您的指点,问题已解决,再一次谢谢!
Chenylin
hugjchina 2003-05-06
  • 打赏
  • 举报
回复

declare @t_num int
select @t_num = count(*) from sysprocesses where dbid=db_id('master')
print @t_num

34,593

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧