SQL Server Performance

  • Home
  • Articles
  • Forums
  • Tips
  • Training
  • FAQ's
  • Blogs
  • Software
  • Books
  • About Us
RSS Feeds
Sign in | Join


Article Topics

All Articles
Performance Tuning
Audit
Business Intelligence
Clustering
Reporting Services
Developer
General DBA
ASP.NET / ADO.NET

Write for Us

Share your SQL Server knowledge with others and raise your profile in the community More...
Latest Articles

Working with Windows Communication Foundation (WCF)
Transfer Logins Task and Transfer Database Task in SSIS
Practical Database Change Management (Part 2)
Practical Database Change Management (Part 1)

More     
 
Latest FAQ's

ALTER TABLE SWITCH statement failed because column '%.*ls' has data type ...
ALTER TABLE SWITCH statement failed because column '%.*ls' has data type ...
ALTER TABLE SWITCH statement failed. There is no identical index in ...
'%ls' statement failed because the expression identifying partition number for the ...

More     
   
Latest Software Reviews

Spotlight on ApexSQL Diff - Server-based database comparison tool ...
Spotlight on ApexSQL Data Diff - Server-based database comparison tool ...
Spotlight on ApexSQL Doc 2008
ApexSQL Enforce

More     

articles >> audit >> Automate Audit Requests

Automate Audit Requests

By : TJay Belt
May 26, 2008

User Review
Periodically, an internal auditor would stop by my desk and ask me to show them all the users and permissions on a particular database.  This is easily gathered, and most of us know how to do this.  I produce this list, and send it on to the requestor.  The next question is ‘What has changed?’.  I do not have this information, and have to tell them I do not know.

So, after a couple iterations of this (I will not admit how many) I finally devised a simple way to store this information to adequately respond to this question.  A snapshot of the user information is gathered from time to time, and stored into a history table.  The next time a request comes in I can compare the current values to the historical ones.  This would become tedious as it usually involved some spreadsheets or query results, and manually reviewing the data, looking for new records, changed records and so on.  When I would produce these two sets of data (current and 1 historical snapshot) and give the data back to the auditor, they were initially happy, until they realized all the time that would be involved to perform an adequate review of the two sets of data. 

The next question would invariably be, is there a way to automate this?  There is always a way to automate anything, I would respond, and skulk back to my DBA hole and pound out some more code.  After more review of the results I produced and even more back and forth between me and the auditor, we finally decided which fields we needed to see, the differences we should show, etc.  I will now try to explain the system that we devised to assist us in this simple, yet complex endeavor.

System
We basically want to know what the users looked like at a point in time.  Compare it to the current state of the users, and show differences.  Differences will be defined as: new records, changed records, removed records and old records.  We want to be able to dynamically include any number of new and existing servers into this system, though we started with a single server.  We want to be able to display these results for a period of time, and allow reporting to occur based on the results.

Since we already have a monitoring server setup, this was the perfect place to locate this system.  We already use linked servers to connect too and monitor all our remote servers, so we will continue in this vein for this system.  Justifications can be read in other articles I’ve written about monitoring with linked servers.  A configuration table needs to indicate which servers we will be monitoring.  Some stored procedures will need to use dynamic sql, cycle thru the config list of servers, and call them to gather data, stage the data, and then do comparisons against this data.  Then resulting data can be reported on.

That’s the high level description.  I will now go through all the objects, with more detail.


    Next Page>>    








Home | Peformance Articles | Audit Articles | Business Intelligence Articles | Clustering Articles | Developer Articles | Reporting Services Articles | DBA Articles | ASP.NET / ADO.NET Articles | SQL Server Training Videos | DBA FAQ's | Developer Peformance FAQ's | DBA Peformance FAQ's | Developer FAQ's | Clustering FAQ's | Error Messages | Audit Tool Reviews | Backup Tool Reviews | Coding Tool Reviews | Compare Tool Reviews | Documentation Tool Reviews | Design Tool Reviews | Monitoring Tool Reviews | Log Tool Reviews | Reporting Tool Reviews | Clustering Tool Reviews | Security Tool Reviews | Change Management Tool Reviews | Remote Access Tool Reviews | Book Reviews | Security Tool Reviews | QDPMA Performance Tuning | ADO.NET / ASP.NET | Administration | Analysis/OLAP Services | Application Development | Configuration | Components | ETL | Hardware | High Availability | Hints | Index | Misc | Operating Systems | Performance Tuning | Replication | T-SQL | Views


              © 1999-2008 by T10 Media. All rights reserved