Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Calling stored procedure (AS400) from Oracle

622010Feb 7 2008 — edited Feb 27 2008
From Oracle, I can't call a simple stored procedure (function created on a AS400) :

1) Let's take a basic function in AS400
CREATE FUNCTION TEST.TEST2 (x INTEGER)
RETURNS INTEGER LANGUAGE
SQL CONTAINS
SQL NO EXTERNAL ACTION DETERMINISTIC
RETURN x * 2


2) Let's test the function in AS400 with a simple SQL :
SELECT TEST.TEST2(5) FROM SYSIBM.SYSDUMMY1
The return result : 10

3) I give the maximum Grants to this function
GRANT ALL ON FUNCTION TEST.TEST2 TO PUBLIC;

4) Testing the function in ORACLE with a simple SQL (with the gateway) :
SELECT TEST.TEST2@DB2DBLINK(5) FROM DUAL
The return result : ERRORS: ORA-06571 and ORA-06512

QUESTION:
Is there any tricks or setting on the gateway to make works functions and also procedures?

Thanks if anyone can help,
Michel
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 26 2008
Added on Feb 7 2008
7 comments
5,221 views