SQL Server: Can’t access sys.dm_tran_current_transaction

SQL Server: Can’t access sys.dm_tran_current_transaction

Problem:
User doesn’t have access to sql server management views


select transaction_id from sys.dm_tran_current_transaction

Msg 297, Level 16, State 1, Line 1
The user does not have permission to perform this action.

Solution
Run the following script. Must be run as a server admin. 
USE master;
GRANT VIEW SERVER STATE TO <User>;

More Reading:

sys.dm_tran_current_transaction: http://msdn.microsoft.com/en-us/library/ms186327.aspx