Hi,
Per Microsoft information below, Do I need set SPN for the AG Listener name or Availability group name?
For Example;
<g class="gr_ gr_392 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del" data-gr-id="392" id="392">AG</g> name is <g class="gr_ gr_363 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="363" id="363">LIFETIMEPROD</g>-LIT007
<g class="gr_ gr_434 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del" data-gr-id="434" id="434">AG</g> Listener is LIFETIME
Which one is correct?
setspn -A MSSQLSvc/LIFETIMEPROD-LIT007:1433 corp/svclogin2
setspn -A MSSQLSvc/LIFETIME:1433 corp/svclogin2
----------------------------------------------
Availability Group Listeners and Server Principal Names (SPNs)
A Server Principal Name (SPN) must be configured in Active Directory by a domain administrator for each availability group listener name in order to enable Kerberos for the client connection to the availability group listener. When registering the SPN, you must use the service account of the server instance that hosts the availability <g class="gr_ gr_65 gr-alert gr_gramm gr_inline_cards gr_run_anim Style multiReplace" data-gr-id="65" id="65">replica .</g> For the SPN to work across all replicas, the same service account must be used for all instances in the WSFC cluster that hosts the availability group.
Use the <g class="gr_ gr_60 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr-id="60" id="60">setspn</g> Windows command line tool to configure
the SPN. For example to configure an SPN for an availability group named AG1listener.Adventure-Works.com
hosted on a set of instances of SQL Server all configured to run under the domain account corp/svclogin2
:
setspn -A MSSQLSvc/AG1listener.Adventure-Works.com:1433 corp/svclogin2
https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/listeners-client-connectivity-application-failover?view=sql-server-2017#SPNs