• Iwas Bornready (5/11/2016)


    The problem I just had with it is that I do not have permissions to run this on production.

    You can try requesting the following from the DBA:

    -- allow viewing of object DDL (ie: table schemas and stored procedure text)

    GRANT VIEW ANY DEFINITION TO [YourDomain\YourLogin];

    -- allow querying of DMVs and system tables:

    GRANT VIEW SERVER STATE TO [YourDomain\YourLogin];

    -- allow starting / stopping of sql profiler or extended event traces:

    GRANT ALTER TRACE TO [YourDomain\YourLogin];

    Also, Adam Mechanic has a more comprehensive process viewer, which is in the form of a stored procedure called [sp_whoisactive]. However, if you can't deploy to production, then you can retofit it as a script if needed.

    http://sqlblog.com/blogs/adam_machanic/archive/2012/03/22/released-who-is-active-v11-11.aspx

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho