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
 Apparent Data corruption in table

Author  Topic 

ColinD
Starting Member

40 Posts

Posted - 2007-04-17 : 05:25:11
Hi,
I use SQL Server 2000 as a backend database for my Access Front end. It has been working fine for months with no problems.
This morning I arrived in work to find a problem with a table called "TimeSheets". If I try to access the table through Access I get an ODBC timeout error. Likewise, if I open the table in Enterprise manager, it opens fine, but any sorts or if I try to go to the last record, it returns the following error: "[Microsoft][ODBC SQL Server Driver] Timout expired".

So I tried to query the table in SQL Query Analyzer. Everytime it freezes on record 15,936. The table holds 17,643 records.

I tried running DBCC CHECKTABLE ('Timesheets'), and get the following message:

DBCC results for 'Timesheet - Item'.
There are 17643 rows in 401 pages for object 'Timesheet - Item'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

I can't see any error messages, but by now I'm reaching the limit of my knowledge of SQL Server.

So, can anybody please help me with this? Any suggestions why my table has apparently become corrupted? Any suggestions how I might fix it?

Thanks a lot for any help

Colin




bpgupta
Yak Posting Veteran

75 Posts

Posted - 2007-04-17 : 05:33:15
Execute SET ROWCOUNT 17643
then run the statment
select * from Timesheet
from Query analyzer
Go to Top of Page

ColinD
Starting Member

40 Posts

Posted - 2007-04-17 : 05:36:10
quote:
Originally posted by bpgupta

Execute SET ROWCOUNT 17643
then run the statment
select * from Timesheet
from Query analyzer



Thanks. I tried that but it still hangs on record 15936.

Colin
Go to Top of Page

ColinD
Starting Member

40 Posts

Posted - 2007-04-17 : 06:16:23
Hi
Problem solved, (slightly embarassingly). I had overlooked one user, and it appears that he was locking the table.

Thanks for all of your help

Colin
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-04-17 : 07:32:30
"I tried running DBCC CHECKTABLE ('Timesheets'), and get the following message:
...
I can't see any error messages, but by now I'm reaching the limit of my knowledge of SQL Server.
"

I reckon your best bet, in such circumstances, is:

DBCC CHECKDB('MyDatabaseName') WITH NO_INFOMSGS

which will display nothing if there are no problems, so if you do get some output you'll know there is a problem - that way you won't need to know how to distinguish informational messages from error messages!

Kristen
Go to Top of Page
   

- Advertisement -