﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server Newbies  / Problem With AdventureWorks / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 22 May 2013 18:02:24 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Problem With AdventureWorks</title><link>http://www.sqlservercentral.com/Forums/Topic1391742-1292-1.aspx</link><description>Hi Pirrot,Excellent Question. I had exact same problem and recieved same error message. I spent about 3 hrs researching to finding the right resource to find the fix.What you need to do before you ATTACH this db, is run in query window:create database adventureworks2012on (filename = 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\AdventureWorksDW2012_Data.mdf')for attach_rebuild_log ;if you're using any other version of adventureworks just rename the file. Also notice, the path of the filename, you may need to edit it to fit you're specfic path.After you have run this query then you shouldn't get this error when attaching.Hope this helps.</description><pubDate>Tue, 25 Dec 2012 19:37:06 GMT</pubDate><dc:creator>VegasL</dc:creator></item><item><title>RE: Problem With AdventureWorks</title><link>http://www.sqlservercentral.com/Forums/Topic1391742-1292-1.aspx</link><description>The AdventureWorks files aren't files like Word or Excel. These are databases. You cannot browse them. They need to be attached to the SQL Server instance in order for it to perform queries on them.sp_attach_db or using the GUI (right click the Databases folder) you can attach the files. However it's not your account, it's the service account that runs SQL Server that does this. The best way to do this is to copy the .mdf and .ldf files to the \Data folder under SQL Server. This is usually under C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA or something similar.Then run the attach.</description><pubDate>Mon, 03 Dec 2012 14:50:44 GMT</pubDate><dc:creator>Steve Jones - SSC Editor</dc:creator></item><item><title>RE: Problem With AdventureWorks</title><link>http://www.sqlservercentral.com/Forums/Topic1391742-1292-1.aspx</link><description>Does the account that SQL was setup as have permissions to the location where you put the MDF file?</description><pubDate>Mon, 03 Dec 2012 14:19:51 GMT</pubDate><dc:creator>Joie Andrew</dc:creator></item><item><title>RE: Problem With AdventureWorks</title><link>http://www.sqlservercentral.com/Forums/Topic1391742-1292-1.aspx</link><description>Without an error message, I'm afraid I can't help you.  :w00t:  Can't diagnose what I can't see!  Do it again and see if you can get an error message.  Are you trying to use the 2012 version of AdventureWorks by accident?  That would make 2008 throw a fit, I'm sure.  If necessary, go to CodePlex and make sure you have downloaded the correct version.</description><pubDate>Mon, 03 Dec 2012 12:36:07 GMT</pubDate><dc:creator>pietlinden</dc:creator></item><item><title>RE: Problem With AdventureWorks</title><link>http://www.sqlservercentral.com/Forums/Topic1391742-1292-1.aspx</link><description>I found the error msg.  It says "Unable to open the physical file "C:\SSQL\AdventureWorksR2_Data.mdf".  Operating System error 5: "5(Access is denied.)" (Microsoft SQL Server, Error: 5120).:(</description><pubDate>Mon, 03 Dec 2012 12:35:58 GMT</pubDate><dc:creator>pirrot</dc:creator></item><item><title>RE: Problem With AdventureWorks</title><link>http://www.sqlservercentral.com/Forums/Topic1391742-1292-1.aspx</link><description>I think I'm almost there.  One problem though.  When I right click to attach the database and select the files I get this error message.  "An error occurred when attaching the database(s).  Click the hyperlink in the Message column for details".  I'm not sure where the message column is.  I only see the hyperlink to the view connection properties.</description><pubDate>Mon, 03 Dec 2012 12:30:55 GMT</pubDate><dc:creator>pirrot</dc:creator></item><item><title>RE: Problem With AdventureWorks</title><link>http://www.sqlservercentral.com/Forums/Topic1391742-1292-1.aspx</link><description>Did you unzip the database file(s)?  There should be two - one is an MDF file (database file) and the other is the LDF.Open SSMS.Right-click on Databaseschoose Attach Database...You should be prompted for the location of the MDF and LDF files.  If they're in the same directory, it's super easy.</description><pubDate>Sun, 02 Dec 2012 18:45:31 GMT</pubDate><dc:creator>pietlinden</dc:creator></item><item><title>RE: Problem With AdventureWorks</title><link>http://www.sqlservercentral.com/Forums/Topic1391742-1292-1.aspx</link><description>I don't know how to attach the database.</description><pubDate>Sun, 02 Dec 2012 18:17:11 GMT</pubDate><dc:creator>pirrot</dc:creator></item><item><title>RE: Problem With AdventureWorks</title><link>http://www.sqlservercentral.com/Forums/Topic1391742-1292-1.aspx</link><description>did you ever attach the database?  does it show up under the Databases folder in SSMS?</description><pubDate>Sun, 02 Dec 2012 14:27:36 GMT</pubDate><dc:creator>pietlinden</dc:creator></item><item><title>RE: Problem With AdventureWorks</title><link>http://www.sqlservercentral.com/Forums/Topic1391742-1292-1.aspx</link><description>I downloaded the AdventureWorksR2 data file on my C-Drive Folder.  Then I opened my SQL Server Express and opened a new query.  From there I could not navigate to the database on my C-Drive.</description><pubDate>Sun, 02 Dec 2012 14:14:02 GMT</pubDate><dc:creator>pirrot</dc:creator></item><item><title>RE: Problem With AdventureWorks</title><link>http://www.sqlservercentral.com/Forums/Topic1391742-1292-1.aspx</link><description>What did you try?  Did you try to attach it, restore it?</description><pubDate>Sun, 02 Dec 2012 13:00:54 GMT</pubDate><dc:creator>pietlinden</dc:creator></item><item><title>Problem With AdventureWorks</title><link>http://www.sqlservercentral.com/Forums/Topic1391742-1292-1.aspx</link><description>Hello:I am new to this forum and would like some help with SQL Server 2008 R2 Express.  I downloaded SQL with no problems, but I'm having problems loading the sample databases so SQL Server can recognize it.  Thank you for your help!</description><pubDate>Sun, 02 Dec 2012 12:22:29 GMT</pubDate><dc:creator>pirrot</dc:creator></item></channel></rss>