Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9105915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:12:53+00:00 2026-06-17T02:12:53+00:00

I have to write a stored procedure which invokes a remote procedure via db

  • 0

I have to write a stored procedure which invokes a remote procedure via db link. This procedure returns a cursor. When I try to iterate over this cursor I get ORA-01001: invalid cursor Error. I read on some forums that simply it’s not allowed to access cursors over db links, but I’m not convinced about that. Anyone know how to solve it? What is important here I can’t modify existing remote method.

below is a code of my procedure:

declare
  TYPE generic_cursor IS REF CURSOR;
  refCursorValue generic_cursor;  
 field1 table1.column1@my_db_link%type;
begin

  rempote_package.remote_method@my_db_link('33337136','','',refCursorValue);

 loop
      fetch refCursorValue into  field1;      -- here exception is thrown               
      exit when refCursorValue%NOTFOUND;
  end loop;
  close refCursorValue;
end;

interface of remote method is as below:

PROCEDURE remoteMethod (p1 IN VARCHAR2,
 p2 IN VARCHAR2,
 p3 IN VARCHAR2,
 rst_data OUT pkg_resultset.generic_cursor)

and pkg_resultset.generic_cursor has got following definition:

 TYPE generic_cursor IS REF CURSOR;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T02:12:55+00:00Added an answer on June 17, 2026 at 2:12 am

    as best as i can tell, you cannot pass a ref cursor over a database link. but you can pass a table. see this example from Ask Tom: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4254116170549

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a stored procedure in which if I write the following query without
I'm attempting to write a stored procedure in Oracle (which I have come to
I have a stored procedure which returns a mixture of plain columns, and one
I have to write one Stored Procedure, In which I have to find the
Let's say I have a stored procedure which returns a large set of data.
I have to write a update stored procedure. I will be asking paramters for
I have a stored procedure (that I didn't write) that uses openquery to populate
I have a stored procedure which is returning me about 50 columns. I want
Is there a way to write SQL Server Stored Procedure which to be strongly
I have an insert stored procedure which takes many parameters - 2 of them

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.