Sql-server – SQL Server — see when user/ login was last modified? And other meta-data

permissionssql server

I know you can see when tables or views were last modifed in sys.tables or sys.views in SQL Server.

It does not appear there is a table like this for users or logins — or is there?

Basically, a user is having permissions issues and — I can see their current permissions — but I would like to know when it was last "changed" and possibly by "whom" — is that possible retroactively?

Best Answer

You can have a look at

  1. Server audit logging
  2. C2 Audits

When working at banks or some Government agencies one Normally needs some way to proof who has accessed the database as well as the reports that was generated.

What happens is one always has to log the machine and user name the user used to accessed the data. one can record this by caling SUSER_SNAME() and Host_Name() in your procedures and logging this data along with the parameters used so that one can verse engineer who has accessed/ seen what data.