About Me

My photo
I am MCSE in Data Management and Analytics with specialization in MS SQL Server and MCP in Azure. I have over 13+ years of experience in IT industry with expertise in data management, Azure Cloud, Data-Canter Migration, Infrastructure Architecture planning and Virtualization and automation. Contact me if you are looking for any sort of guidance in getting your Infrastructure provisioning automated through Terraform. I sometime write for a place to store my own experiences for future search and read by own blog but can hopefully help others along the way. Thanks.

How to delete the SPN

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>



No comments: