简体   繁体   中英

Audit trail - SQL Server

Is it advisable to use Triggers in SQL Server to implement Audit trail on very frequently updated tables which contains large data? Are there any performance impacts? If not recommended, what are the options for implementing Audit trail?

You might want to investigate Change Data Capture. It is native sql server functionality for audit logging.

https://msdn.microsoft.com/en-us/library/cc645937.aspx

CDC does add overhead, but it is well though-out overhead. Triggers can get messy very quickly and should be avoided when possible.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM