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)
 Error trying to attach a database after disaster

Author  Topic 

pierznj
Starting Member

8 Posts

Posted - 2008-10-13 : 01:42:25
Our web host had a disastrous power failure causing extensive data loss. We did manage to get an image of the system from about six weeks ago, better than nothing. Now I'm trying to restore the databases, but when I go attach any of the databases in that backup, I get an error message:
Error: 602, Severity: 21, State: 50
Could not find row in sysindexes for database ID 5, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes.

This is apparently something you get when trying to attach 2005 dbs to MSSQL 2000, but that is not the case here. Does anyone have any idea what might cause this? I'm pretty desperate - those databases contain months of work.

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2008-10-15 : 15:02:03
Are you trying to attach or restore? If attach, do you have a database backup that you can restore?

What version of SQL was the DB last connected to and what version are you trying to attach it to? That looks like a SQL 2000 error message.

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

SimpleSQL
Yak Posting Veteran

85 Posts

Posted - 2008-10-16 : 03:41:30
The error indicates corruption in the database. Do you have any backups that you can restore. If not, then one of the thing you can try is

1. create new database with same name.
2. Stop SQL Server, replace newly created MDF/LDF files for the new database with the MDF/LDF files that are trying to attach.
3. start SQL Server, this should bring database in suspect mode, should recovery fail to recover database.
4. You can put DB in emergency mode and run CHECKDB to see what kind of corruption you have.
5. You can extract as much data as possible from thsi database.
Go to Top of Page
   

- Advertisement -