Create Database

  • Comments posted to this topic are about the item Create Database

    Thanks
    Vinay Kumar
    -----------------------------------------------------------------
    Keep Learning - Keep Growing !!!

  • It does not create a database. The problem is not the .MP3 extension, but syntax.

    I get Msg 102, Level 15, State 1, Line 3

    Incorrect syntax near 'name'.

  • .mp3 - music database 🙂

    "Keep Trying"

  • c:\ and C:\mssql\ should exists and sql account should have permissions to write.

  • Server: Msg 5105, Level 16, State 2, Line 1

    Device activation error. The physical file name 'C:\mssql\MYTEST.doc' may be incorrect.

    Server: Msg 1802, Level 16, State 1, Line 1

    CREATE DATABASE failed. Some file names listed could not be created. Check previous errors.

    You never specified that C:\mssql should exist.

  • Msg 5133, Level 16, State 1, Line 1

    Directory lookup for the file "C:\mssql\MYTEST.doc" failed with the operating system error 2(error not found).

    Msg 1802, Level 16, State 1, Line 1

    CREATE DATABASE failed. Some file names listed could not be created. Check related errors.

    So the answer for me is No.

  • So, a few problems here:

    - "C:\mssql" is not a default install folder, and most people would probably not have their SQL server instance or files installed there;

    - If you can successfully create a database file in "C:\", then your permissions are probably not set up securely. (?)

    The intent (to demonstrate that file extensions don't matter) is good, but the question deserves some rework.

    ---

    Edited (again): The syntax issue had nothing to do with SQL Server versions, it was a copy->paste issue from the email

    http://poorsql.com for T-SQL formatting: free as in speech, free as in beer, free to run in SSMS or on your version control server - free however you want it.

  • NO for me too

  • Not for me:

    CREATE DATABASE failed. Some file names listed could not be created. Check related errors

  • It will only create the database if the mssql directory exists.

    Directory lookup for the file "C:\mssql\MYTEST.doc" failed

    Regards

    Tjaart

  • This question is very badly implemented. I knew it couldn't create a database on my system because it made too many assumptions:

    1. Can I write to the root directory of my primary disc drive?

    2. Do the absolute paths given for the file locations exist?

    To the moderators of SQLServerCentral I repeat what I have said before: "Please ensure that questions posed can be answered based on knowledge of the question subject matter and that they are not affected unduly by local configurations.:

    Kenneth Spencer

    You never know: reading my book: "All about your computer" might just tell you something you never knew!
    lulu.com/kaspencer

  • My MSSQL doesn't have permissions outside of "C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data". Therefore if you gave someone this script to run it could possibly fail on someone if they haven't modified permissions. So the answer is "YES," it will work to modify the extensions, but it is contingent upon other factors. This question is a little misleading for that reason.

    ***************
    wnylibrarian
    Buffalo, NY US

  • Msg 5133, Level 16, State 1, Line 1

    Directory lookup for the file "C:\mssql\MYTEST.doc" failed with the operating system error 2(error not found).

    Msg 1802, Level 16, State 1, Line 1

    CREATE DATABASE failed. Some file names listed could not be created. Check related errors.

    Me too.

  • Simply given the infomation stated, answer is "no".

    Msg 5133, Level 16, State 1, Line 1

    Directory lookup for the file "C:\mssql\MYTEST.doc" failed with the operating system error 2(The system cannot find the file specified.).

    Msg 1802, Level 16, State 1, Line 1

    CREATE DATABASE failed. Some file names listed could not be created. Check related errors.

  • I would rephrase the question:

    is it possible to create a DB with this code?

    The way you put the the question is tricky!

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

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