Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Single table cleared

Author  Topic 

JohanL
Starting Member

2 Posts

Posted - 2009-10-01 : 12:34:31
Hello I have a strange error, in MS SQL 2005 one of the tables is re-created it has data and then the next day it is completely empty. Any suggestions on where I can look for the problem?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-10-01 : 13:01:13
This isn't a data corruption issue, so I am moving the topic to a better forum.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-10-01 : 13:01:53
To answer your question, you can run SQL Profiler to determine what/who is deleting the data.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

JohanL
Starting Member

2 Posts

Posted - 2009-10-01 : 13:23:02
Thanks I am busy running Profiler, any other suggestions as it does not happen at specific times it happened twice today though
Go to Top of Page

gvphubli
Yak Posting Veteran

54 Posts

Posted - 2009-10-01 : 13:50:39
If profiler output is filling up and you are having issues in managing the profiler output size, configure the filter appropriately.

How about having a trigger on a table, also look at using the DDL triggers that were introduced in SQL 2005, so that you can track the table DROP and CREATE as and when it happens.


TechnologyYogi
http://gvphubli.blogspot.com/
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2009-10-01 : 14:47:39
yeah...put a trigger on the table and log the event, the host and the user to a log table



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -