-
Test LSN Chain
Quick not fully tested script to check whether a set of provided backup files contain a valid log sequence number chain. Continue reading
-
Change Sql Service Account Password with no Restart
On SINGLE INSTANCE (apparently this does not work correctly with clusters…will test and update…) Sql Servers use the following code to update the password for the service account. This will not require a restart of the service. Curiously…the call to $service.ChangePassword is supposed to take the old password as the first parameter and the new… Continue reading
-
Set Sql Server\Agent Service Account
This uses a CIMMethod to change the service accounts. The Wmi.ManagedComputer method is also included in the comments below…but I’ve found this to be not reliable at times. Continue reading
-
Connect to Sql Server under a different login context
Here’s how to connect to sql server under a different windows login context. If you pass in the login name as ‘domain\loginname’ it will indeed fail. Only pass in the login name. Continue reading
-
Enable Sql AlwaysOn
This always seems to give me trouble, and I always forget the manner in which I run this that works correctly, so, viola! Continue reading
-
Restore Database with SMO
Probably 3 or 4 versions of this already on here. So here is one more. Continue reading
Meh.