Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm designing an application that will run on SQL Server 2008 R2. There's a requirement to audit any updates to a customer table. The new Audit service that was release as part of SQL Server 2008 seemed to be a great fit. Unfortunately, although I have been able to setup a Database Audit Specification so that it logs details of any update - it does not log parameters to the update. For example, I ran the following query:

update Sales.Customer
set CustomerType = 's'
where CustomerID = 1

The log recorded only the following:

Statement       UPDATE [Sales].[Customer] set [CustomerType] = @1  WHERE [CustomerID]=@2

I would have thought that the ability to log what had changed should be possible through the audit service? Without this capability, the benefit of the Audit service seems limited. Am I missing something?

Thanks

Rob.

share|improve this question

1 Answer 1

You should be able to use Change Data Capture to track the old and new values.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.