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...
Josh, you learned something cool or figured something difficult out relating to BI/SQL/C#/Programming/Etc. Therefore write it down here for easy recall!!!
Showing posts with label tools. Show all posts
Showing posts with label tools. Show all posts
Friday, July 27, 2018
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...
Labels:
c#,
integrations,
mssql,
ssis,
tools,
visual studio online
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...
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...
Labels:
c#,
integrations,
mssql,
script,
sql,
tools,
visual studio online
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!
So you want to use some images in an SSRS report, keep these tips in mind to ensure they look great!
Monday, October 27, 2014
Install MDS Plugin for Excel 2010
Josh,
So, you were attempting to install the Master Data Services Plugin for Excel, but couldn't get the install to actually process due to it saying the prerequisites are not installed:
You have made sure you have the right version (32 bit) to match the version of excel (2010), and have the full version of .net 4.5 installed. If you try to install the full version of .net 4.0, you are told that the newer (4.5) version already is installed.
Friday, September 19, 2014
SQL Get Column Data Counts Procedure
Josh,
So you are reviewing a data set and want to know the unique values of a column and how many times they occur in the table. Use this nifty procedure instead of re-writing it each time:
So you are reviewing a data set and want to know the unique values of a column and how many times they occur in the table. Use this nifty procedure instead of re-writing it each time:
Monday, June 16, 2014
Sql Check if Object Exists
Josh,
You know those situations where you want to drop and recreate something, or create something if it doesn't exist? You can use the object_id function to check if an object exists in the database.
You know those situations where you want to drop and recreate something, or create something if it doesn't exist? You can use the object_id function to check if an object exists in the database.
Tuesday, May 13, 2014
Maximum Column Content Lengths
Josh,
So you are working on loading data into a table from another table and you're getting truncation errors. To keep the destination table as small as possible for speed, you need to find out which column is causing the truncation error and how much you need to increase the destination columns size.
Let's use the handy SYS schema to help us out...
So you are working on loading data into a table from another table and you're getting truncation errors. To keep the destination table as small as possible for speed, you need to find out which column is causing the truncation error and how much you need to increase the destination columns size.
Let's use the handy SYS schema to help us out...
Tuesday, April 22, 2014
Create C# Classes from JSON
Josh,
So you're working with JSON data and you need to create C# classes to hold the deserialized data. Naturally you're going to use the JSON.Net library to handle the deserialization, but you would like something to give you a jump start on the C# classes. You found this json2csharp page that allows you to paste in some JSON and have it generate your C# classes for you. Now with just a little bit of cleanup you have your working classes!
So you're working with JSON data and you need to create C# classes to hold the deserialized data. Naturally you're going to use the JSON.Net library to handle the deserialization, but you would like something to give you a jump start on the C# classes. You found this json2csharp page that allows you to paste in some JSON and have it generate your C# classes for you. Now with just a little bit of cleanup you have your working classes!
Subscribe to:
Posts (Atom)