May 9, 2009 at 11:31 am
Comments posted to this topic are about the item Create Database
Thanks
Vinay Kumar
-----------------------------------------------------------------
Keep Learning - Keep Growing !!!
May 11, 2009 at 1:00 am
It does not create a database. The problem is not the .MP3 extension, but syntax.
I get Msg 102, Level 15, State 1, Line 3
Incorrect syntax near 'name'.
May 11, 2009 at 1:14 am
.mp3 - music database 🙂
"Keep Trying"
May 11, 2009 at 1:15 am
c:\ and C:\mssql\ should exists and sql account should have permissions to write.
May 11, 2009 at 2:31 am
Server: Msg 5105, Level 16, State 2, Line 1
Device activation error. The physical file name 'C:\mssql\MYTEST.doc' may be incorrect.
Server: Msg 1802, Level 16, State 1, Line 1
CREATE DATABASE failed. Some file names listed could not be created. Check previous errors.
You never specified that C:\mssql should exist.
May 11, 2009 at 2:36 am
Msg 5133, Level 16, State 1, Line 1
Directory lookup for the file "C:\mssql\MYTEST.doc" failed with the operating system error 2(error not found).
Msg 1802, Level 16, State 1, Line 1
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
So the answer for me is No.
May 11, 2009 at 2:53 am
So, a few problems here:
- "C:\mssql" is not a default install folder, and most people would probably not have their SQL server instance or files installed there;
- If you can successfully create a database file in "C:\", then your permissions are probably not set up securely. (?)
The intent (to demonstrate that file extensions don't matter) is good, but the question deserves some rework.
---
Edited (again): The syntax issue had nothing to do with SQL Server versions, it was a copy->paste issue from the email
http://poorsql.com for T-SQL formatting: free as in speech, free as in beer, free to run in SSMS or on your version control server - free however you want it.
May 11, 2009 at 4:08 am
NO for me too
May 11, 2009 at 4:49 am
Not for me:
CREATE DATABASE failed. Some file names listed could not be created. Check related errors
May 11, 2009 at 5:13 am
It will only create the database if the mssql directory exists.
Directory lookup for the file "C:\mssql\MYTEST.doc" failed
Regards
Tjaart
May 11, 2009 at 5:31 am
This question is very badly implemented. I knew it couldn't create a database on my system because it made too many assumptions:
1. Can I write to the root directory of my primary disc drive?
2. Do the absolute paths given for the file locations exist?
To the moderators of SQLServerCentral I repeat what I have said before: "Please ensure that questions posed can be answered based on knowledge of the question subject matter and that they are not affected unduly by local configurations.:
Kenneth Spencer
You never know: reading my book: "All about your computer" might just tell you something you never knew!
lulu.com/kaspencer
May 11, 2009 at 5:51 am
My MSSQL doesn't have permissions outside of "C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data". Therefore if you gave someone this script to run it could possibly fail on someone if they haven't modified permissions. So the answer is "YES," it will work to modify the extensions, but it is contingent upon other factors. This question is a little misleading for that reason.
***************
wnylibrarian
Buffalo, NY US
May 11, 2009 at 5:54 am
Msg 5133, Level 16, State 1, Line 1
Directory lookup for the file "C:\mssql\MYTEST.doc" failed with the operating system error 2(error not found).
Msg 1802, Level 16, State 1, Line 1
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
Me too.
May 11, 2009 at 7:12 am
Simply given the infomation stated, answer is "no".
Msg 5133, Level 16, State 1, Line 1
Directory lookup for the file "C:\mssql\MYTEST.doc" failed with the operating system error 2(The system cannot find the file specified.).
Msg 1802, Level 16, State 1, Line 1
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
May 11, 2009 at 7:14 am
I would rephrase the question:
is it possible to create a DB with this code?
The way you put the the question is tricky!
Viewing 15 posts - 1 through 15 (of 55 total)
You must be logged in to reply to this topic. Login to reply