How to delete the SPN
-------------------------------------------------------------
Circumstances sometime comes that we have to delete the SPN. There can be various reasons. I will not go in the reason but here i just want to delete the some of SPNs.
Here i have a sql server in cluster setup and found the SPNs has been created.
In order to find the SPN.
you have to first execute below command
select * from sys.dm_server_services.
it will give service account name, suppose it returns the service account name
adven\svcsqlserver
Now if you want to get the SPN name
C:\Users\administrator.ADVEN>setspn -L ADVEN\svcsqlserver
Registered ServicePrincipalNames for CN=svcsqlserver,CN=Users,DC=adven,DC=com:
MSSQLSvc/MSSQLSERVER.adven.com
Now if you want to delete the SPN.
-------------------------------------------
C:\Users\administrator.ADVEN>setspn -D MSSQLSvc/MSSQLSERVER.adven.com:1433 ADVEN\svcsqlserver
nregistering ServicePrincipalNames for CN=svcsqlserver,CN=Users,DC=adven,DC=com
MSSQLSvc/MSSQLSERVER.adven.com:1433
Updated object
:\Users\administrator.ADVEN>
C:\Users\administrator.ADVEN>setspn -D MSSQLSvc/MSSQLSERVER.adven.com adven\svcsqlserver
Unregistering ServicePrincipalNames for CN=svcsqlserver,CN=Users,DC=adven,DC=com
MSSQLSvc/MSSQLSERVER.adven.com
Updated object
C:\Users\administrator.ADVEN>setspn -L ADVEN\svcsqlserver
Registered ServicePrincipalNames for CN=svcsqlserver,CN=Users,DC=adven,DC=com:
C:\Users\administrator.ADVEN>
-------------------------------------------------------------
Circumstances sometime comes that we have to delete the SPN. There can be various reasons. I will not go in the reason but here i just want to delete the some of SPNs.
Here i have a sql server in cluster setup and found the SPNs has been created.
In order to find the SPN.
you have to first execute below command
select * from sys.dm_server_services.
it will give service account name, suppose it returns the service account name
adven\svcsqlserver
Now if you want to get the SPN name
C:\Users\administrator.ADVEN>setspn -L ADVEN\svcsqlserver
Registered ServicePrincipalNames for CN=svcsqlserver,CN=Users,DC=adven,DC=com:
MSSQLSvc/MSSQLSERVER.adven.com
Now if you want to delete the SPN.
-------------------------------------------
C:\Users\administrator.ADVEN>setspn -D MSSQLSvc/MSSQLSERVER.adven.com:1433 ADVEN\svcsqlserver
nregistering ServicePrincipalNames for CN=svcsqlserver,CN=Users,DC=adven,DC=com
MSSQLSvc/MSSQLSERVER.adven.com:1433
Updated object
:\Users\administrator.ADVEN>
C:\Users\administrator.ADVEN>setspn -D MSSQLSvc/MSSQLSERVER.adven.com adven\svcsqlserver
Unregistering ServicePrincipalNames for CN=svcsqlserver,CN=Users,DC=adven,DC=com
MSSQLSvc/MSSQLSERVER.adven.com
Updated object
C:\Users\administrator.ADVEN>setspn -L ADVEN\svcsqlserver
Registered ServicePrincipalNames for CN=svcsqlserver,CN=Users,DC=adven,DC=com:
C:\Users\administrator.ADVEN>
No comments:
Post a Comment