Friday, July 27, 2018

Generic OnError Event Handler in SSIS

Josh,

So you're needing to custom log errors in SSIS, and naturally you seek to utilize the "OnError" event handler. You don't want to have to implement an event handler on each task, so you create one at the package level. You place an "Execute SQL Task" in the event handler and set it up to log the error. Great!

You then test with an error, and the event handler runs, but when you go to check the custom log in SQL Server, you see multiple entries for the same error! There has to be a way to ensure only one error gets logged...

Friday, February 13, 2015

Automated DB Source Control (2 of 5): The SSIS Package

Josh,

To continue from the last post, you'll need an SSIS package to drive the process.  This package joins all the steps, running the custom code, the SQL Scripts, and Checking In the changes.  Here's what you came up with...

Thursday, January 22, 2015

Automated DB Source Control (1 of 5): Overview and Setup

Josh,

So you've run into a situation where a SQL Database is considered the container of production and/or development code.  You would like to source control all the tables, views, stored procedures, and other database objects.  However, saving the TSQL to the appropriate files/project and checking it in can be very cumbersome.  It would be nice if the developer could just focus on getting the appropriate changes in the database they are working on and let the source control be automatically updated each night.  Here is the solution you came up for this...

Thursday, December 18, 2014

Case Sensitive SQL Statements

Josh,

So, you have a column with some upper case and lower case values.  By default, SQL Server treats upper case and lower case the same.  The case sensitivity can be set at the Server, Database, or Column level as well as on a query by query basis...

Tuesday, November 18, 2014

SSAS Sorting Attribute Member by Secondary Attribute

Josh,

So you have an attribute like Month that contains values of "January", "February", etc.  By default this attribute will sort by text order, but this can be changed to sort off another attribute (i.e. Month Value).

Monday, November 17, 2014

SSRS Embedded Images Best Practices

Josh,

So you want to use some images in an SSRS report, keep these tips in mind to ensure they look great!

Monday, November 3, 2014

SSRS Display Zero for Nulls

Josh,

So you have a report where there are null values in some of the text boxes.  To display zero instead, use this handy expression.