Author |
Topic |
Hinduson
Yak Posting Veteran
69 Posts |
Posted - 2014-11-26 : 09:25:03
|
Please am new to SQL SERVER and am trying to create a database for practise and i keep getting error.THIS IS MY SYNTAX BELOW AND THE ERROR MESSSAGE I GET.Create Database EMPLOYEEON( NAME = employee_dat,FILENAME = 'C:\Program files\Microsoft sql server\MSSQL10.HINDU\MSSQL\Data\Employee_data.mdf',SIZE = 10,MAXSIZE = 50,FILEGROWTH = 5)LOG ON(NAME = Employee_log,Filename = 'C:\Program files\Microsoft sqlserver\MSSQL10.HINDU\MSSQL\Data\Employee_log.ldf',SIZE = 5MB,MAXSIZE = 25MB,FILEGROWTH = 5MB)GOMsg 5133, Level 16, State 1, Line 1Directory lookup for the file "C:\Program files\Microsoft sql server\MSSQL10.HINDU\MSSQL\Data\Employee_data.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 1CREATE DATABASE failed. Some file names listed could not be created. Check related errors.Best Regards. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2014-11-26 : 12:26:42
|
You have a hard return in your path. When I copied/pasted it, it shows up just like this:C:\Program files\Microsoft sql server\MSSQL10.HINDU\MSSQL\DataNote that I did not hit return after "sql". Remove the hard return: C:\Program files\Microsoft sql server\MSSQL10.HINDU\MSSQL\DataTara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
Hinduson
Yak Posting Veteran
69 Posts |
Posted - 2014-11-26 : 16:15:57
|
Thanks Tkizer, But am confused what you mean by HARD RETURN. Can you please explain and an example of how you think i should go about this. PleaseAm very greatfulBest Regards. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2014-11-26 : 16:20:43
|
I showed in my post what I think the issue is, but here you go. Don't edit it.Create Database EMPLOYEEON( NAME = employee_dat,FILENAME = 'C:\Program files\Microsoft sql server\MSSQL10.HINDU\MSSQL\Data\Employee_data.mdf',SIZE = 10,MAXSIZE = 50,FILEGROWTH = 5)LOG ON(NAME = Employee_log,Filename = 'C:\Program files\Microsoft sql server\MSSQL10.HINDU\MSSQL\Data\Employee_log.ldf',SIZE = 5MB,MAXSIZE = 25MB,FILEGROWTH = 5MB)GOTara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2014-11-26 : 16:21:12
|
Yours:C:\Program files\Microsoft sql server\MSSQL10.HINDU\MSSQL\DataMine:C:\Program files\Microsoft sql server\MSSQL10.HINDU\MSSQL\DataTara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2014-11-26 : 16:21:49
|
If that doesn't work, then you'll need to verify the path: C:\Program files\Microsoft sql server\MSSQL10.HINDU\MSSQL\DataTara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
Hinduson
Yak Posting Veteran
69 Posts |
Posted - 2014-11-26 : 16:24:31
|
Oh my God. It worked like Magic. I wish you are my teacher. But can you tell me where i went wrong and why i kept having the errors?I really appreciateBest Regards. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2014-11-26 : 16:25:38
|
Because the path can't have a line feed or carriage return in it, what I called a hard return, basically hitting "ENTER" on the keyboard. You hit enter in the middle of the path, likely so it wasn't off the screen. You can't do that.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
Hinduson
Yak Posting Veteran
69 Posts |
Posted - 2014-11-26 : 16:26:46
|
Ook Thank you very much Brother, May God bless you.Best Regards. |
|
|
Hinduson
Yak Posting Veteran
69 Posts |
Posted - 2014-11-26 : 16:29:16
|
Am sorry i just checked. You are a sister. Lol. Thanks alot Sis.Best Regards. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|