查询以查找通过Excel运行的人员和内容 [英] Query to find out who and what is running through Excel

查看:66
本文介绍了查询以查找通过Excel运行的人员和内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道谁在使用Excel客户端运行SQL查询以及查询运行的是什么。有没有办法找出来?任何帮助表示赞赏。谢谢。

I would like to know who are running sql queries using Excel client and the queries what they are running. Is there any way to find out? Any help is appreciated. Thanks.

- 请标记正确的答案

- please mark correct answers

推荐答案

你可以查看sys.dm_exec_sessions,虽然到底要找什么我不确定。


我使用新查询从Excel快速测试并运行"SELECT app_name()"。返回值是"Mashup Engine"。但我想还有其他Excel连接方式,例如通过VBA宏,在这种情况下可能会有所不同。

You could look at sys.dm_exec_sessions, although exactly what to look for I am not sure.
I did a quick test from Excel with New Query and ran "SELECT app_name()". The return value was "Mashup Engine". But I guess there are other ways that Excel connect, for instance through a VBA macro, in which case it may be different.

在任何情况下,请记住应用程序名称是什么在连接字符串中设置,调用者可以设置任何它想欺骗你的东西。

In any case, keep in mind that the application name is something that is set in the connection string and the caller can set whatever it likes to fool you.


这篇关于查询以查找通过Excel运行的人员和内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆