Calling stored procedure (AS400) from Oracle
622010Feb 7 2008 — edited Feb 27 2008From 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