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. There are plenty of other topics to choose from. With sessions geared toward Database Development, Database Administration, Business Intellignece, Database Security and even Professional Development, SQL Saturday offers a wide variety of content for everyone.

[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.

[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. This isn’t a be-all-end-all list, but its a good place to start and has served me well.

[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. This will help me solve my really hard problem."

[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. Connection pooling is usually a good thing. Unfortunately I have found that it’s sometimes not very well understood. This blog post starts with a short story…

[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! Most of the old scripts would be prime candidates for SQL Injection. I wasn’t really concerned early on because I was the one running my scripts and passing in the parameters, but as my scripts became more automated and database driven, they became more vulnerable to SQL Injection. And parameterized queries? What the heck is a parameterized query? I had no clue when I first started out.

[Read More]