简体   繁体   English

从Oracle执行SQL Server存储过程

[英]Execute SQL Server stored procedure from Oracle

I have an Oracle procedure that executes a SQL Server stored procedure. 我有一个执行SQL Server存储过程的Oracle过程。 The SQL Server stored procedure executes one of three stored procedures based on an id field passed it from the Oracle procedure. SQL Server存储过程基于从Oracle过程传递来的id字段执行三个存储过程之一。 Two of the stored procedure execute okay but the third does not. 其中两个存储过程执行正常,但第三个不执行。

The third stored procedure has several nested stored procedure calls. 第三个存储过程具有几个嵌套的存储过程调用。 It performs some calculations and then inserts to 3 different tables and then some additional calculations and updates one of the tables it just inserted to. 它执行一些计算,然后插入到3个不同的表中,然后进行一些其他计算,并更新刚插入到其中的一张表。 If I execute the stored procedure in SSMS it runs without issue. 如果我在SSMS中执行存储过程,它将运行无问题。 When it is executed from Oracle side I get nothing. 当它从Oracle方面执行时,我什么也没得到。

Could this because of the nesting but because of the implicit commits I see it work using SMSS? 这可能是因为嵌套,但由于隐式提交,我看到它使用SMSS可以工作吗? I tried doing a BEGIN Transaction in the starting stored procedure on the MS SQL Server side and a commit at the end where it should return. 我尝试在MS SQL Server端的启动存储过程中进行BEGIN事务,并在应返回的末尾进行提交。 Still nothing. 依然没有。 I have Try and Catch blocks in the MS SQL stored procedures and don't receive any errors. 我在MS SQL存储过程中有Try and Catch块,并且没有收到任何错误。

Any suggestions would be greatly appreciated. 任何建议将不胜感激。 Thank you. 谢谢。

Does nothing means none of the inserts or updates show up in the tables. 什么都不表示表中没有插入或更新。 No error messages As far as posting code; 没有错误信息,就邮递区号而言; what specifically would you be interested in seeing? 您特别想看到什么? There are 4 stored procedures which have 100s of lines of code each. 有4个存储过程,每个过程有100行代码。

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

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