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:
Grant Server Permissions: http://msdn.microsoft.com/en- us/library/ms186717.aspx