SQLTeam.com | Weblogs | Forums

How to fix the error in my database?

sql2008

#1

Hi,

I have a database. I can attach it to SQL Server with
Management Studio and perform query on the tables. But when I run the following
commands:

ALTER DATABASE UFDATA_008_2013 SET SINGLE_USER;

DBCC CHECKDB('UFDATA_008_2013', REPAIR_REBUILD);

I will get the following errors:

Msg 8921,Level
16,State
1,Line

3

Check terminated. A failure was detected while collecting
facts. Possibly tempdb out of space or a system table is inconsistent. Check
previous errors.

Msg 605,Level
21,State
3,Line

3

Attempt to fetch logical page (1:209549) in database 6
failed. It belongs to allocation unit 72057600521535488 not to 281474979397632.

I then try with the following commands by switch to
emergency mode and invoke checkdb with REPAIR_ALLOW_DATA_LOSS, but still get
the above error messages:

ALTER DATABASE UFDATA_008_2013 SET EMERGENCY;

ALTER DATABASE UFDATA_008_2013 SET SINGLE_USER;

DBCC CHECKDB('UFDATA_008_2013', REPAIR_ALLOW_DATA_LOSS);

ALTER DATABASE UFDATA_008_2013 SET MULTI_USER;

How to fix the problem? I do NOT have a backup of the
database.

Thank you very much.


#2

You may have corruption on the restored DB, you can try TABLOCK with your query to bypass the error.
https://support.microsoft.com/en-us/kb/960791


#3

The SQL Server error 8921 can also be occur due to some hardware level issue try to contact with your primary service provider or you can also try a third party tool like SysTools SQL Recovery