开发者

Is it possible to obtain a human-readable record of all transactions on a SQL Server database?

开发者 https://www.devze.com 2023-02-25 15:11 出处:网络
For example, a log that shows when which value was changed from what to what in which tabl开发者_开发技巧e, row and field?Apart from investigating a particular issue, its NOT recommended to use Transa

For example, a log that shows when which value was changed from what to what in which tabl开发者_开发技巧e, row and field?


Apart from investigating a particular issue, its NOT recommended to use Transaction log for this purpose. There are many issues one in particular is reading from it when there are concurrent transactions which can cause access violation errors.

http://www.sqlservercentral.com/blogs/hugo/archive/2009/01/17/it-s-minus-twenty-five-outside-and-i-m-writing-about-transaction-log-files.aspx

As others have pointed out, roll out your own or use Change Data Capture (CDC) or Change Tracking (CT) if you are using SQL Server 2008 & above.


you are free to roll your own.

perhaps build a log table, and add triggers to record relevant transactions.

0

精彩评论

暂无评论...
验证码 换一张
取 消