SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
DB Audit records have no sequence number

 
Reply to topic    SoftTree Technologies Forum Index » DB Audit, DB Mail, DB Tools View previous topic
View next topic
DB Audit records have no sequence number
Author Message
gwert



Joined: 17 Mar 2011
Posts: 2
Country: United States

Post DB Audit records have no sequence number Reply with quote
One problem I'm experiencing with data auditing in DB Audit is that there is no sequence number or identity/auto-increment value associated with each audit record. If two updates have the same time stamp, I can't tell which one happened first. Is there any way around this issue? Would it be possible to add an identity column to the audit tables without causing problems? I'm using SQL Server 2008 R2.
Thu Mar 17, 2011 2:50 pm View user's profile Send private message
SysOpJ



Joined: 20 Aug 2010
Posts: 95

Post Reply with quote
This is something that sounds useful, and works in some situations (e.g., when you have a single user performing row-level operations only) but ranges from not meaningful to useless to misleading to harmful in others.

For instance, when you're doing a batch update of a million records, what does "first" mean ... do we take the performance hit of breaking those changes out of a batch and make them row-level changes? Or, if the changes happen in a single transaction, in some sense they do all happen simultaneously and the question of order isn't really useful. Also, what order of operations do you record in the audit trail if a single quick change is performed by one user after a second user begins a transaction but before it completes?

Since you're using SQL Server, one option you have is to add a timestamp data type column to your application tables. This is less of an actual timestamp, and more, as Microsoft puts it, "binary numbers that indicate the relative sequence in which data modifications took place in a database". This value would be carried over into the audit trail tables, and you could sort on it to get the relative sequence of operations. This alternative is specific to SQL Server.
Tue Mar 22, 2011 6:49 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » DB Audit, DB Mail, DB Tools All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.