Import AdventureWorks2012_Database.zip to SQL Server 2016

  • Hello team,
    Is it possible to import AdventureWorks2012_Database.zip to SQL Server 2016?

  • Yes, the database will just run in compatibility mode 110, as it is a SQL 2012 database.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • But there is no .mdf file type options?

  • flash_os - Tuesday, April 4, 2017 6:08 PM

    But there is no .mdf file type options?

    You'd want to do Attach instead of Restore.

    Sue

  • Still I have a problem: 🙁

  • This was removed by the editor as SPAM

  • flash_os - Tuesday, April 4, 2017 9:55 PM

    Still I have a problem: 🙁

    The error is telling you the problem here, permissions,. Most likely the service account can't access the location you saved the .mdf file. Looking at your image, it doesn't look like you've placed it in the default database folder, so does the Service Account have permissions to access the folder your blurred out?

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Don't ever try to put database files or backup files in the root of a drive. Windows protects those locations, especially the root of C
    Put it (and the log file and any other data files) into the default data directory, then you will be able to attach it.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • In case you're not sure, the default location will be something like:
    C:\Program Files\Microsoft SQL Server\MSSQL13.[SQL Instance Name]\MSSQL\DATA\

    Where [SQL Instance Name] is the name of the SQL instance you are trying to attach the database to.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Another error:

    Guys, can you please try to import into your SQL 2016 Server MS's sample DB?

  • flash_os - Wednesday, April 5, 2017 5:44 AM

    Another error:

    Guys, can you please try to import into your SQL 2016 Server MS's sample DB?

    I have done so previously already, No problems (our 2016 Dev server has both the AW2012 and WWI databases on it).

    Out of interest which file did you download from Codeplex? If it is the only that incldued the log file, did you include it in the folder?

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • I downloaded AdventureWorks2012_Database.zip and tried from separate folder but gives me the same result. :crying:

  • flash_os - Wednesday, April 5, 2017 6:29 AM

    I downloaded AdventureWorks2012_Database.zip and tried from separate folder but gives me the same result. :crying:

    I just did mine again - downloaded the 2012 adventure works, extracted the files to the location Thom already showed (\MSSQL\DATA\) and attached without any errors.

    Sue

  • Try downloading the .mdf file instead. Also, just in case, ensure that SQL server hasn't created any log files with the expected name for the AW2012 database. if it has, check they're not in use, and if not, remove them.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • I found workaround Restore database of AdventureWorks2012-Full Database Backup.zip

    https://msftdbprodsamples.codeplex.com/downloads/get/417885

    Thanks to all for your help.

Viewing 15 posts - 1 through 15 (of 15 total)

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