locked
Uploading Adventure works in a Ms SQL server 2012 installed in virtual machine environment {VMWARE] RRS feed

  • Question

  • Hi,

    Uploading Adventure works in a Ms SQL server 2012 installed in virtual machine environment[VMWARE] has always returned this error, below:

    Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\AdventureWorks2012_Log.ldf". Operating system error 2: "2(The system cannot find the file specified.)". (Microsoft SQL Server, Error: 5120)

    Please how do i solve this? Thanks


    Sunday, February 14, 2016 1:38 AM

Answers

All replies

  • Hi,

    Uploading Adventure works in a Ms SQL server 2012 installed in virtual machine environment[VMWARE] has always returned this error, below:

    Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\AdventureWorks2012_Log.ldf". Operating system error 2: "2(The system cannot find the file specified.)". (Microsoft SQL Server, Error: 5120)

    Please how do i solve this? Thanks


    What do you mean by uploading ? You can attach or restore a database. Can you check whether the file

    C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\AdventureWorks2012_Log.ldf

    Exists


    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

    My Wiki Articles

    MVP

    Sunday, February 14, 2016 5:20 AM
  • Good day,

    If I am guessing correctly, then you got the mdf file without the log file.

    1. You can download the database from this link in several formatted. I think that the easier is to use the bak file which is the backup database file. All you need is simply to restore it in your server.

    http://msftdbprodsamples.codeplex.com/releases/view/55330 

    To attach the database without the LDF file using the GUI interface, select the LDF file in the file list, and then click remove button. If your database was cleanly shutdown (as the AdventureWorks2012 Data File is), this should work without issues (in production you might lose some information).

    Another option is using simple query as this:
    http://blog.sqlauthority.com/2010/04/26/sql-server-attach-mdf-file-without-ldf-file-in-database/



    signature   Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]    [Linkedin]


    Monday, February 15, 2016 12:06 AM