Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Get Notified When Accounts Are Changed

By danw,

Perfect for finding developers that are changing your database accouts.  This procedure can check the sysusers table for each database and\or the master..syslogins table for account changes.  Gives the option of email notification, logging to a table or both. Update the set statements at the begining of the procedure to configure it however you like.  It will create any tables it requires for you.  The procedure accepts on parameter for the number of days back to report a change on. I would suggest setting this up as a scheduled procedure, so if you run the report daily pass in a 1, weekly a 7, etc.  If there is an account change detected and you use the CreateBackupTable option you can then compare the account records before and after the change to find out what the user changed.  If you want to create a new copy of the backup tables, just delete them and they will be recreated the next time it runs.

Total article views: 281 | Views in the last 30 days: 23
 
Related Articles
FORUM

Auditing Account creation/changes

Trying to audit account creation and permission changes

FORUM

SSRS - Changing Service to use Domain Account

WMI problems when changing to domain account - can't even change back.

FORUM

how to properly change the service accounts

how to properly change the service accounts

FORUM

Which Stored Procedure changed

Which Stored Procedure changed

FORUM

CHANGING DB-OWNERSHIP TO SA ACCOUNT

CHANGING DB-OWNERSHIP TO SA ACCOUNT

Tags
 
Contribute