Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Can't Create database

Can't Create database

Scheduled Pinned Locked Moved Database
databasesql-serverhelpsysadminsales
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    twsted f8
    wrote on last edited by
    #1

    Hi I am trying to create a database using T-SQL and i am getting the following error message. Msg 5133, Level 16, State 1, Line 1 Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\saledat.mdf" failed with the operating system error 3(The system cannot find the path specified.). Msg 1802, Level 16, State 1, Line 1 CREATE DATABASE failed. Some file names listed could not be created. Check related errors. I am using SQL server express 2005 which I recently installed on a new desktop. The script I am using to create the database is as follows. USE master; GO CREATE DATABASE Sales ON ( NAME = Sales_dat, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\saledat.mdf', SIZE = 10, MAXSIZE = 50, FILEGROWTH = 5 ) LOG ON ( NAME = Sales_log, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\salelog.ldf', SIZE = 5MB, MAXSIZE = 25MB, FILEGROWTH = 5MB ) ; GO I don't know what could be causing this error, and I would appreciate any help granted. Thanks in advance

    A M H 3 Replies Last reply
    0
    • T twsted f8

      Hi I am trying to create a database using T-SQL and i am getting the following error message. Msg 5133, Level 16, State 1, Line 1 Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\saledat.mdf" failed with the operating system error 3(The system cannot find the path specified.). Msg 1802, Level 16, State 1, Line 1 CREATE DATABASE failed. Some file names listed could not be created. Check related errors. I am using SQL server express 2005 which I recently installed on a new desktop. The script I am using to create the database is as follows. USE master; GO CREATE DATABASE Sales ON ( NAME = Sales_dat, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\saledat.mdf', SIZE = 10, MAXSIZE = 50, FILEGROWTH = 5 ) LOG ON ( NAME = Sales_log, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\salelog.ldf', SIZE = 5MB, MAXSIZE = 25MB, FILEGROWTH = 5MB ) ; GO I don't know what could be causing this error, and I would appreciate any help granted. Thanks in advance

      A Offline
      A Offline
      Andy_L_J
      wrote on last edited by
      #2

      I'm not certain, but doesn't

      twsted f8 wrote:

      MSSQL10.MSSQLSERVER

      refer to a SQL Server 2008 instance? (Does on my machine)

      I don't speak Idiot - please talk slowly and clearly 'This space for rent' Driven to the arms of Heineken by the wife

      1 Reply Last reply
      0
      • T twsted f8

        Hi I am trying to create a database using T-SQL and i am getting the following error message. Msg 5133, Level 16, State 1, Line 1 Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\saledat.mdf" failed with the operating system error 3(The system cannot find the path specified.). Msg 1802, Level 16, State 1, Line 1 CREATE DATABASE failed. Some file names listed could not be created. Check related errors. I am using SQL server express 2005 which I recently installed on a new desktop. The script I am using to create the database is as follows. USE master; GO CREATE DATABASE Sales ON ( NAME = Sales_dat, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\saledat.mdf', SIZE = 10, MAXSIZE = 50, FILEGROWTH = 5 ) LOG ON ( NAME = Sales_log, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\salelog.ldf', SIZE = 5MB, MAXSIZE = 25MB, FILEGROWTH = 5MB ) ; GO I don't know what could be causing this error, and I would appreciate any help granted. Thanks in advance

        M Offline
        M Offline
        Mycroft Holmes
        wrote on last edited by
        #3

        If you are creating this on a server then make sure that path exists ON THE SERVER.

        Never underestimate the power of human stupidity RAH

        1 Reply Last reply
        0
        • T twsted f8

          Hi I am trying to create a database using T-SQL and i am getting the following error message. Msg 5133, Level 16, State 1, Line 1 Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\saledat.mdf" failed with the operating system error 3(The system cannot find the path specified.). Msg 1802, Level 16, State 1, Line 1 CREATE DATABASE failed. Some file names listed could not be created. Check related errors. I am using SQL server express 2005 which I recently installed on a new desktop. The script I am using to create the database is as follows. USE master; GO CREATE DATABASE Sales ON ( NAME = Sales_dat, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\saledat.mdf', SIZE = 10, MAXSIZE = 50, FILEGROWTH = 5 ) LOG ON ( NAME = Sales_log, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\salelog.ldf', SIZE = 5MB, MAXSIZE = 25MB, FILEGROWTH = 5MB ) ; GO I don't know what could be causing this error, and I would appreciate any help granted. Thanks in advance

          H Offline
          H Offline
          Henry Minute
          wrote on last edited by
          #4

          On my system the path for SQL Express 2005 is:

          FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL1\MSSQL\DATA\saledat.mdf',

          Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

          A 1 Reply Last reply
          0
          • H Henry Minute

            On my system the path for SQL Express 2005 is:

            FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL1\MSSQL\DATA\saledat.mdf',

            Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

            A Offline
            A Offline
            Andy_L_J
            wrote on last edited by
            #5

            I ran the script and it created a Sql Server 2008 database in the specified folders. The path the op is using is definitely for 2008, and if he was using a 2005 instance then the default path should have been what you posted - notice no comments from the op for over 4 hours.

            I don't speak Idiot - please talk slowly and clearly 'This space for rent' Driven to the arms of Heineken by the wife

            H 1 Reply Last reply
            0
            • A Andy_L_J

              I ran the script and it created a Sql Server 2008 database in the specified folders. The path the op is using is definitely for 2008, and if he was using a 2005 instance then the default path should have been what you posted - notice no comments from the op for over 4 hours.

              I don't speak Idiot - please talk slowly and clearly 'This space for rent' Driven to the arms of Heineken by the wife

              H Offline
              H Offline
              Henry Minute
              wrote on last edited by
              #6

              Still no response after 18hrs. At this rate you'll be on your Hols before we know if the problem was resolved.

              Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups