简体   繁体   English

SSIS更新Oracle DB

[英]SSIS Update Oracle DB

Hello and thank you in advanced for reading my question. 您好,谢谢您阅读我的问题。

I am working in SSIS and trying to take a view in Oracle SQL developer and update any matching rows in a table. 我在SSIS中工作,尝试在Oracle SQL Developer中查看并更新表中的所有匹配行。 By searching around I found out that SSIS has some problems with updating Oracle Databases and you can do it via OLE DB Command. 通过四处搜索,我发现SSIS在更新Oracle数据库方面存在一些问题,您可以通过OLE DB命令来完成。 SO What I did was added a OLE DB Source to bring in a View I have created in Oracle SQL Developer. 因此,我所做的添加了一个OLE DB源,以引入在Oracle SQL Developer中创建的视图。 This source has the same exact columns as the destination table. 此源与目标表具有相同的确切列。 I then connected it to OLE DB Command. 然后,我将其连接到OLE DB命令。 I selected the appropriate Connection Manager and I had to add the external columns in the Inputs and Outputs tab to match what the destination table has. 我选择了适当的连接管理器,并且必须在“输入和输出”选项卡中添加外部列以匹配目标表的内容。 This lets me select all of the column mappings. 这使我可以选择所有列映射。 However the issues I am having appear to be with the SQLCommand that I have typed up in the custom properties section of the Component Properties Tab. 但是,我遇到的问题似乎与我在“组件属性”选项卡的“自定义属性”部分中键入的SQLCommand有关。 Can someone with experience in this area please help me with getting this set up? 在这方面有经验的人可以帮助我进行此设置吗? Below is my SQLCommand (It currently gives me an error of "ORA-01008: not all variables bound". when I try to execute): 下面是我的SQLCommand(当我尝试执行时,它当前给我一个错误“ ORA-01008:并非所有变量都绑定”。):

UPDATE DB.PERMDB
SET 
DB.PERMDB.NET_TIME = :NET_TIME,
DB.PERMDB.PROC_ZONENAME = :PROC_ZONENAME,
DB.PERMDB.NET_TIME2 = :NET_TIME2,
DB.PERMDB.PROC_ZONENAME = :PROC_ZONENAME2,
DB.PERMDB.LAST_DISCOVERY = :LAST_DISCOVERY1,
DB.PERMDB.PULSEDATE = :PULSEDATE1
WHERE
DB.PERMDB.COMBREL = :COMBREL1

我最终使用了脚本任务来运行UPDATE查询,它的工作原理很吸引人。

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

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