Mimic Current Activity behaviour

  • Hi all,

    when I look in Management->Current Activity->Process Info I can see the last executed T-SQL batch executed by a ProcessID (=User).

    How can I see the same via QA?

    Cheers,

    Frank

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • DBCC INPUTBUFFER(spid)

    This only gets the first 255 characters of the command.

    SP3 introduced the fn_get_sql function (see the updated SP3 BOL for details), which returns the information in a text column.

  • Hi ianscarlett,

    thanks, I should have been more precise on what I want. As a temporary solution I want a coworker to be able to find out the last execute T-SQL command executed by another user.

    He does not know EM or QA, but Access. I don't want to install these tools on his machine, so best would be he could type in the username and fire a parameterised query in Access. He needs the result to query another table.

    I thought of something like

    SELECT <last_command> FROM <some_systables> WHERE user = <some_input>

    I hope things have become more clear.

    Any ideas?

    Cheers,

    Frank

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

Viewing 3 posts - 1 through 2 (of 2 total)

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