Link to home
Start Free TrialLog in
Avatar of musclejack
musclejack

asked on

Could not find row in sysindexes for database ID 7, object ID 1, Run DBCC CHECKTABLE on sysindexes.

Got this error when I tried to restore AdventureWorks sample db

Could not find row in sysindexes for database ID 7, object ID 1, Run DBCC CHECKTABLE on sysindexes.

COuld not open new database 'AdventureWorks'.  CREATEDATABSE is aborted (Microsoft SQL Server, Error:602)

any ideas how to fix it? thx
Avatar of Atlanta_Mike
Atlanta_Mike

Is this a SQL 2005 database? Are you trying to reattach it to 2000? That won't work if so.
Avatar of Aneesh
You can't restore a SQL 2005 DB in SQL server 2000
Ain't that what I said. And we're not sure that's what he's doing.
I just wanna stress that point :)
Are you truly trying to restore this database, or are you trying to attach it?
Avatar of musclejack

ASKER

no  iti s 2005.  Anyone?  serious answers please
The answers are serious answers, are you trying to restore this database or attach it?
attach it.
Well if you are definitely attaching it to SQL Server 2005, and not accidentally connecting to a SQL Server 2000 machine that error should not be occuring.

Try and download the Adventureworks sample database again and follow the instructions on the link:

http://www.microsoft.com/downloads/details.aspx?FamilyID=e719ecf7-9f46-4312-af89-6ad8702e4e6e&DisplayLang=en
It may be that your MDF is corrupt somehow.. But get the latest files from that linke, follow the instructions on the page and let us know what happens after doing that.

Make sure that the drives being used are accessible to SQL Server, make sure the SQL Server service account has permissions on the drive, and double check to make sure you are connecting to a SQL 2005 server (if you have SQL 2K in you environment and use SSMS to attach to both environments, it is easy to make that mistake).
Also - you only want the adventure works sample DB files at this point ,so just download those..

x86 if you are on 32bit OS (more likely)
x64 if you are on 64 bit (less likely)
Mike, on the MSM, it said localhost 8.00.2039, not 9.00....

i have sql server 2000 and 2005 on the same machine, how can i fix it without reinstall sql server 2005, thx
So you are connecting to the SQL 2000 machine. When you instaleld 2005 it asked you for a named instance? Connect to that named instance.
musclejack,
> how can i fix it without reinstall sql server 2005

I think you installed without creating a new sql server instance ,

You need to reinstall the sql server 2005. ( presently it uses the sql server 2000).. But remember to put another instance instead of the default instance
SQL Server 2000 and 2005 can coexist on the same server, but the second installation would  need a named instance unless the first already was a named instance.
or he could be connecting to the wrong instance, aneesh. Before attempting a reinstall let's first see if he has installed a named instance of 2005 first..
Hi, i reinstall 2005 with a new named instance, but still point to 8.00.2039, how to switch it. thx
What is still pointing to the 2000 instance? Are you using Maintenance Studio? Have you connected to the new instance?
ASKER CERTIFIED SOLUTION
Avatar of MikeWalsh
MikeWalsh
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
When attaching a database that was detached from another SQL Server instance.

I got the error message below:

Error 602: Could not find row in sysindexes for database ID 25, object ID 1,
index ID 1. Run DBCC CHECKTABLE on sysindexes.

 i am using SQL Server 2005

Thanks and Regards
I am trying to attach mdf file (2005), using sql server management studio. and i have sql server 2000 on my machine. I am getting this error.