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. MSSQL how do I get the schema setup

MSSQL how do I get the schema setup

Scheduled Pinned Locked Moved Database
databasequestionsharepointsql-serverxml
4 Posts 3 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.
  • A Offline
    A Offline
    alex barylski
    wrote on last edited by
    #1

    I just started a new project and I need to work on the thing at home. I have permission to take what I need but I'm not sure what I'm looking for? I asked (and received) the Schema for the tables but whenever I try and run the SQL queries in the SQLServer query window I get all sorts of errors about missing LDF/MDF files:

    Msg 5133, Level 16, State 1, Line 2
    Directory lookup for the file "D:\_SQL_LOG\AXXX_CLQ_Log.LDF" failed with the operating system error 2(The system cannot find the file specified.).
    Msg 1802, Level 16, State 1, Line 2
    CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
    Msg 15010, Level 16, State 1, Procedure sp_dboption, Line 64
    The database 'AXXX_CLQ' does not exist. Supply a valid database name. To see available databases, use sys.databases.

    I'm wondering if it wouldn't be easier to just copy the actual files and move them into position? Unfortunately it looks as though the LOG files and data files are stored on different partitions and at home I only have one. How can I be sure to get a full copy of everything so it's easy to setup at home and get working on this in the evening? Cheers, Alex

    L W 2 Replies Last reply
    0
    • A alex barylski

      I just started a new project and I need to work on the thing at home. I have permission to take what I need but I'm not sure what I'm looking for? I asked (and received) the Schema for the tables but whenever I try and run the SQL queries in the SQLServer query window I get all sorts of errors about missing LDF/MDF files:

      Msg 5133, Level 16, State 1, Line 2
      Directory lookup for the file "D:\_SQL_LOG\AXXX_CLQ_Log.LDF" failed with the operating system error 2(The system cannot find the file specified.).
      Msg 1802, Level 16, State 1, Line 2
      CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
      Msg 15010, Level 16, State 1, Procedure sp_dboption, Line 64
      The database 'AXXX_CLQ' does not exist. Supply a valid database name. To see available databases, use sys.databases.

      I'm wondering if it wouldn't be easier to just copy the actual files and move them into position? Unfortunately it looks as though the LOG files and data files are stored on different partitions and at home I only have one. How can I be sure to get a full copy of everything so it's easy to setup at home and get working on this in the evening? Cheers, Alex

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi, there are a couple of possibilities: 1. change your fixed paths to something that exists on every relevant system, so if one doesn't have a D: then don't use D: anywhere 2. make the paths configurable somehow, so you can run the app with different paths on different machines; 3. add a D: partition to the machine that lacks one (Vista does not need a tool to do this, i.e. Computer Management can solve this;XP and earlier get changed most easily using Partition Magic or something similar) 4. on the machine(s) lacking D: use "Map network drive" to map D: to some existing folder on C: (see Explorer, Tools menu). In the short term I recommend 4; in the long term I would go for 2. :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      - before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


      A 1 Reply Last reply
      0
      • L Luc Pattyn

        Hi, there are a couple of possibilities: 1. change your fixed paths to something that exists on every relevant system, so if one doesn't have a D: then don't use D: anywhere 2. make the paths configurable somehow, so you can run the app with different paths on different machines; 3. add a D: partition to the machine that lacks one (Vista does not need a tool to do this, i.e. Computer Management can solve this;XP and earlier get changed most easily using Partition Magic or something similar) 4. on the machine(s) lacking D: use "Map network drive" to map D: to some existing folder on C: (see Explorer, Tools menu). In the short term I recommend 4; in the long term I would go for 2. :)

        Luc Pattyn [Forum Guidelines] [My Articles]


        - before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


        A Offline
        A Offline
        alex barylski
        wrote on last edited by
        #3

        Luc Pattyn wrote:

        change your fixed paths to something that exists on every relevant system, so if one doesn't have a D: then don't use D: anywhere

        Thing is all I have is the schema SQL file not the files which the schema seems to refer. Can I create empty files and assume that would work?

        1 Reply Last reply
        0
        • A alex barylski

          I just started a new project and I need to work on the thing at home. I have permission to take what I need but I'm not sure what I'm looking for? I asked (and received) the Schema for the tables but whenever I try and run the SQL queries in the SQLServer query window I get all sorts of errors about missing LDF/MDF files:

          Msg 5133, Level 16, State 1, Line 2
          Directory lookup for the file "D:\_SQL_LOG\AXXX_CLQ_Log.LDF" failed with the operating system error 2(The system cannot find the file specified.).
          Msg 1802, Level 16, State 1, Line 2
          CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
          Msg 15010, Level 16, State 1, Procedure sp_dboption, Line 64
          The database 'AXXX_CLQ' does not exist. Supply a valid database name. To see available databases, use sys.databases.

          I'm wondering if it wouldn't be easier to just copy the actual files and move them into position? Unfortunately it looks as though the LOG files and data files are stored on different partitions and at home I only have one. How can I be sure to get a full copy of everything so it's easy to setup at home and get working on this in the evening? Cheers, Alex

          W Offline
          W Offline
          Wendelius
          wrote on last edited by
          #4

          hat do you actually mean by schema? Do you refer to the MDF-file? If yes, then how have you taken it. Is it detached, just copied etc.

          The need to optimize rises from a bad design.My articles[^]

          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