locked
Max Characters for Domain Accounts in SQL 2012 RRS feed

  • Question

  • I have read that 20 characters is the max for SQL 2008, what is the max for 2012?
    Thursday, April 11, 2013 8:44 PM

Answers

  • The limit would be the same, but it should be more than 20 characters as far as SQL Server is concerned. The total space for a name is 128 characters, but that is including the domain name.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    • Proposed as answer by Olaf HelperMVP Friday, April 12, 2013 4:33 AM
    • Marked as answer by Fanny Liu Tuesday, April 16, 2013 10:02 AM
    Thursday, April 11, 2013 9:20 PM
  • So the gist of the Connect item is that Microsoft has not been able to reproduce the issue.

    Interesting enough when I tried to test it myself, I tried to create a user with a long name in Windows, but I was not able to enter more than 20 characters for the user name. This is on a machine Windows 7, but I don't have a domain. (Note here that SQL Server is not involved, but this is strictly a Windows limitation that I ran into.)


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    • Proposed as answer by Fanny Liu Monday, April 15, 2013 2:52 AM
    • Marked as answer by Fanny Liu Tuesday, April 16, 2013 10:02 AM
    Friday, April 12, 2013 9:31 PM

All replies

  • The limit would be the same, but it should be more than 20 characters as far as SQL Server is concerned. The total space for a name is 128 characters, but that is including the domain name.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    • Proposed as answer by Olaf HelperMVP Friday, April 12, 2013 4:33 AM
    • Marked as answer by Fanny Liu Tuesday, April 16, 2013 10:02 AM
    Thursday, April 11, 2013 9:20 PM
  • http://connect.microsoft.com/SQLServer/feedback/details/622787/windows-login-name-truncated-in-sql-server-over-20-characters

    I was wanted to name my put a naming scheme in place. Something like

    domain\PRD_SQL_DatabasenameXXX  but that is over 20 chars

    Would that cause a problem?

    Friday, April 12, 2013 2:11 PM
  • So the gist of the Connect item is that Microsoft has not been able to reproduce the issue.

    Interesting enough when I tried to test it myself, I tried to create a user with a long name in Windows, but I was not able to enter more than 20 characters for the user name. This is on a machine Windows 7, but I don't have a domain. (Note here that SQL Server is not involved, but this is strictly a Windows limitation that I ran into.)


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    • Proposed as answer by Fanny Liu Monday, April 15, 2013 2:52 AM
    • Marked as answer by Fanny Liu Tuesday, April 16, 2013 10:02 AM
    Friday, April 12, 2013 9:31 PM