not able to attach database AdventureWorks2008 comes with CD 70-433 sql 2008
-
22. března 2012 6:22
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
Všechny reakce
-
22. března 2012 8:15
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 -
22. března 2012 8:17Moderátor
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 -
23. března 2012 16:16thanks for your information i have downloaded the file without filestream and attached in database .It works.
-
23. března 2012 16:17it is giving the same error after removing the log file because still it is taking wrong path.
-
26. března 2012 23:16Moderátor
We are investigating this issue. I’ll reply with status within 3 days.
-
26. března 2012 23:50Moderátor
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 -
27. března 2012 11:41
check this link, this can help you
-
29. března 2012 19:48Moderátor
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.
-
3. dubna 2012 22:17Moderátor
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.
- Navržen jako odpověď Mr. WhartyMicrosoft Community Contributor, Moderator 4. dubna 2012 2:43
- Označen jako odpověď Mr. WhartyMicrosoft Community Contributor, Moderator 14. dubna 2012 10:15