nonfatal error in SSIS package from deleted Script Task - ssis

I am working in BIDS for 2008 R2
I have an annoying issue that I have not found the solution to yet. The error message is below. The line of code the error message refers to was from a Script Task that I deleted yesterday. My SSIS package executes fine and I am getting close to publishing the production version. I would like to clean up this non-fatal error first.
Would anyone have any suggestions on how to clear this up?
Thanks!
*Attempt to parse the expression "#[User::SS_Directory] +"''" + #["User::SS_InputFolderName] + "\" + #[User:SS_InputFileName]" failed and returned error code 0xC00470A6. The expression cannot be parsed. It might contain invalid elements or it might no be well-formed. There may also be an out-of-memory error.*

try
to rename the pkg and rebuild it, then rename back again.
check the connection manager
use format -> auto layout- diagram
open as text and lok for the string in the error
Mario

Related

SSIS - "There was an error while building."

does anyone had this issue before? When I try to build a Script Component in SSIS but get the following error:
This does not give any context and actually it never starts the building so I don't know what is this.

Unusual Message Source Name in SSIS standard Report

Usually, in a dtsx Standard Report, there is a column "Message Source Name" that indicates which dtsx threw the error or raised the event.
Now i get "Transact-SQL stored procedure" and of course I don't have such a dtsx.
So, question #1 is: Where should I go to check the error?
Besides, the error is: An error occurred while setting the value of a property "InitialCatalog". The error returned is 0x80020009. The connection string components cannot contain unquoted semicolons....
My dtsx were doing fine and I was publishing dtsx on a regular basis with no problems. Then, I changed the name of a ConnectionManager and took care of changing this name wherever it appeared.
After this fateful move, I cannot manage to restore the previous situation. Even rollbacking all changes through TFS and going back to the previous names doesn't solve the matter.
I checked also the environment I am using and the configuration of the job that launches the dtsx, to no avail.
If I execute the dtsx on my development machine, from visual studio, it works fine. The problem arises in production enviroment when I use the job configured with the environment. In the project configuration and in the environment configuration I don't see what an "unquoted semicolumn" could be.
The value of the connection string that is indicated as having an error looks like:
Data Source=11.1.1.11,1111;Initial Catalog=MyDB;Provider=SQLNCLI11.1; Integrated Security=SSPI ;Auto Translate=False;
Question #2 is: Where could this connection string with unquoted semicolon be?
Thx.
With much effort I managed to find an answer to Question #2:
I am using parametrized connection managers, so I have a project parameter (let's call it PP1) in my dtsx with the connString.
During configuration of the SSIS project I need to give a value ONLY for the parameter PP1, and NOT for the connection string.
What I did wrong was to give the Environment Variable with the connString to the Property "Initial Catalog". Therefore, SSIS was lamenting of the presence of ";" (the ones in the connString) in the InitialCatalog.

The connection "" is not found. SSIS

When I open a new simple SSIS Project I created I get an error:
'Error loading HyperionFlatLoads.dtsx: The connection "" is not found. This error is thrown by Connections collection when the specific connection element is not found.
C:\Users...\Projects\Hyperion_Load_Actuals\Hyperion_Load_Actuals\HyperionFlatLoads.dtsx
I've looked everywhere for this reference and can't for the life of me figure out what it's missing. The package runs fine; the data moves into the SQL table - but this error persists. Anyone want to help me find out why and eliminate this?
You can view and edit dtsx file as regular XML file. So, open it and find
<DTS:ConnectionManagers>
<DTS:ConnectionManager ... DTS:ObjectName="CM name">
if you are using SSIS 2012+
or
<DTS:ConnectionManager>
...
<DTS:Property DTS:Name="ObjectName">CM name</DTS:Property>
if you are on SSIS 2008.
Remove node <DTS:ConnectionManager> and save the file.
I want to add an alternative solution that I was facing for others who may stumble across this post.
I had setup logging, but forgot to specify a connection manager. This took me forever to find because viewing the XML doesn't make it obvious where "" is.

SSIS: Data Conversion Package failed

I was trying to load a table from Excel Source to SQL Server Destination with a data conversion transformation task using SSIS Package. but when I ran the package, it failed with the following error messages
===================================
Failure saving package. (Microsoft Visual Studio)
------------------------------
Program Location:
at Microsoft.DataTransformationServices.Design.Serialization.DtrDesignerSerializer.SerializePackage(IDesignerSerializationManager manager, Package package, TextWriter textWriter)
at Microsoft.DataTransformationServices.Design.Serialization.DtrDesignerSerializer.SerializeComponent(IDesignerSerializationManager manager, IComponent component, Object serializationStream)
at Microsoft.DataWarehouse.Serialization.DesignerComponentSerializer.Serialize(IDesignerSerializationManager manager, Object value)
at Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.DataWarehouseDesignerLoader.Serialize()
at Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.BaseDesignerLoader.Flush(Boolean forceful)
at Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.BaseDesignerLoader.Flush()
at Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.DataWarehouseContainerManager.OnBeforeSave(UInt32 docCookie)
===================================
An invalid character was found in text content.
(msxml6.dll)
------------------------------
Program Location:
at Microsoft.SqlServer.Dts.Runtime.Package.SaveToXML(String& packageXml, IDTSEvents events)
at Microsoft.DataTransformationServices.Design.Serialization.DtrDesignerSerializer.SerializePackage(IDesignerSerializationManager manager, Package package, TextWriter textWriter)
===================================
An invalid character was found in text content.
(msxml6.dll)
------------------------------
Program Location:
at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSPackagePersist100.SavePackageToXML(Object& pvDestination, Boolean vbReturnDOM, IDTSEvents100 pEvents)
at Microsoft.SqlServer.Dts.Runtime.Package.SaveToXML(String& packageXml, IDTSEvents events)
I had the same issue, and found that the file I was attempting to import had a non-printing character at the end of the second header. Removing this fixed the issue.
Since you're looking to resolve this "urgently", I'll make both a short-term and long-term suggestion:
1) For the short-term, a practical approach:
Does it work, in your situation, to load the spreadsheet in sections?
Will it hurt anything, for you to re-try/re-do the load multiple times, to find the problem?
Or, can you try this load in a test environment?
If so, then try loading the first-half, or the first-1/4, or first 10 rows, etc., until you find the row that's causing the problem. At the very least, you can then load everything but that row... at best, maybe the problem will be easy to find, at that point.
2) For the long-term... do you (or somebody there) have access to modifying the SSIS package?
If so, then I recommend coding error row redirection, within the Data Flow Task: rows with problems go to another destination (red arrow), while rows without problems go to the usual destination (green arrow).
For more on error row redirection, see these links:
A) Intro: Handling Errors in Data
B) Some issues others have run into:
Programmatically configuring error and truncation dispositions for row redirection
Hope that helps...

Error in SSIS script component

I have a problem while executing a SSIS script component. To be honest I am learning SSIS and for the script component, I am going thru The Script Component as a Transformation Article. I have so far done whatever has been stated there . But while I am trying to execute the package, I am encountering the below error
TITLE: Package Validation Error
------------------------------
Package Validation Error
------------------------------
ADDITIONAL INFORMATION:
Error at Data Flow Task [Script Component [16]]: The script component is configured to pre-compile the script, but binary code is not found. Please visit the IDE in Script Component Editor by clicking Design Script button to cause binary code to be generated.
Error at Data Flow Task [DTS.Pipeline]: "component "Script Component" (16)" failed validation and returned validation status "VS_ISBROKEN".
Error at Data Flow Task [DTS.Pipeline]: One or more component failed validation.
Error at Data Flow Task: There were errors during task validation.
(Microsoft.DataTransformationServices.VsIntegration)
------------------------------
BUTTONS:
OK
------------------------------
A bit of googling reveals the following Package Validation Error . So after going thru that , I understood what is the cause of the problem but how to rectify that , I don't know. Moreover, debugging is not possible.
Please help me.
EDIT
At last I found out that the Precompiled Option should be set to FALSE. Default is TRUE. It solved the problem.
Thanks
Sometime is enough to rebuild the task, just edit it and build in vsta.
You typically get this error when some portion of your script is no longer functioning correctly. This is often due to a dependency in the script that is no longer valid. Why can't you debug the package? If this is not your package then you're going to have to find the person who wrote it and have them fix the errors.
We recently ran into this issue and discovered is was because our code was too modern. The person who wrote the script used some newer code candy like:
somestring = $"{somevariable}-{Someothervariable}"
SomeFunctionWithOutParameter(out bool myResult)
It looked fine in the VS2017 editor on my colleague's machines but for some reason when I edited the script it was being pulled up in VS2015 (SSIS was being edited in VS2017) and the code was flagged.
After reverting the code to older style using String.Format() and pre-declaring the out variable the script was able to compile and run.
My guess is that whatever is compiling the script task code is not using the latest and greatest c# compiler.