SQL Server Policy Based Management by Example

What steps do you go through to validate SQL Server configurations after a server build? Even a single server can take some time and is also prone to human error. Have you ever needed to validate a configuration setting across all of the SQL Servers in your environment? If your environment is big enough, doing this manually isn’t even a realistic option. Policy Based Management excels at these things. Introduced in SQL Server 2008, it can definitely help DBA’s manage their ever growing environments.

[Read More]

SQL Saturday Albany (#sqlsat386) - Look Who's Speaking!

Why so excited you may ask? Because this will be my first presentation at a SQL Saturday! I have given this presentation at my local chapter, and I am really excited to present to a new audience. I am also looking forward to getting some feedback at SQL Saturday to help me make it better. I want to know what people think overall; what they liked or didn’t like; what I did well or what I could do better.

[Read More]

Free SQL Server Performance Testing Utilities

Did that say free? Why yes, yes it did! But don’t let the price tag fool ya, these are some pretty nice little utilities. Another blog post inspired by a question on Twitter.

I went to SQL Saturday #383 a few weeks ago and noticed a handful of performance testing utilities being mentioned or used during many of the presentations. I have seen them all mentioned or used in demos before, but I have very little experience using them myself. I thought it would be nice to gather them all in one place for future reference, and I can definitely foresee a more in depth review of each down the road.

[Read More]

SQL Agent Job Wrapper Part 3 - Handing the Errors in the Wrapper Script

This is the 3rd installment in a small series of blog posts on how to create a PowerShell wrapper for running SQL Server Agent Jobs. Here are the links to the 2 previous posts and I recommend reading them because all of the posts build on the previous one.

Creating a SQL Agent Job Wrapper with PowerShell and SMO - Part 1 SQL Agent Job Wrapper Part 2 – Adding Error Generation to the Cmdlet

[Read More]

SQL Agent Job Wrapper Part 2 - Adding Error Generation to the Cmdlet

Last week I posted Creating a SQL Agent Job Wrapper with PowerShell and SMO. In that post I created a couple PowerShell scripts that run a SQL Agent job and wait for it to complete before exiting. That process could be called from the command line, or even from a 3rd party job scheduler if you were so inclined. I recommend checking it out before you continue, because this is a continuation of that post.

[Read More]

Creating a SQL Agent Job Wrapper with PowerShell and SMO

I’ve seen this question asked a number of times over the past couple weeks and I thought I would share an approach using PowerShell and SMO. But first, let’s take a step back and try to understand why someone would want to do this. What’s wrong with SQL Agent?

Well there’s really nothing wrong with SQL Agent. The main reason I have seen people asking this question is because their company is looking into using an enterprise job scheduler. An enterprise job scheduler gives an operations group a single location to manage jobs across their whole environment. It allows them to see all the moving parts from a batch processing perspective, even across dissimilar platforms. It also allows them to create more complex workflows across multiple platforms.

[Read More]

T-SQL Tuesday 66 - Monitoring

Thank you Cathrine Wilhelmsen for hosting this week’s #tsql2sday.

If I knew that this T-SQL Tuesday was going to be about monitoring I would have saved my Monitoring SQL Agent Jobs post from last month. No worries though! I think I’ll talk more generally about monitoring.

If you read my Monitoring SQL Agent Jobs post from last month you will know that I had just begun a new position that had no monitoring. We also didn’t have a budget to go out and buy a solution, which is precisely what motivated me to learn PowerShell. I needed to know when my SQL Servers were having a problem so I decided to script my own solutions. If you are working with SQL Server you already have all of the tools you need to put together your own custom monitoring solutions.

[Read More]

Help! My database is stuck in SINGLE_USER mode!

Help!

HELP! My database is stuck in single user mode!

I answered this twitter post a while back and figured it would make a fun blog post.

So what do I mean that the database is stuck in single user mode? Simply speaking, it means that the database is in single user mode and you can’t seem to get it back into multi user mode. As an example I set my local AdventureWorks2012 database to single user mode, opened a session to that database, tried an alter database to get it back to multi user and this is what I got.

[Read More]

Using PowerShell to Export SQL Data to CSV. How well does it perform?

So here we are at week 4 of the #SQLNewBlogger challenge. Earlier in the week I responded to the following post on Twitter #sqlhelp, and after I posted my response I thought that this would make a fun blog post. I have used PowerShell to export SQL Server tables to CSV files before so I know that my suggestion works, but I was wondering if I could determine how performance would be for a larger table.

[Read More]

Follow the yellow brick what? My road to public speaking.

[caption id=“attachment_313” align=“alignright” width=“300”] Follow the yellow brick Road! Original Image Credit: airdiogo on flickr[/caption]

If you would have asked me 2 years ago if I had ever considered public speaking my response would have been a definitive no! In the words of the cowardly lion, “Not no way! Not no how!". Well, a lot has changed since then. This is the story of how I went from being the cowardly lion to presenting at my local SQL PASS chapter.

[Read More]