开发者

Is there a free (or very cheap) tool for highlighting changes in data for sql server?

Note for bounty: please answer only if you know a tool that can monitor what changes in the same db, don't mention tools that compare 2 dbs. A visual tool, like Embarcadero Change Manager is appreciated.

I'd like to have a tool that allows me to see only "what changed" in a db, given a specific action.

Scenario can be:

1) start monitoring (with the tool)

2) user performs an action on GUI (like clicking the button "apply" after having changed the telephone number of a customer)

3) stop moniroting: show changes (with the tool) (in this case I should only see t开发者_如何学Gohat the Address field has been changed)

Embarcadero's Change manager does this, but it does also many other things, and it is expensive. I am looking for a simpler tool that does only this.

Note: I don't need schema comparison, just simple data comparison.


If you have SQL Server 2008 Enterprise Edition you can use Change Data Capture to expose the transaction log in a more usable format than DBCC LOG dbname,3. See http://msdn.microsoft.com/en-us/library/bb522489.aspx for more information.


Check out the Lite/Free version of the various xSQL tools:

http://www.xsqlsoftware.com/LiteEdition.aspx

The have an object-level compare, as well as a data compare tool.

Those don't work "on the fly", but you can always have one database as a reference, and compare your current one against that baseline.


You can make Database Snapshots (quickly enough) and then compare with working DB. Both issues can be solved with free tools.


For free, one option is to use DBCC LOG dbname,3 to dump the transaction log.

Probably be fun interpreting the output, but certainly doable.


The other free alternative is to put audit tables in place and put auditing triggers on all your tables. This is a bit more flexible than change data capture because you can specify some additonal things that change data capture doesn't capture.

Profiler is also a tool that you can use to see what query the app sent to the database which should tell you what was changed in many cases. This is a less permanent solution than auditing, but consider if auditing is something that you would find useful in the logn run.

I can't imagine ever managing a database without setting up auditing. It's just too useful for fixing bad data changes or findong out who made a particular change.


The most obvious tool would be SQL Profiler. It will monitor every SQL statement, and thus every data change, that gets sent to the server and show you metrics about that statement, the account under which the statement was executed and a host of other pieces of information and it comes free with most SQL Server versions. If you only want to see data changes, you can add filters to only show Insert, Update and Delete statements.

If what you are trying to do is compare two databases to see what data is different between them, then I'd recommend something like Red-Gate's Data Compare (no I do not work for them). It is not free but invaluable for this type of column value by column value comparison.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜