SQL Server Service Accounts Max Character Length

by Dennis Peterson   Last Updated August 14, 2019 03:06 AM

I've been considering a new naming convention for all SQL Server service accounts for instances in our enterprise. I ran into some issues on my lab environment. Is there a character limit to SQL Server service account names?

DOMAIN\SQL-Service-COMPUTER-NAME DOMAIN\SQL-Agent-COMPUTER-NAME DOMAIN\SQL-SSRS-COMPUTER-NAME DOMAIN\SQL-SSAS-COMPUTER-NAME DOMAIN\SQL-SSIS-COMPUTER-NAME



Answers 1


Within SQL Server, the datatype for the name column in sys.database_principles is sysname, which is essentially nvarchar(128). However, the sAMAccountName attribute in Active Directory specifies the login name must be 20 or fewer characters.

A similar question was posted within the forums on SQLServerCentral:

https://www.sqlservercentral.com/forums/topic/max-length-of-ad-names-for-security

Tyler
Tyler
August 14, 2019 02:52 AM

Related Questions


Updated January 13, 2018 22:06 PM

Updated January 07, 2019 15:06 PM

Updated July 13, 2015 13:02 PM

Updated August 29, 2016 08:04 AM

Updated November 28, 2017 16:06 PM