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 2000 Forums
 SQL Server Administration (2000)
 Problem Attaching Database to SQL Server 2005

Author  Topic 

mcrors_calhoun
Starting Member

22 Posts

Posted - 2006-08-23 : 10:46:58
I have been working with SQL Server for about 4 months and I am trying to attach the AdventureWorks Database to my Server so that I can run through some tutorials and demos.

I downloaded the AdventureWorks mdf and ldf file from the internet. Then I opened management studio, right clicked on the server and selected attach. After this I selected the AdventureWorks_Data.mdf file from the SQLServer folder. When I click on ok I get the following error message:

---------------------------------------------------------------------
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

Could not find row in sysindexes for database ID 8, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes.
Could not open new database 'AdventureWorks'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 602)

---------------------------------------------------------------------

I then tried to attach it from the sqlcmd prompt line using the following statment:

exec sp_attach_db @dbname=N'AdventureWorks', @filename1=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf', @filename2=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_log.ldb'

But this gives the same error.

I ran the DBCC CHECKTABLE on sysindexes but this returned no errors or no indications as to what is going wrong.

Can someone please help me get to the bottom of this

Cheers

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2006-08-23 : 11:19:16
you downloaded adventureworks from here right?

http://www.microsoft.com/downloads/details.aspx?familyid=E719ECF7-9F46-4312-AF89-6AD8702E4E6E&displaylang=en




-ec
Go to Top of Page

mcrors_calhoun
Starting Member

22 Posts

Posted - 2006-08-23 : 11:22:39
yeah. Thats where I got it from
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2006-08-23 : 11:29:40
check out this thread http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=122618&SiteID=1

doesn't look like there is a definite solution to this problem, but there are some steps listed that might help you get through this problem.



-ec
Go to Top of Page
   

- Advertisement -