简体   繁体   English

从 SQL 服务器执行 Oracle 11g function 并将结果插入 Z97785240A0100CB0376

[英]Execute Oracle 11g function from SQL Server with result insert into SQL table

I have a SSIS package that query data from SQL table (using SQL Task tool) and pass it's output to a ForEach loop container that will insert value into query variable. I have a SSIS package that query data from SQL table (using SQL Task tool) and pass it's output to a ForEach loop container that will insert value into query variable. Within the container is another SQL Task with Oracle connection to execute function in Oracle with the query.容器内是另一个 SQL 任务,它与 Oracle 连接执行 function 和查询。 Although the package runs very slow, it still produces result.虽然 package 运行速度很慢,但它仍然会产生结果。 However, I need help on putting the result into a SQL table.但是,我需要帮助将结果放入 SQL 表中。

Furthermore, let me know if there are better ways of optimizing the package.此外,让我知道是否有更好的方法来优化 package。

Thank you in advance.先感谢您。

My advice is to change the query inside the SSIS package in order to insert 1000 by 1000 instead of 1 by 1. You can play with the numbers taking in consideration the result of the performance.我的建议是更改 SSIS package 中的查询,以便插入 1000 x 1000 而不是 1 x 1。您可以考虑性能结果来使用数字。

INSERT ALL
  INTO mytable (column1, column2, column_n) VALUES (expr1, expr2, expr_n)
  INTO mytable (column1, column2, column_n) VALUES (expr1, expr2, expr_n)
  INTO mytable (column1, column2, column_n) VALUES (expr1, expr2, expr_n)
  ...
SELECT * FROM dual

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM