Can't Attach AdventureWorksLT2012 to SQL2012

  • I'm attending an online training course for SQL Server 2012 Administration.

    I've been working with AdventureWorks2012, but the course uses AdventureWorksLT2012. The included databases are different, therefore I need the LT version to follow the lessons.

    When I attempt to "attach" the LT version located in (c:/programfiles/Microsoft SQL Server) I get the following error message and I'm not quite sure what this means.

    Well I can't copy paste the error message, so I'll type the gist of it:

    [highlight=#ffff11]An exception occurred while executing a TRansact-SQL statement or batch (Microsoft.SqlServer.ConnectionInfo)

    --CREATE FILE encountered operating system error 5(Access is Denied.) while attempting to open or create the physical file 'C:\Program Files\MIcrosoft Sql Server\AdventureworksLT2012_log.Idf'

    blah blah blah...........the log.idf may be incorrect. (MS SQL Server Error: 5123)[/highlight]

    I am the administrator of my personal pc (this is a local installation).

    Any ideas?

    Many thanks, Lisa

  • Have a look at this link and see if it helps.

  • Thanks Lizzie,

    I had already done what you suggested. What the problem was, is that I had the Database in the wrong location in Explorer. I moved it around and finally got it to attach.

    Thanks so much for your speedy response!

    Lisa

  • Make sure path exists and retry your operation by opening your SSMS with "Run as Admin".

  • That's great.

  • lmpotthoff (2/21/2014)


    Thanks Lizzie,

    I had already done what you suggested. What the problem was, is that I had the Database in the wrong location in Explorer. I moved it around and finally got it to attach.

    Thanks so much for your speedy response!

    Lisa

    Hi everyone,

    I am experiencing the same issue as Impotthoff did and have attempted what has been suggested here to no avail, unfortunately. Do any of you know the correct location in Explorer for this database (that Impotthoff mentions)?

    Any assistance would be appreciated - thanks in advance.

    Cheers.

  • Finally figured it out now - thanks.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply