Creating a PowerShell Module from a DBA’s Perspective

Problem The last T-SQL Tuesday a lot of data professionals shared their favorite PowerShell scripts including functions, but some DBAs are new to PowerShell and don’t know how to use the functions.  So this post will cover how to create a PowerShell module so you can store the functions you just found that are useful …

Read More “Creating a PowerShell Module from a DBA’s Perspective”

Automatically Fixing High VLF Count on SQL Server 2012+

The Problem Our databases autogrow because we have thousands of databases and before we know we have databases with high VLF counts in the transaction logs.  If you don’t know why that is bad refer to the resources section of this article. The Solution Fix the high VLF count without any manual intervention by the …

Read More “Automatically Fixing High VLF Count on SQL Server 2012+”

T-SQL Tuesday #94 – Automation Through PowerShell Checking the Status of AGs

This month Rob Sewell (Twitter | Blog) is hosting T-SQL Tuesday and wants us to automate more with PowerShell or at least learn PowerShell. My favorite thing to automate using PowerShell is checking on the status of things on multiple servers.  For example, after patching your environment running a quick query to make sure the …

Read More “T-SQL Tuesday #94 – Automation Through PowerShell Checking the Status of AGs”

Determining Which Indexes to Compress Among Thousands

Our Problem In a shared in environment you may have hundreds of databases with the same schema but depending on the data loaded into them not all of them will benefit from being compressed so you don’t want to incur the overhead of compression on all the of the data. Our Solution We can write …

Read More “Determining Which Indexes to Compress Among Thousands”

Enable SSL Encryption and Import Certificate for Multiple Instances of SQL Server using PowerShell

A recent project involved setting up encrypted connections on all our SQL Servers. To this we would have to install a certificate in on the server and restart the SQL Server service. Direction on how to do this on an individual instance are provided by Microsoft.  We have test environments that we are going to …

Read More “Enable SSL Encryption and Import Certificate for Multiple Instances of SQL Server using PowerShell”

TSQL Tuesday #93: Interviewing Patterns & Anti-Patterns

This month’s T-SQL Tuesday is brought to us by Kendra Little (blog | @Kendra_Little). Kendra asked to write about interviewing patterns and anti-patterns and to be careful to protect our past/current employers and candidates.  I’m going to talk about things I should have done better for interview that are really technical things but more soft things you …

Read More “TSQL Tuesday #93: Interviewing Patterns & Anti-Patterns”

Setting Custom Fill Factors Based on Page Splits

Introduction There is a lot of talk about what fill factor should be set for an index.  We know for indexes that are ever increasing the fill factor should be set to 100% but for those indexes that are on things like last name or birthday it gets a bit trickier to decide a fill …

Read More “Setting Custom Fill Factors Based on Page Splits”

Monitoring Availability Groups Part 3 – Extended Events

This entry is part 3 of 3 in the series Monitoring Availability Groups

In last part of the series, we will touch on how to monitor availability groups using extended events.  I prefer this method over using SQL Agent alerts just because I don’t like relying on the individual servers to send me emails.  I like to have our central monitoring server send out alerts based on queries …

Read More “Monitoring Availability Groups Part 3 – Extended Events”

First Time Advise for Attendees of SQLSaturday or Other Pass Events

Recently I came across on Twitter a question from Chad Smith asking for advise on attending his first SQLSaturday.  The fact is asking means he is already ahead of the game and he is on Twitter.  I got him to follow me on Twitter and offered him the following the following advise via a DM …

Read More “First Time Advise for Attendees of SQLSaturday or Other Pass Events”

How to Install SQL Server PowerShell 2017 Remotely to Your Servers

As part of upgrading our SQL Servers to 2017 CTP 2.1 we have a process that runs afterwards that uses Invoke-Sqlcmd cmdlet but with SQL Server 2017, SQL Server PowerShell 2017 is a separate install from the PowerShell Gallery.  So I wrote a process to that will install the SQL Server PowerShell remotely to the …

Read More “How to Install SQL Server PowerShell 2017 Remotely to Your Servers”