Sunday, February 12, 2012

Check who changed the table?

A table was changed several days ago. Is it possible to learn which user did
that?
SQL Server doesn't keep that information by default. You either need to trace using profiler (can
capture DDL and DML) or triggers (DML modifications only).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"nick" <nick@.discussions.microsoft.com> wrote in message
news:EA0F9A40-E152-45AC-B634-6F7F0976278B@.microsoft.com...
>A table was changed several days ago. Is it possible to learn which user did
> that?
|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uI5MjtEaFHA.2996@.TK2MSFTNGP10.phx.gbl...
> SQL Server doesn't keep that information by default. You either need to
> trace using profiler (can capture DDL and DML) or triggers (DML
> modifications only).
AFAIK, one can use c2 audit also, but it's essentially the same as using
profiler.
Regards
Wojtek
|||Yes, C2 audit creates a server side Profiler trace. I haven't used it, so one would need to look
into it to see how much overhead it has (how many events that isn't necessary for the particular
case).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Wojtek Garwol" <garwol@.usunto.poczta.fm> wrote in message news:d7qgei$3a1$1@.nemesis.news.tpi.pl...
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:uI5MjtEaFHA.2996@.TK2MSFTNGP10.phx.gbl...
> AFAIK, one can use c2 audit also, but it's essentially the same as using profiler.
> Regards
> Wojtek
>
|||You could also try with Lumigent's Schema Alert, which is a small application
that can send you alerts when there is a schema change:
http://www.lumigent.com/downloads/schemaalert.html
For data, c2 or profiles are the answers I have as well..
"nick" wrote:

> A table was changed several days ago. Is it possible to learn which user did
> that?
|||You may want to look at your change management practices.
http://www.innovartis.co.uk/pdf/Inno...ange_Mgt. pdf
The above link is the methodology DB Ghost (www.dbghost.com) was built on.
regards,
Mark Baekdal
http://www.dbghost.com
http://www.innovartis.co.uk
+44 (0)208 241 1762
Build, Comparison and Synchronization from Source Control = Database change
management for SQL Server
"nick" wrote:

> A table was changed several days ago. Is it possible to learn which user did
> that?

No comments:

Post a Comment