Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

SQL auditing

$
0
0

I'm looking at adding audit trails (as in, recording any changes to the data) to a database I'm creating. The database has multiple schemas which are used to manage staff permissions. The two main ways that people seem to mention are using shadow tables or using logic in triggers.

Using shadow tables seems like a bit of a waste considering a lot of the time only one or two fields will be changed, however the performance would be better than using logic to decide what gets recorded. Which option do you think is better?

It may be a daft question, but I'll ask anyway - If I went down the shadow table route, would the person editing the original tables need write permissions to the relevant shadow table? Does the trigger write to the shadow table as the user, or does it use some kind of system account?

Also, this is my first attempt at...


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>