The Auditing Poll

  • Comments posted to this topic are about the item The Auditing Poll

  • Given that audit logs are not read frequently I feel we need to consider where the appropriate place is to store audit logs.

    Clearly they need to be secure so they cannot be tampered with but that does not necessarily mean they should incur the cost of storing them in a database?

    Given that they are huge some form of compressed storage will be required.

  • My current shop typically audits primary entity changes with creation and mod dates and users by default. We may apply further auditing but only where there is some particular requirement e.g. price changes. We don't automatically catalogue everything. Our standard reporting solution has record the SQL used for each report which can be helpful.

    In general I've found it easiest to stick to using a trigger to record audit details externally to the audited table (obviously this depends, I would not do this for a bulk import table say). I'd certainly consider SQL audit facilities but not quite got there yet.

  • As a solution architect I am continually told that auditing is essential.

    As a software developer I am continually told that auditing is too low a priority to implement and it will be added when required (when working in non-regulated areas).

    It is an area of work, like testing and logging, whose value is only realised when it's benefits are required and by then it is too late.

    Makes me cross. Grrrrrr.

    Gaz

    -- Stop your grinnin' and drop your linen...they're everywhere!!!

  • In the environments I support, auditing is required by regulation. I have rudimentary tracking enabled via trigger on a subset of sensitive fields. Additionally, I use the default trace for troubleshooting.

    Audit's the only way to explain what happened, when, and who did it. I try to include it in every new system I design. And yes, there's pushback about its importance and priority when it comes to development, but I'm in a business area that demands it.

  • We audit all user editable data. I use a trigger to simply add a complete copy of the record being inserted/updated/deleted to a duplicate (non-indexed), table. I have extra columns in each audit table to track date and user information. Pretty basic but it is surprising how often the audit tables are queried to determine who did what when. Fortunately we don't have to track who accesses/views the data just the changes. We keep the data for 12 months and a nightly job cleans out old audit data. The benefit for me is the speed and simplicity, I get complete detail with little effort, the downside is the space and when you have to analyse it, that is a manual process as you have to compare each column row by row to see what was actually changed, but so far that hasn't been to arduous.

  • David.Poole (1/11/2013)


    Given that audit logs are not read frequently I feel we need to consider where the appropriate place is to store audit logs.

    Clearly they need to be secure so they cannot be tampered with but that does not necessarily mean they should incur the cost of storing them in a database?

    Given that they are huge some form of compressed storage will be required.

    Agree, though in the short term dropping them in another filegroup/database makes some sense. However an archive plan to move them regularly to a text export of some sort, makes sense.

  • We use built-in SQL Audit to check for login attempts and unauthorized changes to the system.

  • Dave Schutz (1/11/2013)


    We use built-in SQL Audit to check for login attempts and unauthorized changes to the system.

    Server and DB specs? How's that working out? Want to write about it for me 😉

  • I work in a public company that adhere to SOX regulation and we basically need to track unauthorized direct database changes. What this means is all transactions from sysadmin, dbo and whoever has write access in the database must be audited. I used server side trace originally to audit it. We migrated to use built in SQL Audit when we upgrade server to SQL 2008. However SQL Audit has limitation that it generates audit for all sysadmin users in database level including service account and sa. The database level filter doesn't work for sysadmin. So I decided to use Idera SQL Compliance Manager. It is nice tool with different filtering capability and nice GUI plus SSRS reports. We have to keep the audit data for 7 years so I use RedGate Storage Compress on those databases to keep them to reasonable size. All these turn out to work quite well.

  • We track the logs Microsoft provides on most levels as well as many of the systems include audit tables that are updated on insert or update to certain tables. We capture before and after images. The triggers are applied where the project business expert believes we need such protection.

    In many of the application I have written over the past 5 years or so there is extensive logging during development. As the application have been developed logging is done for both the development and production levels. One for debug the second for transaction counts. By altering a value in the config file the mode of operation can be changed from verbose to terse where more or less logging will happen. Terse includes the logging of events that are critical for building business metrics and for exceptions in the processing of data. Verbose includes clues to the developer or debugger what is going on in much more detail.

    The responsibility of the developer is to also determine the process of removal of unneeded log records after a period of time. A procedure to delete those records that are useless over time and leaves the necessary log records runs as needed to sweep the log files.

    Good discussion!

    Not all gray hairs are Dinosaurs!

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply