Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
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: 240 | Views in the last 30 days: 4
 
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

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones