Using the SP

Source: Internet
Author: User

A user data processing or process can sometimes have a negative effect on the SQL Server2000. For example, when a user establishes an advanced data operation, it can produce a power bottle for data manipulation, and the operation of other users can only wait until the operation is complete. You may not have heard the developer complaining, but you should have heard the complaining of the waiting user. This is why you cannot get information about a particular process or process.

Sp_who is one of the most convenient tools when you want to find information that slows down the user's operational reasons. She is a system-stored program that provides current information about the user and the process. In addition, it can be used to obtain information about the process being processed, including the idle process.

Sp_who's operational results provide some useful columns, including the SPID (System procedure ID), ECID (the environment ID of a given thread associated with the SPID), process status, loginame, hostname, BLK (System ID of the module process), database name, and SQL Server's command to execute the procedure.

The following example uses sp_who to enumerate the currently running processes:

Use master
EXEC sp_who

If you want to find a specific user process, you can use his or her registration as follows:

Use master
EXEC sp_who ' Jharvey '

Other options, including obtaining all the information about the current running process or a specific process, can be imitated as follows:

Use master
EXEC sp_who ' active '

Use master
EXEC sp_who ' A '--the specific process ID



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.