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
 General SQL Server Forums
 Data Corruption Issues
 Table Dropping Mysteriously

Author  Topic 

scptech
Starting Member

8 Posts

Posted - 2011-09-15 : 13:00:01
I support an ASP.NET application that uses a SQL Server database. The installed sites have SQL Server 2005 express, Standard or Enterprise, typically running on a server with Windows server 2008 O/S.

There are in excess of 100 tables defined in the database one is named servicesgroups.

This table (and only this table) seems to mysteriously disappear, randomly, and from all sites.

The application has no 'drop table' statements at all, only selects, deletes and updates to existing tables.

I am at a total loss to understand how a table disappears, and wondering if it has something to do with the table name servicesgroups?

Any ideas will be greatly appreciated.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-09-15 : 13:14:43
Run DBCC CHECKDB on the database to verify if this is data corruption.

The table name doesn't matter. Either it's data corruption or you've got a bug in your software that is doing this.

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

Subscribe to my blog
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-09-15 : 14:14:16
Someone or some app is dropping it.

Data corruption doesn't cause missing tables. It causes high-severity errors. Run a profiler trace or look in the default trace for info on who dropped it and from where.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

scptech
Starting Member

8 Posts

Posted - 2011-09-15 : 17:55:32
Thanks for the responses.

I ran a dbcc, no issues (CHECKDB found 0 allocation errors and 0 consistency errors in database 'port'.
DBCC execution completed.)

I have found the issue - it was a delete trigger for another table which inadvertently had a 'drop table ....' statement.

Thanks for your expertise.
Go to Top of Page
   

- Advertisement -