Execute Oracle Function from SSIS OLE DB Command

99封情书 提交于 2019-12-25 12:13:31

问题


I am trying to call a function from oracle using OLE DB Command for SSIS, I have the connection set up Correctly but I think my Syntax for calling the function is incorrect?

EXEC UPDATE_PERSON ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? output

I have used this on a SQL stored proc for testing & it has worked. the oracal connection is 3rd party & they have just supplied the function name & expected parameters. I should get 1 return parameter.

The Error:

Error at Data Flow Task [OLE DB Command [3013]]: SSIS Error Code DTS_E_OLEDBERROR. AN OLE DB error has occurred. Error code 0x80040e14.
An OLE DB record is available. Source: "Microsoft OLE DB Provider for Oracle" Hresult: 0x80040E14
Description: "ORA-00900: invalid SQL statement".

回答1:


in your syntax you have to change the command " EXCU " to " EXEC ".

EXEC UPDATE_PERSON ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? OUTPUT i have to mention that there is no need for { }

other than that you have to be aware of your full path of the SP that your are executing " by means of specifying [databaseName].[dbo]. if needed

Regards, S.ANDOURA




回答2:


Try wrapping it in curly braces:

{EXEC UPDATE_PERSON ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? output}

I don't think Oracle functions have output parameters - are you absolutely certain this is a function and not a proc? functions don't normally perform updates either.




回答3:


syntax:

SELECT crm_customer.UPDATE_PERSON( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) FROM dual

I will update further details once solution has been completed

Thanks for the help



来源:https://stackoverflow.com/questions/21330402/execute-oracle-function-from-ssis-ole-db-command

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!