How to change the SQL Server password programmatically

Every now and the question comes up how to programmatically modify the service account or password of SQL Server. There basically two ways to accomplish this, using SMO, or WMI. This article shows you how to use WMI and VBScript to accomplish this task.   There are a couple of things you need to know….


SMO Sample: Enable TCP/IP Server protocol of SQL Server 2005

Purpose of sample: Enable the TCP/IP server protocol.   This sample shows you how to change a server protocol setting. This sample assumes you have SQL Express installed. You need to change the instance name to match the instance name you have installed.   ManagedComputer mc = new ManagedComputer(); mc.ServerInstances[“SQLEXPRESS”].ServerProtocols[“Tcp”].IsEnabled = true;


Add oil to fire: SMO and Monad — a flammable combination

Euan pointed me to an interesting article about the use of Monad together with SMO. Those who know me well, know I am somewhat of a scripting biggot and still install Cygwin on all of my boxes as I cannot live without bash, awk, perk, sed, expr and the various other UNIX tools that I have…