Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
343 views
in Technique[技术] by (71.8m points)

sql - 如何查看活动的SQL Server连接?(How do I see active SQL Server connections?)

I am using SQL Server 2008 Enterprise.

(我正在使用SQL Server 2008 Enterprise。)

I want to see any active SQL Server connections, and the related information of all the connections, like from which IP address, connect to which database or something.

(我想查看任何活动的SQL Server连接,以及所有连接的相关信息,例如从哪个IP地址连接到哪个数据库或其他东西。)

Are there existing commands to solve this issue?

(是否存在解决此问题的命令?)

  ask by George2 translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can use the sp_who stored procedure.

(您可以使用sp_who存储过程。)

Provides information about current users, sessions, and processes in an instance of the Microsoft SQL Server Database Engine.

(提供有关Microsoft SQL Server数据库引擎实例中当前用户,会话和进程的信息。)

The information can be filtered to return only those processes that are not idle, that belong to a specific user, or that belong to a specific session.

(可以对信息进行过滤,以仅返回那些非空闲,属于特定用户或属于特定会话的进程。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...