Friday, February 17, 2012

Could anyone attach the AdventureWorksDW to their SQL Server database engine?

Hi, all here,

I got a problem when trying to attach the AdventureWorksDW sample database to the SQL Server database engine. Error occured as:could not find row in sysindexes for database ID 21, object ID 1, index ID 1, Run DBCC CHECKTABLE on sysindexes. The sample database was downloaded from

http://www.microsoft.com/downloads/details.aspx?FamilyID=e719ecf7-9f46-4312-af89-6ad8702e4e6e&DisplayLang=en.

So could anyone help me to solve this problem tho? thanks a lot for any guidance and help.

Hi Hellen,

Try isntall from scripts.. look this URL on BOL

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/7de6ceb0-be7a-4309-894b-a0963dc6c27b.htm

thx
Nilton

|||

Hi, Nilton, thanks a lot for your guidance.

My problem is: during the set up of the SQL Server 2005, the sample database was not selected to be installed, thus I actully not need to reinstall it in this way. Since currently I dont have the CD available tho.

My question is: the sample database is actually available online now, and I have got the database .mdf and .ldf files, while I cant attach the database to the SQL Server then? Thanks a lot in advance for your further guidance.

|||

Hi Helen,

Try the follow:

1. Create the AdvantureWorksDW on SQL Server with the same name and size that your .mdf and .ldf files. (note the path)
2. Detach the created database.
3. Locate files of the create database e replace it with you mdf and ldf files.
4. Try attach the database

I think that is should work

regards
Nilton Pinheiro

|||

Hi, Nilton,

thanks a lot. I have tried all the ways you taught me, but it just did not work. I tried different database files as well, but none of them could be attached to my SQL Server, it must be the problem of the Server tho. But I am not sure where is indeed the problem. Really need help.

Thanks a lot.

|||

Hi Helen,

You it applied the SP1 for the SQL Server 2005? If not, to apply and later tries again.

http://www.microsoft.com/downloads/details.aspx?familyid=CB6C71EA-D649-47FF-9176-E7CAC58FD4BC&displaylang=en

Otherwise try a previous version of sample (December 2005).

http://www.microsoft.com/downloads/details.aspx?familyid=9697AAAA-AD4B-416E-87A4-A8B154F92787&displaylang=en

regards
Nilton Pinheiro
www.mcdbabrasil.com.br

|||

Hi, Nilton,

Thanks a lot. I have tried ages to fix that problem, as you taught me tring to create a database first and then detach it, then replace its .mdf and .ldf files with my .mdf and .ldf files, then trying to attach the database again with SQL Scripts in Server management studio, but only those files created on my local host can be attached, other database files from outside of my local computer wont work. The error occured as I posted above. So what can I try to attach database files from outside of my local computer then? Really need help. Thanks a lot.

Kind regards,

|||

I am having the same exact problem and have been unable to find a resolution. Please post if/when you find something out.

Thanks,

Mike

No comments:

Post a Comment