THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | Join | Help
in Search

SSIS Junkie

This is the blog of Jamie Thomson, a freelance SQL Server developer in London

Is the SSIS Catalog going to be enough?

Over the past year or so I have written at length about the SSIS Catalog that will be provided in the upcoming version of SQL Server Integration Services (SSIS 2012) and the capabilities that it will bring; one of the biggest benefits (in my opinion) is that logging is now something that is taken care of on your behalf.

Many SSIS developers have built their own logging solutions (often referred to as "frameworks") over the past few years and it occurred to me that many of those developers may have a need to carry on running their own logging solutions alongside that which the SSIS Catalog provides. To that end I have raised two Connect submissions requesting enhancements to SSIS that will make it easier for developers to do just that:

One of those (the one about the ExecutionID variable) has already been implemented and will be available in the final release of SQL Server 2012 however this blog post isn't about drumming up support for Connect submissions. I am more interested in knowing whether you think you will need to log information over and above what the SSIS Catalog provides and if so, what exactly? I can envisage a number of scenarios in which additional logging may be necessary:

Do you plan to use your own logging solutions alongside the SSIS Catalog? If so, why? Let me know in the comments, I'm really interested to discover how folks plan to use this.

@jamiet

 

Published Wednesday, February 22, 2012 10:00 AM by jamiet

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Koen Verbeeck said:

At first sight, the built-in reports deliverd within SSMS already give quite some information. I guess I have to dive real deep in an SSIS 2012 project at a client to find out what's missing.

The first thing that pops to mind is rowcounts affected by Execute SQL Tasks.

February 22, 2012 4:53 AM
 

Mike Davis said:

The problem with the new built in logging is the fact that it is not centralized. If you have 10 servers, you will have to visit each server to look at your ssis logs. So custom built logging or tools like BIxPress will continue to be needed.

February 22, 2012 8:04 AM
 

jamiet said:

Hi Mike,

Interesting point. Why would you have 10 SSIS servers?

Regards

Jamie

February 22, 2012 8:14 AM
 

Peter Schott said:

Good point - totally depends on the tasks, but I know that our current implementation captures row counts from stored proc calls or ad-hoc SQL calls where appropriate. We've been keeping things somewhat simple for the time being, so we wouldn't have an immediate need to extend other logging functionality. I can definitely see it for larger and more complex packages, though.

We've mostly switched to BIxPress for our auditing and generally find that pretty useful. That may or may not change when we start using 2012. Our main reasons for using the software were for the real time monitoring and much easier reporting than our current custom logging. If SSIS duplicates all/most of that in 2012, we'd need to see some significant benefits to keep using that tool.

-Peter

February 22, 2012 8:44 AM
 

jbooker said:

Jamie,

I was thnking the same thing, what if I need to log a variable value OnPostExecute and report that value with the duration and result of a task?  We use custom logging based on your popular event handler example which logs Insert, Update, Delete counts OnPostExecute using variables.  As you mention it would be nice to be able to capture row counts from SQL tasks.

Is it possible to log the read\write variables of a task in the [catalog].[event_message_context] table?  That may do the trick.  Like if I set @[user::UpdateCount] using sproc output parameter in a SQL task, will it log that value in [catalog].[event_message_context]?  It would not be ideal to query those values from a related table compared to having columns in [catalog].[executable_statistics].  For that reason it may be best to add our own tables.

It would be cool if there were a way to extend the new logging by adding custom stored procs that can fire before & after the built-in ones to populate custom tables without the need to add custom event handlers to packages.  I suppose this would be easy enough by simply adding a SQL task to the event which could select from catalog to get duration, but that brings another question...What about the order of events?  Can we be sure the [catalog].[executable_statistics] is written before the OnPostExecute Event Handler is fired for the same task?

I agree it would be nice to specify the server and db name of SSISDB so two servers could share one catalog.

February 22, 2012 9:45 AM
 

jamiet said:

Hi Josh,

"if I set @[user::UpdateCount] using sproc output parameter in a SQL task, will it log that value in [catalog].[event_message_context]?"

Good question but no, I'm pretty sure it doesn't do that. I stand to be corrected however - I haven't done too much investigation into that view.

"It would be cool if there were a way to extend the new logging by adding custom stored procs that can fire before & after the built-in ones to populate custom tables without the need to add custom event handlers to packages."

Yeah I like that idea a lot. In other words, it would be nice if there were some hooks that we just plug our own sprocs into so that they get executed when a particular event occurs, right?

I can't see that ever happening mind you, for starters SQL Server doesn't have a good plug-in model like (say) .Net does with MEF (http://mef.codeplex.com/).

"I agree it would be nice to specify the server and db name of SSISDB so two servers could share one catalog."

Yeah, I've been thinking about this idea a lot myself. I'm envisaging the concept os a SSIS Catalog "agent" running on a remote server. The agent can execute packages just like the proper SSIS Catalog can but the agent would log back to the SSIS Catalog that it was attached to. Very interesting idea that.

regards

Jamie

February 22, 2012 10:04 AM
 

jamiet said:

Josh,

In fact, I like the idea of a SSIS Catalog Agent so much that I have suggested it: https://connect.microsoft.com/SQLServer/feedback/details/726102/ssis-catalog-agent

Regards

Jamie

February 22, 2012 10:20 AM
 

Eric Wisdahl said:

I'm fairly certain I'll keep my framework around, although I will have to play with the new features more before deciding they don't provide everything I need.  Currently, we log the package start / end times, what versions they are, the descriptions associated, what tables are affected by the package and how many records were extracted / inserted / updated / deleted.  Whether the package was successful, if it was restarted, what the parent process was that called it, which "processing group" the package belongs to, etc.  I also do not like that you can no longer control exactly what events are being logged.  You only have the four or five presets.  So, if you want to find the PipelineComponentTime or PipelineExecutionTrees you get every other event under the sun (verbose)???  gah.  Oh well, I guess for the majority of people this will be a good thing.

February 22, 2012 11:01 AM
 

jamiet said:

Eric,

Yeah, not being able to configure the 4 presets (well, 3 really cos the 4th is "None") is a problem. Some people will want to configure, some won't care. One of those "you can't please all the people all the time" situations.

Of the things you listed *I think* all of the following can be captured in the SSIS Catalog:

-Package start/end times

-Versions (i.e. Major/Minor/Version)

-How many records extracted/updated/deleted in a dataflow (although perhaps not recorded in the manner that you would like)

-Whether the package was successful

-Parent process that called the package

JT

February 22, 2012 11:11 AM
 

jbooker said:

RE:"Yeah I like that idea a lot. In other words, it would be nice if there were some hooks that we just plug our own sprocs into so that they get executed when a particular event occurs, right?

I can't see that ever happening mind you, for starters SQL Server doesn't have a good plug-in model"

I'm thinking simple hook like this at the end of the built-in sp which logs to executable_statistics.  We create a sproc called 'sp_after_log_executable_statistics'and if it exists it's fired.  Of course how does it get paramenters from SSIS variables is beyond me.

IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[catalog].[sp_after_log_executable_statistics]') AND type in (N'P', N'PC'))

EXEC [catalog].[sp_after_log_executable_statistics]]

GO

RE:"I also do not like that you can no longer control exactly what events are being logged."

You mean you can't disable event handling on certain containers and tasks and you cant specify not to log OnInformation events for Basic level, for example?  That is a bummer.

February 22, 2012 2:27 PM
 

Carla Sabotta said:

The Catalog.packages view shows the major & minor version of a package. The catalog.executions view shows the package start & end times, and the package status (created, running, canceled, failed, pending, successful etc.).

The catalog.execution_data_satistics view shows the number of rows sent from the source component. You can use the catalog_add_data_tap & catalog.add_data_tap_by_guid stored procedures to capture a copy of the data for a specific data flow path.

February 22, 2012 2:54 PM
 

jamiet said:

Hi Carla,

Thanks for contributing here - good to see someone from the product team adding their two-penneth worth.

Regarding your comment "The Catalog.packages view shows the major & minor version of a package", I think I am right in saying that Catalog.packages is a list of all the packages currently stored in the catalog. That is useful but it doesn't provide what I think Eric wanted which is the major/minor/version of a package that gets executed.

Regards

Jamie

February 22, 2012 4:58 PM
 

Mark Wojciechowicz said:

We presently log the product version.  This helps to identify issues that can arise when machines are running different versions of SSIS.

February 23, 2012 3:44 PM
 

SQL Server 2012 (???Denali???): SSIS Logging | James Serra's Blog said:

February 24, 2012 12:24 AM
 

jbooker said:

Hey Jamie,

Looks like the release documentation for view [catalog].[event_message_context] shows a context_type field having possible value:

70 | Variable | Indicates that the value of a variable is captured.

http://msdn.microsoft.com/en-us/library/hh479590(v=sql.110).aspx

Hopefully this means variable values can be captured in the catalog.  Is it true that this is only captured for OnError events?

If so, it's another example of beng shame that we can't control when events are logged.  We should be able to capture context OnPostExec for selected tasks.  Bottom line, built-in logging should obey the logging properties set on each container\task if desired.

Josh

February 24, 2012 11:05 AM

Leave a Comment

(required) 
(optional)
(required) 
Submit

This Blog

Syndication

Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement