1

I have a dtsx file that deals with more than 200 table export and script that log information before and after completing export of each table. I am trying to change the logging to include more details, It is a time consuming process to open one by one log script object, click edit and make my changes. I opened the dtsx file in notepad++ with regex, I updated the script text by adding more log information. But my changes are not in effect when I run SSIS.

When I open the modified dtsx file in visual studio 2013, double click log script object, click edit then add a space save on all the log objects then my changes are in effect.

I compared those two files (one modified from notepad++ other from visual studio), other than some GUID difference and my new space character there is no change. Why my changes are not in effect when I make them in notepad++? Am I missing something?

Esen
  • 973
  • 1
  • 21
  • 47
  • To restate, you are modifying a script task outside of the VS environment. Your observation is that the new code is not being ... respected when the package fires. However, opening the script task in VS and making a "no change" results in the code now working, yeah? – billinkc Feb 29 '16 at 16:54

1 Answers1

1

Excellent! The root issue is that much like if you make a change to a C# class file, those changes wouldn't be reflected in the application until you compile. That's what's happening here, you've changed the source script for the SSIS package but you need to compile that script into byte code so it can actually be run.

The 2005 release of SSIS allowed us to specify whether the code should be compiled at run time versus design time but that didn't work out well at all so at some point in the lifecycle of 2005, that ability was nixed and the code had to set at design time.

I think I've seen code to compile a script task/component but whether that was on SO or elsewhere is a mystery at this point. I believe Matt Mason indicated there were changes in how things compiled between 2005/2008 and 2012+ but I can't find the post. There is this post which might give you a shove in the right direction for which classes you'll need to use to get the packages to compile.

Community
  • 1
  • 1
billinkc
  • 59,250
  • 9
  • 102
  • 159