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