K
K
keith2011-02-24 19:25:32
Journaling
keith, 2011-02-24 19:25:32

Logging in MS SQL?

Are there ready-made solutions for logging actions in the database?
It is necessary to log when changing data in any table:

  1. - user
  2. - time
  3. - line content

This should happen for any operations, i.e. insert/update/delete.
At the same time, the contents of the log should not be limited to the transaction log.
I googled a couple of options, but both do not fit - either there is no date, or data from the transaction log.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
eternals, 2011-02-24
@keith

Change Data Capture (CDC)

D
darkslesh, 2011-02-24
@darkslesh

If there are not very many tables, then you can organize everything in the form of triggers and let the log be written to a separate table.

D
dmach, 2011-02-24
@dmach

Of course, there are ready-made solutions - SQL Server itself - msdn.microsoft.com/en-us/library/aa260328 (SQL.80).aspx, the sp_trace_create procedure, and so on.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question