SSIS;即使插入到数据库后,行也重定向到错误 [英] SSIS; row redirected to error even after inserting to DB

查看:26
本文介绍了SSIS;即使插入到数据库后,行也重定向到错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 SSIS 包可以将行插入/更新到数据库.首先,我使用查找来检查行是否已插入数据库;如果是,我更新该行,否则作为新行插入.

I have a SSIS package to insert/update rows to Database. First i use look up for checking if row already inserted to DB;If yes i update that row, else insert as new row.

我的问题是插入时,一行插入成功但也重定向到错误.两者怎么可能同时发生?有时也会发生这种情况,但并非总是如此 - 非常不一致.如何跟踪导致错误的原因?我在这里使用了重定向行"来获取失败的行.

My problem is when inserting , a row is inserted successfully but also redirected to error. How both can happen at same time? That too it happens some times not always - very inconsistent. How to track what caused the error ? I used "redirect row" here to get failed rows.

只有在服务器上部署时才会发生这种情况.使用 BIDS 运行我的本地机器时效果很好.

This happens only when it deployed on server.On running my local machine using BIDS works fine.

推荐答案

我的发现可能对访问这里的人有所帮助..

My finding might help those who visit here..

@billinkc 发表了广泛的评论;我已经经历了所有这些.好吧后来在挖掘系统之后问题有所不同.

@billinkc made a broad comment; i had gone all through that.Well Later after digging down the system the problem was something different.

我的 SSIS 包中有脚本任务来执行一些操作.那个使用磁盘中名为 TEMP 的文件夹.触发此 SSIS 的程序也同时使用相同的 TEMP 文件夹.现在没有处理文件读/写异常.这导致脚本任务失败,导致包失败错误.由于在脚本任务之前执行了 INSERT 功能,因此 INSERT 成功.脚本失败后,它也会将行移到错误中!

My SSIS package has script task within to do some operations.That one uses a folder called TEMP in the disk.The program which triggered this SSIS also simultaneously using the same TEMP folder. Now there the file read/write exceptions were not handled. This caused script task to fail resulting a package fail error.Since the INSERT functionality carried before the script task,INSERT was successful.Later when script failed it moved rows to error too!

我尝试捕捉这些文件错误/异常"并且成功了!!

I tried with catching these "file errors/exceptions" and it worked!!

这篇关于SSIS;即使插入到数据库后,行也重定向到错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆