Sql Server活动监视器中的这个进程是什么?

发布于 2024-07-16 23:19:55 字数 316 浏览 4 评论 0原文

SQL Server 2005 活动监视器中有一个进程似乎一直在运行。 双击它会产生以下查询:

CREATE TABLE #tmpDBCCinputbuffer ([EVENT TYPE] NVARCHAR(512), [参数] INT、[事件信息] NVARCHAR(512)) INSERT INTO #tmpDBCCinputbuffer EXEC ('DBCC INPUTBUFFER(58)') 从#tmpDBCCinputbuffer 中选择[事件信息]

知道它是什么吗? 危险吗?

There is a process that seems to be running all the time in SQL Server 2005 activity monitor. Double clicking on it produces the following query:

CREATE TABLE #tmpDBCCinputbuffer ([EVENT TYPE] NVARCHAR(512),
[PARAMETERS] INT, [EVENT Info] NVARCHAR(512))
INSERT INTO #tmpDBCCinputbuffer EXEC ('DBCC INPUTBUFFER(58)')
SELECT [EVENT Info] FROM #tmpDBCCinputbuffer

Any idea what it is? Is it dangerous?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

﹏雨一样淡蓝的深情 2024-07-23 23:19:55

具有讽刺意味的是,它是您用来查看连接上运行的最后一个查询的查询,这就是您要查看所有连接的最后一个查询是什么的操作。 包括您用来查看所有这些连接的连接。

当你需要的时候头晕的表情符号在哪里?

Ironically, its the query you use to see the last query run on a connection, which is what you are doing to see what all the connections' last queries were. Including the connection you use to look at all those connections.

where's the dizzy emoticon when you need it?

清欢 2024-07-23 23:19:55

http://msdn.microsoft.com/en-us/library/ms187730。 aspx

引自 SQL Server 开发中心

“DBCC INPUTBUFFER 权限默认
系统管理员修复的成员
仅服务器角色,谁可以看到任何
SPID。 其他用户可以看到任何 SPID
他们拥有。 权限没有
可转让。”
(http://msdn.microsoft.com/en- us/library/aa258826(SQL.80).aspx)

http://msdn.microsoft.com/en-us/library/ms187730.aspx

Quote from SQL Server Developer Center

"DBCC INPUTBUFFER permissions default
to members of the sysadmin fixed
server role only, who can see any
SPID. Other users can see any SPID
they own. Permissions are not
transferable."
(http://msdn.microsoft.com/en-us/library/aa258826(SQL.80).aspx)

无法回应 2024-07-23 23:19:55

我只想分享另一个答案,进一步解释 Neil N 的答案。

DBCC INPUTBUFFER(spid) 命令将返回针对指定 SPID 执行的最新批处理的文本。 当您双击“活动监视器”中的一行(或右键单击并选择“详细信息”)时,SQL Server 会在幕后运行您在上面的帖子中引用的命令(将所选行的 SPID - 61 替换为您的示例)返回针对连接发出的最新批次。 在您的示例中,该批处理实际上恰好是 CREATE TABLE 等...批处理由 Activity Monitor 发出以返回最新的批处理!

作者:Chris Howarth https://social.msdn.microsoft.com/Forums/sqlserver/en-US/6bbe405b-b7d8-4f97-9150-cf03c59d4fe3/process-wont-die?forum=sqldatabaseengine

数字 58是它总是会返回的,因为它是它的进程 ID,并且是您运行的最后一个进程!

I just want to share another answer which further explains Neil N's answer.

The DBCC INPUTBUFFER(spid) command will return the text of the most recent batch executed against a specified SPID. When you double-click on a row in Activity Monitor (or right-click and select 'Details') then, under the covers, SQL Server runs the command you quoted in your post above (substituting the SPID of the selected row - 61 in your example) to return the most recent batch issued against the connection. In your example the batch actually happens to be the CREATE TABLE etc... batch that was issued by Activity Monitor to return the most recent batch!

by Chris Howarth https://social.msdn.microsoft.com/Forums/sqlserver/en-US/6bbe405b-b7d8-4f97-9150-cf03c59d4fe3/process-wont-die?forum=sqldatabaseengine

The number 58 is what it will always return because it's its Process ID and it's the last process you run!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文