2

I current want to add a new column that allow me to add row number within a data flow task in SSIS (row number increments with each new row).

So far I have been using the following code from this guide: I currently am using Visual Studio 2015.

However, once I run the script I am getting the current error. Seems like it's saying there's a bug in the script, although I can't find this. Also note that I am very new to writing scripts, so I am having some difficulties with this.

Error at Grab landing data and populate staging [Script Component [88]]: The binary code for the script is not found. Please open the script in the designer by clicking Edit Script button and make sure it builds successfully.

Error at Grab landing data and populate staging [Script Component [88]]: The script component includes no code. Edit the component to include code.

Error at Grab landing data and populate staging [SSIS.Pipeline]: "Script Component" failed validation and returned validation status "VS_ISBROKEN".

Error at Grab landing data and populate staging [SSIS.Pipeline]: One or more component failed validation.

Error at Grab landing data and populate staging: There were errors during task validation.

Any suggestions will help, thanks!

Community
  • 1
  • 1
Yola Z
  • 39
  • 1
  • 3
  • This is often achieved by using an IDENTITY column in the target database. But anyway... first confirm whether the code actually builds. There's a build button.... somewhere in the editor. If you google "The binary code for the script is not found" you'll get a million hits - why don't you try some of those – Nick.Mc Mar 07 '19 at 05:42
  • @Yola Z, follow this article instead http://www.sqlis.com/post/Row-Number-Transformation.aspx which requires no coding – Arthur Mar 07 '19 at 14:33
  • @yola what is the sql server version you are working with?? visual studio version?? – Hadi Mar 08 '19 at 18:24
  • @Arthur I've been getting an error message using that link. I'd be interested in the contents of that link, do you know of another means to access it? – Yola Z Apr 12 '19 at 16:07
  • Can't edit my comment, but yes, the link is now defunct @Yola Z Use instead https://www.hansmichiels.com/2015/11/13/how-to-add-a-rownumber-to-a-data-flow-task-in-ssis-2012/ please or I even found a nice components that requires 0 coding: http://microsoft-ssis.blogspot.com/2012/03/custom-ssis-component-rownumber.html – Arthur Apr 12 '19 at 20:58

1 Answers1

1

Trying to figure out the issue

I think that there are two possibles causes for this error:

(1) TargetServerVersion

Check that the TargetServerVersion select is the appropriate installed SQL Server version:

In the solution explorer, Right click on the SSIS Project Node and click Properties. When you see Properties select Configuration Properties. You will see TargetServerVersion change that to the relevant SQL Server version then Click OK.

enter image description here

Reference: How to change TargetServerVersion of my SSIS Project

(2) Script code errors

After searching for this issue, i found many suggestion on the web. To summarize them:

  • Try to clean and rebuild the script project within the script editor
  • Set Delay Validation to true if you are using SSIS 2008 and later versions
  • Set "PrecompileScriptIntoBinaryCode" to true if you are using SSIS 2005

You can find more details at:

Hadi
  • 36,233
  • 13
  • 65
  • 124