March 17, 2009 at 4:32 am
Using VB Script, I need to change the 'Log On As' property of SQL Server service during a postinstallation phase of SQL Server 2005. Currently, it is NT AUTHORITY\SYSTEM. The code should prompt the installer to input a valid domain user account. And the property value should be changed to this User account. Can someone send me the code ?
March 17, 2009 at 8:47 am
I am not sure how you are going to do this in VB; but make sure the VB script sets the property using the SQL Server Configuration Manager (SSCM) and not the Windows Services. Because the SSCM sets permissions on registry/file system level that are needed for SQL Server to operate normally that the Windows Services console knows nothing about.
I think most of the permissions are wrapped under the local group; SQLServer2005MSSQLUser$ServerName$InstanceName
Thanks.
Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN[/url].
Microsoft FTE - SQL Server PFE
* Some time its the search that counts, not the finding...
* I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. :smooooth:[/font]
March 18, 2009 at 3:38 am
You can run the SC command from vbscript to do this work. Remember to add the new account to the relevant local group in order to pick up the rights and privileges it needs.
You may also want to look at SQL Server FineBuild, which do the install and configuration for you.
Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.
When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply