Category: Automation

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”

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”

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”

Uploading New R Library Packages

Somehow I have become the R DBA at my job which I don’t mind, I plan on taking Microsoft’s Professional Program on Data Science to be familiar with it.  But recently I’ve had to upload files to our R servers which the first time wasn’t too bad.  Copy these files to six different servers but …

Read More “Uploading New R Library Packages”

Automation of PAL (Performance Analysis of Logs) Tool for SQL Server Using Powershell – Part 3

This entry is part 3 of 3 in the series Automation of PAL

This entry is part 3 of 3 in the series Automation of PALIn the final part of the process will be the process that creates all the reports and zips up the performance counter file on a central server.    The first part copies the PerfMon file from the each server to a central location.  …

Read More “Automation of PAL (Performance Analysis of Logs) Tool for SQL Server Using Powershell – Part 3”

Automation of PAL (Performance Analysis of Logs) Tool for SQL Server Using Powershell – Part 2

This entry is part 2 of 3 in the series Automation of PAL

This entry is part 2 of 3 in the series Automation of PALIn this part of the process we will setup a process to automatically stop the data collector or counter log on the remote server.  Then  rename the file with a time stamp if it is an older version of Windows.  Finally we will …

Read More “Automation of PAL (Performance Analysis of Logs) Tool for SQL Server Using Powershell – Part 2”

Automation of PAL (Performance Analysis of Logs) Tool for SQL Server Using Powershell – Part 1

This entry is part 1 of 3 in the series Automation of PAL

This entry is part 1 of 3 in the series Automation of PALI recently was re-exposed to the PAL (Performance Analysis of Logs) Tool available on CodePlex at a wonderful SQLskills class.  I had played with the tool in the past but at the time the server I had for setting things up and automtaing …

Read More “Automation of PAL (Performance Analysis of Logs) Tool for SQL Server Using Powershell – Part 1”