SQL Server Home
Microsoft.SqlServer.Smo cannot create LOGIN of windows account
as By Design
6/30/2009 11:22:26 PM
User(s) can reproduce this bug
Hello SQL Server team,
When I tried to create a SQL LOGIN of windows account and it always failed with any local users and local groups. Meanwhile I cound create SQL LOGIN of windows domain users.
I fonud the machine name contained both of capital letter and small letter. (eg. 'TestMachine')
and SQL Server collation was binary (JAPANESE_BIN).
Afterwards I changed the machine name contained only capital letter and number (eg. 'TESTMACHINE7'), then I could create a SQL LOGIN of windows.
SQL Server 2008 - Developer Edition
Operating System Language
Steps to Reproduce
* Name your windows machine 'TestMachine'
* Join it to some active directory.
* Install SQL Server 2008 with a binary server collation (JAPANESE_BIN)
* Create a windows account 'testuser'.
* Try to create SQL LOGIN
"CREATE LOGIN [TestMachine\testuser] FROM WINDOWS"
I'm using Windows7RC now.
fail to create SQL LOGIN with a messagebox.
It says an exception occurred in Microsoft.SqlServer.Smo.
success to create SQL LOGIN
to post a comment.
Please enter a comment.
on 7/17/2009 at 10:39 AM
on 7/12/2009 at 10:06 PM
Sorry, I cannot replay it easily.
Yesterday after I changed my machine name to 'Jenya' but creating SQLLogin of Windows succeeded.
('Jenya' was the name of my machine when I was faced with the trouble.)
However, I find error messages in SQL Server Log at that time:
"Login failed for user 'NT AUTHORITY\SYSTEM' reason:...(japanese words) Error 18456, Level 14, State 38"
on 7/10/2009 at 3:24 AM
Thank you for your useful comments,
I will get a screen capture in this weekend, and make sure what error it is.
on 7/8/2009 at 1:07 PM
I am adding information about this problem to SQL Server Books Online. Can you tell me what SQL Server error you got? Did you receive error Msg 15401, Level 16, State 1, Line 1
Windows NT user or group <login> not found. Check the name again.
on 7/6/2009 at 4:42 PM
Correction, the optional second parameter should be 0, not 1.
on 7/6/2009 at 4:00 PM
Thanks for your feedback. This is by design as it depends upon the Windows and SQL Server collations and Windows does not provide any guarantees around the recognized "spelling" for the machine and account. However, one thing you can do is to issue the following command to print out the account name represenation from Windows:
suser_sname(suser_sid( <account name>, 1))
Then you will know the correct way to spell the login name.
to post a workaround.
Please enter a workaround.
© 2014 Microsoft