Use the SQL Server Event Viewer (activity monitor) to view executed SQL statements

Source: Internet
Author: User

For example, I would like to share with his family a tips that are commonly used in development. During the development process, ourProgramIf something goes wrong, we may doubt the SQL script we execute. How can we check this SQL script? Some people will debug the program and follow it! Follow! Try again! Well, I followed the SQL script for execution for almost 10 minutes. This would be very troublesome and I would like to give you a simple and quick way. I will not waste memory, as shown below,

My machine is SQL Server 2005 and the target machine is SQL Server 2000, but this does not affect any version.

First, there is an activity monitor in the database management. After double-clicking it, you can see all the processes connected to the database (the original database was accessed by multiple processes, haha ), then you can see the database connected to each process, the login IP address of the machine, and the SQL account used for login. Select a process you are connected to and double-click to open it, you can see that there is an SQL script in the Panel. This script is the script you just executed. Is it very convenient?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.