Administration

QS-Config v2.0 coming soon

QS-Config v2.0 coming soon

Years ago I found myself frustrated with the SQL Server installation wizard. I was working for an organization where SQL Server installs were needed regularly during points in their operational cycle and often they were not cookie cutter. Tweaks were…

Running PowerShell in a SQL Agent Job

Running PowerShell in a SQL Agent Job

When creating a SQL Agent Job to execute a PowerShell script, you have to decide which way that you want the PowerShell to run. Depending upon which version of SQL Server that you are using and which job step type that you…

Active sessions and block duration

Active sessions and block duration

As a DBA, we all need the ability to take a quick glance at the currently active processes on our servers. A lot of times we do this during a problem such as transaction blocking. The first tool that normally…

Failing over AlwaysOn Availability Groups

Failing over AlwaysOn Availability Groups

Merry Christmas Eve! A few weeks ago I posted on Availability Group fail-over tests with PowerShell. That post covered the basics of how to check the Availability Group’s state and perform the commands for conducting a zero data loss fail…

Start and Save Hyper-V VMs with PowerShell

I use Windows 8 or Windows Server 2012 R2 on most of my local workstations between home and work. In order to conserve memory, I turn my Hypver-V lab environments on and off as I need them. Given that my…

Availability Group fail-over test with PowerShell

I have a number of SQL Server Availability Groups in my organization. Of them, most are multi-site configurations for disaster recovery. Naturally, the latency that a separate data center implies is more than my application can handle for its writes….

Query Central Management Server with PowerShell SMO

Query Central Management Server with PowerShell SMO

All production or operational DBAs need to maintain a server / instance list. SQL Server’s Central Management Server (CMS) is a great means of managing that list with auxiliary benefits such as group queries, a central location for managing policies and SQL…

Backup testing with PowerShell

This week I released a two part blog series on SQLShack.com. The series covers automated testing for your backup files and reporting on the results. Many elements of PowerShell, SMO, T-SQL, and SQL Server Reporting Services are covered. Abstract Once your…

Dynamically create table results from non-query

Have you ever executed a command with a result set but you didn’t know the exact schema being returned? Have you ever wanted to create a temporary table from a query but don’t want to look up all of the…