Painting with PowerShell SQL Server Administration

This blog post is just a quick follow from my presentation last week for the SQL PASS PowerShell Virtual Chapter.

Here is a link to the YouTube Video of the presentation.

Check at the bottom of this blog post for a zip file containing the PPT as well as all of the demo scripts. Enjoy and happy scripting!

Speaking at SQL Saturday 526 in Rochester on May 14, 2016

If you are a SQL Server professional and are interested in spending a day with a bunch of other like-minded individuals, SQL Saturday is for you. It’s a day chock full of SQL Server related presentations given by other members of the community. Here is a glimpse of my presentation on SQL Server Automation using PowerShell taken from the SQL Saturday event page. If PowerShell isn’t your thing that’s OK. [Read More]

Use PowerShell to script existing Availability Group creation scripts!

Scripts that write scripts! One of my favorites! So last night I was up working on an issue with an Availability Group. For whatever reason the cluster resource for the AG would not come online. Looking in SSMS the AG’s on both replicas were stuck in “Resolving”. I beat on the keyboard for almost 2 hours before deciding that rebuilding the AG was my best option. The databases were down and the birds were starting to chirp and I needed to get them back online. [Read More]

Speaking at SQL Saturday 487 in Ottawa on April 16, 2016

<img alt=’’ class=‘alignright size-full wp-image-1238 ‘src=’/img/2016/04/img_570152b22dc45.png’ /> If you are a SQL Server professional and are interested in spending a day with a bunch of other like-minded individuals, SQL Saturday is for you. It’s a day chock full of SQL Server related presentations given by other members of the community. Here is a glimpse of my presentation on SQL Server Automation using PowerShell taken from the SQL Saturday event page. [Read More]

Announcing SQL Server on Linux

http://blogs.microsoft.com/blog/2016/03/07/announcing-sql-server-on-linux/ Today I’m excited to announce our plans to bring SQL Server to Linux as well. This will enable SQL Server to deliver a consistent data platform across Windows Server and Linux, as well as on-premises and cloud. We are bringing the core relational database capabilities to preview today, and are targeting availability in mid-2017. SQL Server on Linux will provide customers with even more flexibility in their data solution. [Read More]

Slow Running Query? Where do I Begin?

Maybe you’re new to SQL Server or maybe you’re just expanding into performance tuning a little more. Query tuning can be a very daunting task and sometimes it’s hard to decide where to look first. In this post I am going to show you a couple of my go-to methods for troubleshooting slow performing queries in SQL Server. This is not a “ZOMG my SQL Server is slow” list. This post is more geared to when I have been tasked to dig into a very specific query. [Read More]

T-SQL Tuesday 73 – Naughty or Nice?

As you work with SQL Server look around you. Is your environment Naughty or Nice? If it is Naughty what’s wrong with it? What would you do to fix it? Do you have a scrooge that is giving you the Christmas chills? Perhaps you have servers of past, present, and future haunting you. Maybe you are looking at SQL Server 2016 like some bright shining star in the east. [Read More]

Identity Column Increment Value (EVEN/ODD)

“Hey DBA’s, I have a thought about a really creative solution to this really hard problem. I have two tables in my database and each has an identity column, each of which is currently incrementing by 1. I’d like to change each to increment by 2. Also, one of the tables will need to only contain ODD numbered values, and the other will need to only contain EVEN numbered values. [Read More]

Using Extended Events to Detect Connection Pooling

Connecting to a data source can be time consuming. To minimize the cost of opening connections, ADO.NET uses an optimization technique called connection pooling, which minimizes the cost of repeatedly opening and closing connections. Connection pooling is handled differently for the .NET Framework data providers. Opening connections is a very expensive and time consuming operation. Connection pooling helps alleviate that by providing a reusable “pool” of connections that your application can share. [Read More]

Running Parameterized Queries against SQL Server using PowerShell

For many years I didn’t really think about the implications of how I was retrieving data from my SQL Servers in PowerShell. I was just happy that I was able to retrieve the data! As I learned more about SQL Server I started to think of things like SQL injection and using parameterized queries to promote plan reuse. I went back and looked at some of the old PowerShell scripts that I had written and found that I was way off! [Read More]