我有一个SSIS程序包,该程序包可从数据库写入csv文件,将它们复制到几个位置,然后通过电子邮件发送成功消息。该过程是:
@[User::varSQLCSVOutputFolder]
@[User::varEmailBody] = "Files successfully saved to " + @[User::varCNNTargetCSVFolder]
@[User::varCNNTargetCSVFolder] = @[User::varSQLCSVOutputFolder]
@[User::varSQLCSVOutputFolder]
从数据库加载,值= \\server.domain.com\TEST\Output Files AM
(确认@[User::varCNNTargetCSVFolder]
只是直通)
我可以在设计时确认表达式是否通过。但是当我从SSISDB执行它时,我得到了错误
错误:发生以下错误消息的错误:
Failed to lock variable "Files successfully saved to \\server.domain.com\TEST\Output Files AM" for read access with error 0xC0010001 The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container during execution of the package, and the variable is not there. The variable name may have changed or the variable is not being created.
我认为转义反斜杠可能是一个怪异的问题,但是我尝试在表达式中使用REPLACE()
,但不走运。我确实重复使用了基础变量@[User::varSQLCSVOutputFolder]
,但是我已经设置了先例约束,因此应该没有重叠...。还有其他可能性吗?
似乎正在读取我变量的内容作为变量的名称。