I am creating my first database using T SQL. I am working form a book and have checked for typos and any other things that may be obvious. I got this directory path
from the address bar where these files are stored. I copied and pasted this to avoid typos.
I get a couple errors when I execute my script. Here is the code that I am using.
CREATE DATABASE Accounting
ON
(NAME = 'Accounting',
FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\
Data\AccountingData.mdf',
SIZE = 10,
MAXSIZE = 50,
FILEGROWTH = 5)
LOG ON
(NAME = 'AccountingLog',
FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\
Data\AccountingLog.ldf',
SIZE = 5MB,
MAXSIZE = 25MB,
FILEGROWTH = 5MB)
GO
These are the errors that I got.
Please help,
Thanks
Msg 5133, Level 16, State 1, Line 1 Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL Data\AccountingData.mdf" failed with the operating system error 123(The filename, directory name, or volume label syntax is incorrect.).
Msg 1802, Level 16, State 1, Line 1 CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
This post is identical to the post you made on Jul 1, located here.
A suggest was supplied then, have you tried it?
|||Thanks, I just tried it. I also found a typo in the name for the "Accounting.mdf" file. I had "Accouting.mdf" on accident. I think that since I didn't have the typo before that your solution was what fixed it. I am working out of a book that basically shows the same thing. It's strange that it wouldn't work. I guess that is a by product of trying to get it to fit onto the page.
-Thanks for the help
No comments:
Post a Comment