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.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Length limitation on domain user accounts

Author  Topic 

tfountain
Constraint Violating Yak Guru

491 Posts

Posted - 2013-04-02 : 16:30:26
I'm attempting to create a login from a Windows account like so:
USE [master]
GO
CREATE LOGIN [DOMAIN\MyLongerThan20CharacterServiceAccount] FROM WINDOWS WITH DEFAULT_DATABASE=[master];
GO


But this fails with the error:
Msg 15401, Level 16, State 1, Line 1
Windows NT user or group 'DOMAIN\MyLongerThan20CharacterServiceAccountnot found. Check the name again.


This account however does exist. If I attempt to shorten it to 20 characters (pre-Windows 2000 format) it works!
USE [master]
GO
CREATE LOGIN [DOMAIN\MyLongerThan20Charac] FROM WINDOWS WITH DEFAULT_DATABASE=[master];
GO


Has anyone ran across this 20 character limitation before? I'm assuming there is a simple fix or configuration setting to correct this behavior but I'm hoping someone can chime in on what that is.

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2013-04-02 : 16:39:33
is it a domain account or a local account?
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2013-04-02 : 16:42:03
also...saw this? http://support.microsoft.com/kb/909264
Go to Top of Page

tfountain
Constraint Violating Yak Guru

491 Posts

Posted - 2013-04-03 : 04:41:32
It's a domain account, as illustrated by my example.
Go to Top of Page

tfountain
Constraint Violating Yak Guru

491 Posts

Posted - 2013-04-03 : 04:43:33
russell - thanks for that link. That lead me to something else. Evidently the 20 character limit is a "backwards compatibility" limitation of the SAM Account Name. If SQL Server only supported the username@domain.com syntax I'd be better :).
Go to Top of Page
   

- Advertisement -