Skip to content

query sys.traces and select fn_trace_gettable

0

I have an RDS Sql Server instance. I can run these commands when I am connected as admin. How can I run these commands as another user?

1 Answer
0
Accepted Answer

Resolution :

The sys.traces catalog view contains the current running traces on the system. This view is intended as a replacement for the fn_trace_getinfo function.function. Now to get access to sys.traces and sys.dm _exec_requests you need to grant user below permission by master user account.

I created a test user as below and executed the command it fails with a permission issue i.e. missing permission error:

USE [master] GO CREATE LOGIN [test1] WITH PASSWORD=N'XXXXX', DEFAULT_DATABASE=[master], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF GO

Now Grant the permissions as below to the user test1 then try to view the trace again.

GRANT ALTER TRACE TO test1

AWS
answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.