Who did what?

  • Comments posted to this topic are about the item Who did what?

    ..>>..

    MobashA

  • Nice. I will keep this one.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • thanks.

    do any one have a solution if i need to run this select every 2 seconds?

    i have been trying but am stuck in a dead end.

    ..>>..

    MobashA

  • After playing with it a little this is definitely a useful query, but the article could certainly go with more explanation about what its intent is and how it functions. That would make it a bit easier to understand.

    ---
    Timothy A Wiseman
    SQL Blog: http://timothyawiseman.wordpress.com/

  • Probably should be listed under "Scripts" instead of "Articles".

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • mobasha (3/11/2008)


    thanks.

    do any one have a solution if i need to run this select every 2 seconds?

    i have been trying but am stuck in a dead end.

    Well, this does what you asked for, but probably is not what you want:

    While (1=1)

    BEGIN

    Waitfor Delay '00:00:02'

    {your query's}

    END

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • I don't know any tricks to get periodic query refreshing inside SSMS, I always write a VB.net client to do this kind of stuff.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • thanks all.

    ur solution were v.smart.

    thanks a lot for the help.

    ..>>..

    MobashA

  • very nice script...thnx!

    ============================================================
    SELECT YOUR PROBLEM FROM SSC.com WHERE PROBLEM DESCRIPTION =
    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • MobashA, you're welcome.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • Hi,

    Is this script for 2005 only or does it work for 2000? Thanks.

  • Looks like good info to have. . ., but my SSMS query keeps rejecting the code. It complains about the three inline queries for the elements from dm_exec_sql_text function, doesn't like the '.' within the function argument. Is this a database compatibility issue?

    Any ideas?:)

  • I like to know when who is doing in the query.

    Can anybody help?

    Thanks.

    Ke

  • Very helpful script. Thanks. I changed it a bit to make the code cleaner. This produces the same result:

    USE MASTER

    SELECT

    s.session_id, s.host_name, s.program_name, s.client_interface_name, s.login_name

    ,s.nt_domain, s.nt_user_name, c.client_net_address, c.local_net_address

    --,c.connection_id,c.parent_connection_id, c.most_recent_sql_handle

    ,(SELECT text FROM sys.dm_exec_sql_text(c.most_recent_sql_handle)) as sqlscript

    ,(SELECT db_name(dbid) FROM sys.dm_exec_sql_text(c.most_recent_sql_handle)) as databasename

    ,(SELECT object_id(objectid) FROM sys.dm_exec_sql_text(c.most_recent_sql_handle)) as objectname

    FROM

    sys.dm_exec_sessions as s

    INNER JOIN

    sys.dm_exec_connections as c

    ON c.session_id = s.session_id

  • nice script ...amazing result which i want to see it.

    thanks

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

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