如何将SQL查询记录到AI? [英] How can I log the SQL Query to AI?

查看:109
本文介绍了如何将SQL查询记录到AI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了一个控制台应用程序,它将数据发送到Application Insights.我可以成功地看到很多对sql server的依赖项调用,但是没有T-SQL查询.有什么方法可以配置吗?

I have set up a console application that sends data to Application Insights. I can successfully see alot of dependency calls to sql server, but no T-SQL query. Is there any way to configure this?

我使用Linq to SQL(DBML)连接到SQL Server.

I use Linq to SQL (DBML) to connect to SQL server.

谢谢, 克里斯托弗

推荐答案

我遇到了完全相同的问题,并且能够通过在运行IIS并托管Web应用程序的VM上安装Application Insights Monitor来解决此问题. 我在这里找到了必要的信息: https://azure.microsoft.com/zh-CN/documentation/articles/app-insights-monitor-performance-live-website-now/

I had the exact same problem and was able to fix it by installing the Application Insights Monitor on our VM that runs IIS and hosts the web application. I found the necessary information here: https://azure.microsoft.com/en-us/documentation/articles/app-insights-monitor-performance-live-website-now/

您可以从以下链接下载Application Insights Monitor: http://go.microsoft.com/fwlink/?linkid=506648&clcid = 0x409

You can download the Application Insights Monitor from this link: http://go.microsoft.com/fwlink/?linkid=506648&clcid=0x409

在安装和运行此应用程序后,系统将提示您将应用程序池标识用户添加到Windows中的性能监视器用户"安全组.您可以在Application Insights Monitor中看到的警告消息中找到要添加的确切用户名. 还将提示您重新启动IIS,以使更改生效.

After installing and running this application you will be prompted to add your application pool identity user to the "Performance Monitor Users" security group in Windows. You can find the exact username to add in the warning message that you see in the Application Insights Monitor. You will also be prompted to restart your IIS for the changes to take effect.

就我而言,我还向我的Web应用程序中添加了Application Insights SDK,以兼顾两者(如上面的链接所述).

In my case I also added the Application Insights SDK to my web application to get best of both worlds (as described in the link above).

我希望这也能解决您的问题.

I hope this also solves your problem.

这篇关于如何将SQL查询记录到AI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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