SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Length limitation on domain user accounts
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

tfountain
Constraint Violating Yak Guru

USA
491 Posts

Posted - 04/02/2013 :  16:30:26  Show Profile  Reply with Quote
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

USA
5072 Posts

Posted - 04/02/2013 :  16:39:33  Show Profile  Visit russell's Homepage  Reply with Quote
is it a domain account or a local account?
Go to Top of Page

russell
Pyro-ma-ni-yak

USA
5072 Posts

Posted - 04/02/2013 :  16:42:03  Show Profile  Visit russell's Homepage  Reply with Quote
also...saw this? http://support.microsoft.com/kb/909264
Go to Top of Page

tfountain
Constraint Violating Yak Guru

USA
491 Posts

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

tfountain
Constraint Violating Yak Guru

USA
491 Posts

Posted - 04/03/2013 :  04:43:33  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000