Reset sa password in SQL server

By putting SQL Server into single-user mode, you can log in using any Windows administrator account with sysadmin permissions, even if an equivalent SQL login does not exist. This is very useful when you’ve lost sysadmin access (not-entirely-hypothetical example: someone set up a database, removed all sysadmin accounts except sa,…

Nested elements in custom NAnt tasks

There’s a great postĀ hereĀ detailing how to add nested elements within a custom NAnt task. I was writing a task to create IIS websites, and wanted to be able to specify multiple bindings, for example: <IIS.Website.Create name=”MySite” physicalPath=”path”> <bindings> <binding type=”http” ip=”1.2.3.4″ port=”8080″ host=”domain.com” /> <binding type=”net.msmq” host=”localhost” /> </bindings> </IIS.Website.Create>…