About Me

My photo
I am an MCSE in Data Management and Analytics, specializing in MS SQL Server, and an MCP in Azure. With over 19+ years of experience in the IT industry, I bring expertise in data management, Azure Cloud, Data Center Migration, Infrastructure Architecture planning, as well as Virtualization and automation. I have a deep passion for driving innovation through infrastructure automation, particularly using Terraform for efficient provisioning. If you're looking for guidance on automating your infrastructure or have questions about Azure, SQL Server, or cloud migration, feel free to reach out. I often write to capture my own experiences and insights for future reference, but I hope that sharing these experiences through my blog will help others on their journey as well. Thank you for reading!

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: