Sometime back I was asked by one of my customer who wanted to change the startup account for SQLServer Service and SQLBrowser Service without manually going to SQL Server Configuration Manager and changing password there.
By the way, did you know...
Below is the script which could be used. Save the below script to .vbs file and make changes to reflect your instance name/Service name and account.
set sqlsvr = GetObject("WINMGMTS:\\.\root\Microsoft\SqlServer\ComputerManagement:SqlService.ServiceName='MSSQLSERVER',SQLServiceType=1")sqlsvr.SetServiceAccount "LocalSystem"
set browsersvr = GetObject("WINMGMTS:\\.\root\Microsoft\SqlServer\ComputerManagement:SqlService.ServiceName='SQLBrowser',SQLServiceType=1")
You can make changes to modify SQL Agent account as well. Hope this helps.
For #1 about Not changing the password from Services.msc is true for a cluster, but it that also true for stand-alone instances. I've heard that for clustered instances and understand why, but the reasons why would not apply to stand-alone instances.
Can you clafiry, please? Why would that be unsupported for a stand-alone instance?
Changing service account would change permission of folders, registry etc. In SQL 2000, we change the permission for registry and files.In SQL 2005 we give just remove the account from the group and add back new account.
Service.msc is not aware of SQL Server specific registry keys and folders which need to be change.
Password change is OK.
More details here...
How to change the SQL Server or SQL Server Agent service account without using SQL Enterprise Manager in SQL Server 2000 or SQL Server Configuration Manager in SQL Server 2005
Hope this helps.
Thank you Balmukand,But is there a way to remotely find what domain account my SQL server and agent is using.