Environment: SQL Server 2008 R2
I keep getting this error on a scheduled job running on SQL Server 2008 R2:
Error: Code: 0xC02020EE Source: Data Flow Task - Fix Missing this and that Row Count - This Not Fixed [148] Description: The variable "MyNameSpace::MyVariableName" specified by VariableName property is not a valid variable. Need a valid variable name to write to. End Error
I cannot make out what could be wrong here. The variable is declared in the dtsx like this:
<DTS:Variable>
<DTS:Property DTS:Name="Expression"/>
<DTS:Property DTS:Name="EvaluateAsExpression">0</DTS:Property>
<DTS:Property DTS:Name="NameSpace">MyNameSpace</DTS:Property>
<DTS:Property DTS:Name="ReadOnly">0</DTS:Property>
<DTS:Property DTS:Name="RaiseChangedEvent">-1</DTS:Property>
<DTS:Property DTS:Name="IncludeInDebugDump">6789</DTS:Property>
<DTS:VariableValue DTS:DataType="3">0</DTS:VariableValue>
<DTS:Property DTS:Name="ObjectName">MyVariableName</DTS:Property>
<DTS:Property DTS:Name="DTSID">{F6C30C52-3BDA-45D6-862B-10405215FABC}</DTS:Property>
<DTS:Property DTS:Name="Description"/>
<DTS:Property DTS:Name="CreationName"/>
</DTS:Variable>
And it is being used like this:
<component id="148" name="Row Count - IDs Not Fixed" componentClassID="{150E6007-7C6A-4CC3-8FF3-FC73783A972E}" description="Counts the rows in a dataset." localeId="-1" usesDispositions="false" validateExternalMetadata="True" version="0" pipelineVersion="0" contactInfo="Row Count;Microsoft Corporation; Microsoft SqlServer v10; (C) Microsoft Corporation; All Rights Reserved; http://www.microsoft.com/sql/support;0">
<properties>
<property id="149" name="VariableName" dataType="System.String" state="default" isArray="false" description="Specifies the variable to hold the row count." typeConverter="" UITypeEditor="" containsID="false" expressionType="None">MyNameSpace::MyVariableName</property>
</properties>
<inputs>
<input id="150" name="Row Count Input 1" description="" hasSideEffects="true" dangling="false" errorOrTruncationOperation="" errorRowDisposition="NotUsed" truncationRowDisposition="NotUsed">
<externalMetadataColumns isUsed="False"/>
</input>
</inputs>
<outputs>
<output id="151" name="Row Count Output 1" description="" exclusionGroup="0" synchronousInputId="150" deleteOutputOnPathDetached="false" hasSideEffects="false" dangling="false" isErrorOut="false" isSorted="false" errorOrTruncationOperation="" errorRowDisposition="NotUsed" truncationRowDisposition="NotUsed">
<externalMetadataColumns isUsed="False"/>
</output>
</outputs>
</component>
Can someone help me understand what needs to be corrected to avoid this error? Googling this error has not helped so far.
Your problem is with the namespace "MyNameSpace". According to books online, only the following two name spaces are allowed:
Namespace
Integration Services provides two namespaces, User and System. By default, custom variables are in the User namespace, and system variables are in the System namespace. You can create additional namespaces for user-defined variables and change the name of the User namespace, but you cannot change the name of the System namespace, add variables to the System namespace, or assign system variables to a different namespace.