Managing the Processes on Your SQL Server

Managing the Processes on Your SQL Server

You can view a list of the processes currently running on your server by executing the sp_who system stored procedure. You can also view a list of active processes by expanding the Process Info object within the Management folder in SQL Server Enterprise Manager.

If you’re using Microsoft SQL Server 7.0, execute the sp_who stored procedure by using SQL Server Query Analyzer or the osql command-line utility. In SQL Server 6.5, use the SQL Query Tool, Isql/w, or the isql command-line utility. Whether you run the sp_who stored procedure or view a list of processes within SQL Server Enterprise Manager, SQL Server displays a list of current processes on your server, the status of each process, who initiated it (by login ID), the database that the process is using, and the SQL command that the process is running. SQL Server assigns a unique number to each process; this unique number is called a server process ID (“spid”).

Once you have a list of processes running on your server, you can stop any of the processes by right-clicking on the process and choosing Kill Process within SQL Server Enterprise Manager, or by using the command kill {spid} in a query utility. For example, if you wanted to stop a process to which SQL Server had assigned an ID of 5, you would type kill 5.

See also  The Art of AI-Generated Meeting Minutes

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist