RowHistory Issue

Jan 9, 2009 at 12:22 AM
Hi Paul. If AutoAudit is applied to a table having existing data rows, the RowHistory function can return inaccurate information. For example, the function will return a row of Operation type i even if there are no values in the Audit table for that function's base table. It appears to return the first row of the base table.
Coordinator
Jan 9, 2009 at 12:38 AM

Hi!

Interesting point.

Yes, the intention is that the AutoAudit works best when it’s applied from the beginning of time ;-)

Maybe it needs a populate from this date to go forward  proc? To seed the existing data?

-Paul Nielsen

SQL Server MVP

www.SQLServerBible.com

sign up for my free e-Newsletter

From: pjackman [mailto:notifications@codeplex.com]
Sent: Thursday, January 08, 2009 5:23 PM
To: pauln@sqlserverbible.com
Subject: RowHistory Issue [AutoAudit:43764]

From: pjackman

Hi Paul. If AutoAudit is applied to a table having existing data rows, the RowHistory function can return inaccurate information. For example, the function will return a row of Operation type i even if there are no values in the Audit table for that function's base table. It appears to return the first row of the base table.

Read the full discussion online.

To add a post to this discussion, reply to this email (AutoAudit@discussions.codeplex.com)

To start a new discussion for this project, email AutoAudit@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Jan 9, 2009 at 1:17 AM
Edited Jan 9, 2009 at 1:22 AM
Good idea.
Some of my tables have pre-existing Audit data in another format. Some of these could be converted to AutoAudit format; a couple will be quite difficult and maybe not worth the effort.
For the ones that are too difficult to convert I was planning to keep an Audit version number in the entity tables and continue to run my old auditing code and audit reports for these legacy rows. New rows would use the AutoAudit triggers and reports.
For those without pre-existing audit data, insert rows could be added to Audit.
Patrick.
Coordinator
Aug 12, 2010 at 3:57 PM

With version 2, when importing data you can configure AutoAudit to LogInsert = 0, so you don't capture the insert, then turn LogInsert to 1 to begin logging inserts. This will avoid the false insert events on the import.