eventv

Hi Folks

If you want to trace out who have alter the user roles in the SQL Server.here is the simplest way.

Open SQL Server management studio and execute the below query

select * from sys.traces

Copy the output of sys.traces and replace it in the query path of below query

SELECT TextData,StartTime,NTUserName,ApplicationName
FROM fn_trace_gettable(‘C:Program FilesMicrosoft SQL ServerMSSQL11.MSSQLSERVERMSSQLLoglog_116.trc‘, default)
where TextData  like ‘%alter%’

Happy Learning 🙂

2 thoughts on “Who altered the user roles

  1. Hi Thanks for the share! But it is giving only that day alters….Is there any way to track historical data like at least 1 month or so?

Leave a Reply

Your email address will not be published. Required fields are marked *