我有一个 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]
只是一个pass-thru)
我可以在设计时确认表达式的流程。但是当我从 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]
,但我设置了先例约束,所以不应该有重叠......还有其他可能性吗?
它似乎正在读取我的变量的内容作为变量的名称。