惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
Attack and Defense Labs
Attack and Defense Labs
V2EX - 技术
V2EX - 技术
O
OpenAI News
S
Secure Thoughts
H
Heimdal Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Schneier on Security
Schneier on Security
H
Hacker News: Front Page
S
Security Affairs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
The Register - Security
The Register - Security
GbyAI
GbyAI
Cloudbric
Cloudbric
MongoDB | Blog
MongoDB | Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
K
Kaspersky official blog
Forbes - Security
Forbes - Security
Y
Y Combinator Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Scott Helme
Scott Helme
Hacker News - Newest:
Hacker News - Newest: "LLM"
The Cloudflare Blog
Recorded Future
Recorded Future
人人都是产品经理
人人都是产品经理
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
Webroot Blog
Webroot Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LangChain Blog
T
Tor Project blog
Microsoft Azure Blog
Microsoft Azure Blog
博客园_首页
Hacker News: Ask HN
Hacker News: Ask HN
Blog — PlanetScale
Blog — PlanetScale
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog RSS Feed
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
I
Intezer
V
V2EX
T
Tailwind CSS Blog
SecWiki News
SecWiki News
NISL@THU
NISL@THU
C
Check Point Blog

博客园 - Brendan

[转载]Manually configuring Microsoft Internet Information Services (IIS) IIS与TOMCAT协同工作---在IIS下运行JSP页面 AXIS部署错误解决方案集锦 使用System.Web.Mail发送Mail的错误解决方案 类的XML序列化(XML Serialization) [翻译]你可以赚钱,但你不能赚时间 Windows 2003 Server配置IIS服务器(ASP, ASP.NET)全功略 Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive 反反编译工具——Deploy.NET C中获取当前时间的函数 Buffered I/O 与 Non-Buffered I/O性能差异的实例体验 替换函数(Substitution Function) 主定理(Master Theorem) Dynamic Programming之Longest Increasing Subsequence (LIS)问题 ADO.NET数据库连接模块 ASP.NET控件事件丢失的探究 SQLDMO For C#(翻译) 关联(Association)设计中的扇形陷阱(Fan Traps)和断层陷阱(Chasm Traps) 简单并发控制
用MS SQL Server事件探查器来跟踪数据库的操作
Brendan · 2006-04-27 · via 博客园 - Brendan

        在MS SQL Server中,除了我们常用的企业管理器和查询分析器之外,还有一个非常有用的工具——事件探查器。由于这两天,我需要知道一个ASP.NET程序对某个数据库的哪些表进行了哪些操作,所以才发现了这个工具的好处!

        事件探查器可以跟踪数据库的你在某一时间内的每一个操作,比如你在查询分析器中执行一句SQL语句,或是你的程序调用一个存储过程等等。它都会立即捕捉到这个操作,并把这个操作的细节记录和显示出来。

        使用事件探查器,我建议按下面的步骤来进行:

1. 点击新建一个跟踪。

2. 选择你要跟踪的Server。

3. 在“跟踪属性”的“常规”标签中填写一个跟踪名,其它的建议默认。

4. 在“事件”标签中,选择如下的事件类:

1) TSQL SQL:BatchCompleted, SQL:StmtCompleted
2) 安全审核 Audit Login, Audit Logout
3) 存储过程 RPC:Completed, SP:Completed, SP:StmtCompleted
4) 会话 ExistingConnection
5) 事务 DTCTransaction, SQLTransaction

5. 在“数据列”标签中,选择如下的数据:EventClass, HostName, EndTime, TextData, ApplicationName, NTUserName, LoginName, SPID, StartTime

6. 按“运行”或是“确定”开始跟踪。

        跟踪的数据会在一个DataGrid里面显示出来,而且信息是实时的。建议查看名为“SQL:StmtCompleted”的
EventClass,可以看到刚才执行的SQL语句。

        上面的步骤只是给你一个方便的上手,到底选择什么数据查看可以自己根据需要来调。