• Everything goes well until I try to execute-

    FROM sys.dm_exec_sql_text(@sql_handle)

    This statement requires someone to have sysadmin permission which is not an option for developers. I intend to give this tool to developers so that they can investigate log running procedure.

    Is there a way to get around the permission? Or, Can the permission is only granted on the function to a group (developers) so that they can execute the show line of codes?

    Thanks,

    Prodip