Calling an Oracle function from SQL Server Linked Server

老子叫甜甜 提交于 2019-12-01 23:05:45
Hemanshu Bhojak

I used the following syntax and it worked for me.

EXECUTE (Query, Parameters) AT LinkedServerName

Example:

EXECUTE ( 'BEGIN ? := Package.MyFunction(?,?); END;', @ReturnValue, @InputPara, @OutputPara OUTPUT ) AT LinkedServerName

Important Points:

  • Don't forget the BEGIN and END syntax when calling functions
  • Don't forget the semicolon at the end "END**;**"
  • For using the above syntax you need to enable RPC for the linked server
  • Oracle will not consider the call as a function call unless you accept the output in a variable
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!