Tracking Who Changed Row Data in SQL Server

preview_player
Показать описание
This week I share how to track who changed a row of data in SQL Server via a trigger.

Related blog post with example code:

Follow me on Twitter:
Рекомендации по теме
Комментарии
Автор

Be-careful with triggers, because if you have a busy OLTP system your queries will have to wait until trigger is completed.

jamesyoukhanis
Автор

Not a good solution when SQL Server has built-in feature of Audit that was introduced in SQL Server 2012 (I think). You can also use another SQL Server feature called CDC (Changed Data Capture). Triggers are messy and hard to troubleshoot.

RealityCheck
Автор

Long ago there was a product by Lumigent Technologies that read the log file in order to get the changes made. A genius non-intrusive way of tracking changes.

EMoscosoCam
Автор

Every Application wants the application logged user to be stored within an audit column... not the user logged to the DB... by the way it is a good idea to post this video!

stefanotorelli
Автор

Thanks Bert. Yeah, auditing is always tricky, especially with SET-based data operations. Maybe a video on SQL CDC? I know Microsoft were looking at it as a mainstream solution, but I don't think it ever got traction.

But great vid, as always!!

Zanoni
Автор

What about CDC? Wouldn't that be a desired feature? (Or, am I missing something?)

marcelmarceli
Автор

What about using audits and database audit specifications?

BlueSkyBlue
Автор

Really enjoyed this video Bert, gave a special mention to it in the roundup

kevinchant
Автор

Hi Bert, Could you make a future video about column based changes for older ms sql servers?

Oromoye
Автор

Very useful video. Thank you so much. I need video for log history. In the history table we have reference ID, table name column name, old value and new value. If we make any changes in particular coloum, record will insert in history table. So we can track track which value changed from and do. It's useful for any dB. Thanks in advance.

KDCO
Автор

Hi, do You know that your laptop sticker (white eagle) is the Polish emblem ?:)

edzioedziowski
Автор

Thank you so much your sharing great insight!

josephmueras
Автор

Really cool idea! I'd support that one in Connect or whatever they call it now.

Reitseschaatser
welcome to shbcf.ru