Thursday, February 16, 2012

Cause of table truncated

We have a few tables is SQL 2000 database being truncated and don't know wha
t
happen to them. The database log file look-up is the way I am trying. But
dbcc does not bring too much useful information. I appreciate it if you can
point out a few ways, which can identify the cause of this incident. Thanks
.
--
DLUnderstanding the DBCC LOG output is a bit difficult, especially as there
isn't much documentation available.
You might want to use a thid party tool like Lumigent Log Explorer, which
can read transaction logs and answer the questions like the one you've just
asked.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Dliu" <Dliu@.discussions.microsoft.com> wrote in message
news:9E7A4BF4-6974-46DB-A489-BBFEBD28DF59@.microsoft.com...
> We have a few tables is SQL 2000 database being truncated and don't know
> what
> happen to them. The database log file look-up is the way I am trying.
> But
> dbcc does not bring too much useful information. I appreciate it if you
> can
> point out a few ways, which can identify the cause of this incident.
> Thanks.
> --
> DL|||I'm wondering if a trigger could be created to store at least a
time/date and possibly login used to truncate? Or you could lock the
table down and then see what process receives an error while trying to
truncate. Probably some user in query analyzer|||On 5 Aug 2005 07:34:46 -0700, MICHAEL_SUNLIN@.COUNTRYWIDE.COM wrote:

>I'm wondering if a trigger could be created to store at least a
>time/date and possibly login used to truncate? Or you could lock the
>table down and then see what process receives an error while trying to
>truncate. Probably some user in query analyzer
Hi Michael,
Since TRUNCATE TABLE bypasses all trigger execution, your first
suggestion won't work.
The second suggestion will work, but it will also block all legitimate
inserts, updates and deletes. Not an option in most environments.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)

No comments:

Post a Comment