• Put the statement in a stored procedure or user-defined functon. Sign the module with a certificate in master. Create login from the certificate and grant that login VIEW SERVER STATE. Grant permission to NETWORK SERVICE to the stored procedure.

    For more details on certificate signing, see this article on my web site: http://www.sommarskog.se/grantperm.html

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]