not able to attach database AdventureWorks2008 comes with CD 70-433 sql 2008
-
Thursday, March 22, 2012 6:22 AM
Hi,
I have following version of sql server installed in my Machine.
Microsoft SQL Server 2008 R2 (RTM) -Enterprise Edition (64-bit)I have copied all the files in database folder in following path
C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER2008\MSSQL\DATA
and successfully attached the AdventureWorksDW2008 and Northwind database.
but when i go to attach AdventureWorks2008. It is giving me the error attached in image
I have enabled File stream.
I don't know why it is taking following path in error(please see image at the end)
C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA
instead of C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER2008\MSSQL\DATA
All Replies
-
Thursday, March 22, 2012 8:15 AM
Hello,
As its best you should download & install the AdventureWorks sample database from CodePlex: http://msftdbprodsamples.codeplex.com/releases/view/55926
Olaf Helper
* cogito ergo sum * errare humanum est * quote erat demonstrandum *
Wenn ich denke, ist das ein Fehler und das beweise ich täglich
Blog Xing -
Thursday, March 22, 2012 8:17 AMModerator
The transaction log for this databse is missing.
- Select the line containing File Type of Log (in the bottom half of the Attach Databases dialog)
- Click on the Remove button.
- Click on OK
The log file will get created once the DB is attached.
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
Jeff Wharton
MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt), MCT, MCPD, MCSD, MCITP, MCDBA
Blog: Mr. Wharty's Ramblings
Twitter: @Mr_Wharty
MC ID: Microsoft Transcript -
Friday, March 23, 2012 4:16 PMthanks for your information i have downloaded the file without filestream and attached in database .It works.
-
Friday, March 23, 2012 4:17 PMit is giving the same error after removing the log file because still it is taking wrong path.
-
Monday, March 26, 2012 11:16 PMModerator
We are investigating this issue. I’ll reply with status within 3 days.
-
Monday, March 26, 2012 11:50 PMModerator
it is giving the same error after removing the log file because still it is taking wrong path.
Then all you need to do is change the path to where the DB is.When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
Jeff Wharton
MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt), MCT, MCPD, MCSD, MCITP, MCDBA
Blog: Mr. Wharty's Ramblings
Twitter: @Mr_Wharty
MC ID: Microsoft Transcript -
Tuesday, March 27, 2012 11:41 AM
check this link, this can help you
-
Thursday, March 29, 2012 7:48 PMModerator
We are planning to update the AdventureWorks 2008 R2 OLTP database and script on http://msftdbprodsamples.codeplex.com/ within the next few days. I will update this thread with the CodePlex link and install instructions after we publish in a few days. Hopefully this update will help you. Please check back in a few days.
-
Tuesday, April 03, 2012 10:17 PMModerator
We uploaded an AdventureWorks 2008 R2 OLTP database and script to CodePlex (http://msftdbprodsamples.codeplex.com/releases/view/59211). Or http://msftdbprodsamples.codeplex.com and click on the SQL Server 2008 R2 OLTP tile.
Hopefully, this version is easier to attach and use.
As long as you copy the database to C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\DATA, you should be able to attach the AdventureWorks2008R2_Data.mdf database. As Mr. Wharty writes above, you will need to remove the transaction log reference.Or you can run the setup script. Follow these steps to install the sample database from the script:
- Download AdventureWorks 2008 R2 OLTP Script.zip (http://msftdbprodsamples.codeplex.com/releases/view/59211)
- Copy the DDL script files to any path such {SQL Server Path}\Tools\Samples\AdventureWorks 2008 OLTP Script.
Note The default SQL Server 2008 R2 path is C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\.
- Open {SQL Server Path}\Tools\Samples\AdventureWorks 2008 OLTP\instawdb.sql in SQL Server Management Studio.
- Update the script path variables.
- If necessary, change the :setvar SqlSamplesDatabasePath variable to your SQL Server 2008 R2 path. The default path is C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA.
- Change the :setvar SqlSamplesSourceDataPath variable to the path containing the .csv files.
- Uncomment each :setvar variable.
- On the Querymenu, click SQLCMD Mode.
- On the Standardtoolbar, click the Executebutton to run the script.
- Proposed As Answer by Mr. WhartyMicrosoft Community Contributor, Moderator Wednesday, April 04, 2012 2:43 AM
- Marked As Answer by Mr. WhartyMicrosoft Community Contributor, Moderator Saturday, April 14, 2012 10:15 AM

