Active Monitor?

  • Hello people. New here, glad to meet you.

    I have a simple question (i think), i am trying to develop

    a query (if i there is one) so i can see all the processes so after i can kill each one

    is making a problem to the others trying to be processed from the server. The problem is that i can do that with the active monitor but i cannot see from whom is each one process. All the clients are connecting with the sa user (sql authentication) so it would be great if i could see from which computer name each process is made or from which user or ip address. I dont know if all that im asking are clear enough for you guys. Please advice. Thank you very much.

  • Don't use activity monitor, it falls short in many areas.

    I suggest that you use Adam Machanic's sp_WhoIsActive.

    -- Gianluca Sartori

  • As i saw that is a quite big query! So, how i am going to see the output of this query? I test run it on a temporary db and it says query executed successfully but no output at all. Am i missing something? Noob here, please advice. Thank you very much.

  • With that query you created a stored procedure. To execute it and see the results just issue:

    EXEC sp_whoisactive

    -- Gianluca Sartori

  • It has to do that im completely noob.

    Done that, it was so simple, but in

    the output window it says : stub version, to be replaced.

    Thank you people, you're great.

  • It looks like you got errors creating the stored procedure. Which version are you on?

    -- Gianluca Sartori

  • Sql 2005 if you mean that, compatibility level 80.

    Sorry if i am making you feel a little bit frustrated with my ignorance.

    Thank you.

  • Plese re-run the contents of the file who_is_active_v11_11.sql.

    Does it run successfully or does it throw errors?

    If the procedure has been created successfully, you should see it in the object explorer under <yourinstancename>\Databases\System databases\Programmability\Stored Procedures.

    You can right click it and select "modify" to see if it contains something other than SELECT 'stub version, to be replaced'. If not, something has gone wrong.

    -- Gianluca Sartori

  • when i did execute the query to create the procedure the sql editor gave the msg query executed successfully,

    i went to modify the sp_whoisactive as you mention and this is what i have :

    CREATE PROC dbo.sp_WhoIsActive AS SELECT 'stub version, to be replaced'

    GO

    I assume that something is wrong. Isn't it?

    Thank you.

  • locate the ALTER PROC statement in the whoisactive.sql file, select everything from there on to the end of the file and hit F5.

    Any errors?

    -- Gianluca Sartori

  • The message in the output window says :

    Execute failed [0,055s]

    Strange for my logical, because in the down limit of the editor window it says query executed successfully...!

    Is there anything i can do to fix it?

    Thank you so much!

  • Weird. Quick attempt: copy everything to a new query editor window and execute from there. I had issues in the past executing scripts extracted from a zip file in a temp folder.

    -- Gianluca Sartori

  • Copy - Paste to a new query window.

    This is what i get...

    ------ Execution started: Connection: SQL4.sql ------

    Changed database context to 'NIKOLISGROUP'.

    Changed database context to 'NIKOLISGROUP'.

    Execute succeeded [0,024s]

    Execute succeeded [0,001s]

    Execute failed [0,058s]

    ------------ Done: SQL4.sql -------------

    Something is wrong at the end of the statement?

    Thank you.

  • I executed the query in the master db, it did gave me success in the output window, but when i go to the programmability and execute the proc, it opens a window and waits for some data entry in the value row. The window's name is : Edit Parameters: master.dbo.sp......

    I pressed ok in the window without editing anything and it says : Input parameters cannot be NULL

    stuck overflow in my head!

    Please advice. Thank you.

  • Don't use the context menu to execute the procedure. Just run EXEC sp_whoisactive

    -- Gianluca Sartori

Viewing 15 posts - 1 through 15 (of 25 total)

You must be logged in to reply to this topic. Login to reply