yrstruly Posted November 18, 2015 Share Posted November 18, 2015 Im am trying to do this SQL code; CREATE DATABASE AdventureWorks2012 ON (FILENAME = '{drive}:\ {file path}\AdventureWorks2012_Data.mdf') I am getting the following error when i run it: Msg 1036, Level 16, State 2, Line 1 File option NAME is required in this CREATE/ALTER DATABASE statement. My file location is: '{c}:/AAPOLLIS-M/Users/aapollis/Downloads/AdventureWorks2012_Data.mdf') What am i doing wrong? Running on SQL Server 2014(free or trial version). Link to comment Share on other sites More sharing options...
justsomeguy Posted November 18, 2015 Share Posted November 18, 2015 It wants you to specify a name. Check the filespec definition here for the fields you can use, according to that name and filename are required: https://msdn.microsoft.com/en-us/library/ms176061.aspx Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now