I have one Data Base,
Today one strange thing occur, one table of my data base disappear , I didnt
drop it, then i would like know if have way to determine when this occur;
The last w

Any one knows, how to help-me.
I use SQL Server 2005 SP1
Thanks to allyou can have a DDL trigger defined for DROP objects.. Don't know the exact
syntax..
you can check the BOL..
In this DDL trigger you can select the event details and insert it to a
table.|||You can DDL trigger for logging and Event Notification in S2K5.
"Retf"?? ??? ??:
> Hi all,
> I have one Data Base,
> Today one strange thing occur, one table of my data base disappear , I did
nt
> drop it, then i would like know if have way to determine when this occur;
> The last w

>
> Any one knows, how to help-me.
> I use SQL Server 2005 SP1
> Thanks to all
>
>|||SQL Server 2005 has an always running trace - called "default trace". All ob
ject drop/alter/creation is audited (among other things). It keeps the histo
ry in up to 5 separate trace files with a limit of 20 MB per file. Since on
every SQL server restart a
new file is created the history is limited also by the last 5 SQL Server res
tarts. Here is how to get the information (assuming you have the default fil
e layout):
SELECT * FROM fn_trace_gettable
('C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\log.trc', default)
If you have lots of trace files under your LOG folder, find the last bunch o
f continuous file numbers and use the first file number. For instance if you
see log_154.trc, log_155.trc, log_156.trc, log_157.trc, use:
SELECT * FROM fn_trace_gettable
('C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\log_154.trc', defa
ult)
Thanks,
-Ivan
--Original Message--
From: hongjujung
Posted At: Friday, May 19, 2006 10:21 PM
Posted To: microsoft.public.sqlserver.programming
Conversation: How know when one Table was droped? HELP-ME
Subject: RE: How know when one Table was droped? HELP-ME
You can DDL trigger for logging and Event Notification in S2K5.
"Retf"?? ??? ??:
> Hi all,
> I have one Data Base,
> Today one strange thing occur, one table of my data base disappear , I
> didnt drop it, then i would like know if have way to determine when
> this occur;
> The last w

>
> Any one knows, how to help-me.
> I use SQL Server 2005 SP1
> Thanks to all
>
>
No comments:
Post a Comment