Skip to Main Content
  • Questions
  • ORA-24338: statement handle not executed

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, Vinayagam .

Asked: February 15, 2012 - 10:33 am UTC

Last updated: February 15, 2012 - 11:01 am UTC

Version: 11.1.0.6.0

Viewed 10K+ times! This question is

You Asked

I called store procedure with out parameter refcursor from remote database. After sucessful execute when I try to open the cursor there was error 'ORA-24338: Statement handle not executed'

SQL> var v_cursor refcursor;
SQL>execute transform.usp_get_stat@dev_dblink(:v_cursor);
PL/SQL procedure sucessfully completed.
SQL> print v_cursor;
ERROR:
ORA-24338: statement handle not executed

and Tom said...

ref cursors and dblinks do not work together

http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/cursor_variable.htm


the text that reads:

You can use a cursor variable in a server-to-server remote procedure call (RPC) only if the remote database is not an Oracle Database accessed through a Procedural Gateway.


should read:

You can use a cursor variable in a server-to-server remote procedure call (RPC) only if the remote database is a non-Oracle Database accessed through a Procedural Gateway.



I've filed a bug to get it fixed. It was correctly phrased in 10.2:

http://docs.oracle.com/cd/B19306_01/appdev.102/b14261/sqloperations.htm#sthref1451

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

A reader, April 26, 2013 - 6:34 am UTC


More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library