sql server - SSIS failure scenario triggered all the time -


i have problem flow in ssis package. increasing performance have same logic importing data ms access files sql server database:

  • 1st task - try bulk insert data (table or view - fast load)
  • if there failure (e.g. constraint violation), whole bunch of records passed next task - normal insert (table view)
  • all problem records passed next steps loggin flat files (txt)

the problem face when first insert went fine, still reach failure flow , empty error log file created time. in understanding process should reach point in case there problems before.

for better understanding attach image execution results , there green ticks end.

would appreciate advice workaround. need create error log files - when there error details problem.

thanks!

wrong flow in ssis package

i think may confusing data flow control flow degree.

the stockexchange - error log created may receive records dataflow.

the way around be:

1) create temporary error log file temporary hold failed rows, or 0 rows if successful in temporary location.

2) after "stockexchange - error desc" component add rowcount component , assign variable e.g. ierrorcount

3) in control flow, after data flow add 2 precedence constraints. 1 @ierrorcount > 0 , 1 @ierrorcount ==0. if it's 0 add file system task delete temporary log file (has has 0 rows)

4) @errorcount > 0 path, add file system task copy temporary log file required location valid name. , add file system task delete temporary log file.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

php - MySQLi multi_query results for later use -