From: seeker on
I am having records just disappear. Is there a way of telling when they were
deleted and maybe by whom? Does transaction log give this information?
From: John Bell on
On Fri, 18 Jun 2010 11:54:52 -0700, seeker
<seeker(a)discussions.microsoft.com> wrote:

>I am having records just disappear. Is there a way of telling when they were
>deleted and maybe by whom? Does transaction log give this information?

If it is still in the transaction log then you may be able to use a
third party tool to access the information.

How do you know it has been deleted?

John
From: seeker on
I have used dbcc log but that gives much info of which nothing hints at
delete process. The records are gone from the table. Thank you.

"John Bell" wrote:

> On Fri, 18 Jun 2010 11:54:52 -0700, seeker
> <seeker(a)discussions.microsoft.com> wrote:
>
> >I am having records just disappear. Is there a way of telling when they were
> >deleted and maybe by whom? Does transaction log give this information?
>
> If it is still in the transaction log then you may be able to use a
> third party tool to access the information.
>
> How do you know it has been deleted?
>
> John
> .
>
From: Erland Sommarskog on
seeker (seeker(a)discussions.microsoft.com) writes:
> I am having records just disappear. Is there a way of telling when they
> were deleted and maybe by whom? Does transaction log give this
> information?

The best bet is probably to create a DELETE trigger that logs information
about the deletions to a table. The transaction log is not very easy to
work with, not at least without third-party tools.


--
Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

From: Wojciech Garwol on
"Erland Sommarskog" wrote:

> seeker (seeker(a)discussions.microsoft.com) writes:
> > I am having records just disappear. Is there a way of telling when they
> > were deleted and maybe by whom?
>
> The best bet is probably to create a DELETE trigger that logs information
> about the deletions to a table. The transaction log is not very easy to
> work with, not at least without third-party tools.

Running a trace (e.g. with SQL Profiler) is also an option. Doesn't require
schema changes, but it may not show all deletions (e.g. when they are not
done explicitly).

Regards, Wojciech Garwol