Showing posts with label Scripts. Show all posts
Showing posts with label Scripts. Show all posts

Monday, 29 April 2013

sp_who4

“Sp_who4 “

What if we want to see what’s running in our server right now? We quickly go to the command window and type “sp_who2” or “sp_who2 active “ either of these two commands will provide us the required information of the various requests running on our server. The output of this command is as follows
 

Now we do have a drawback over here, we do get the required information, but not the commands that are being requested to the server in order to get the command text we need to do an additional activity i.e. run a command dbcc inputbuffer (spid).By running this command we get the command text that is executing on the server.