我有一个SSIS包(ss2k12)我正在开发一个SQL任务,检查表是否存在,如果不存在则创建它,然后截断它。 该表是后续数据流任务的工作表。
当我运行任务时,它可以工作。 当我运行包时(在删除表...之后),它无法查找丢失的表(如果它丢失了,则sql任务会创建....)这是因为它是“预先检查”数据流任务吗? 我该如何解决这个问题?
I have an SSIS package (ss2k12) I'm working on which begins with a SQL task to check if a table exists, create it if it doesn't, then truncates it. The table is a work table for a Data Flow task that follows.
When I run the task, it works. When I run the package (after deleting the table...) it fails looking for the missing table (which the sql task creates if it's missing....) Is this because it's "pre-checking" the data flow task? How do I get around the issue?
最满意答案
当包接收到要启动的信号时,SSIS引擎会查看每个组件并验证它是否存在,元数据签名是否匹配等。然后,当组件获得可以运行的信号时,然后在重新检查元数据之前执行。
要解决此问题,您需要使用DelayValidation属性来指示仅在准备执行时才进行验证。
根据程序包的结构,您可能需要在任务(数据流)和程序包(控制流)级别设置此项。
When a package receives the signal to start, the SSIS engine looks at every component and verifies that it exists, the meta data signatures match, etc. Then, when the component gets the signal that it can run, the metadata is then rechecked prior to execution.
To get around this issue, you need to use the DelayValidation property to indicate that validation should only occur when it is ready to execute.
Depending on how your package is structured, you might need to set this at both the Task (Data Flow) as well as the Package (control flow) level.
更多推荐
发布评论