Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Peace2007
Posting Yak Master
239 Posts |
Posted - 2009-01-05 : 00:54:40
|
Hi, When I execute following query: CREATE LOGIN [SQL2005-2\newUser] FROM WINDOWS WITH DEFAULT_DATABASE = [master]I get: Msg 102...., Incorrect syntax near '-'.when I modify the above query to: CREATE LOGIN [[SQL2005-2]\newUser] FROM WINDOWS WITH DEFAULT_DATABASE = [master]I get: Msg 102, Level 15, State 1, Line 1Incorrect syntax near '-'.Msg 102, Level 15, State 1, Line 2Incorrect syntax near '\'.Msg 319, Level 15, State 1, Line 2Incorrect syntax near the keyword 'with'...Could I know how to resolve that? Thanks in Advance  |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-01-05 : 02:30:42
|
CREATE LOGIN [SQL2005-2]\newUser FROM WINDOWS WITH DEFAULT_DATABASE = [master] E 12°55'05.63"N 56°04'39.26" |
 |
|
|
Peace2007
Posting Yak Master
239 Posts |
Posted - 2009-01-05 : 02:58:35
|
| Thanks for the reply It also works by: CREATE LOGIN ['SQL2005-2'\newUser] FROM WINDOWS WITH DEFAULT_DATABASE = [master] |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2009-01-05 : 10:15:02
|
| moved from script library___________________________________________________________________________Causing trouble since 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.1 out! |
 |
|
|
Peace2007
Posting Yak Master
239 Posts |
Posted - 2009-01-10 : 01:00:44
|
| sorry I didn't get u spirit |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-10 : 02:50:50
|
quote: Originally posted by Peace2007 sorry I didn't get u spirit
you had posted in wrong forum. script library is for posting scripts created by posters. thats why spirit moved it to relevant forum. |
 |
|
|
|
|
|
|
|