Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Oracle Database link

Posted on 2008-10-29
7
383 Views
Last Modified: 2013-12-12
i have a database link and i want to use it to return
result set of data...
when i use ref corsure i faced error ora-10001.
in form when i build a form on procedure that return ref corsure
the form  work correctly localy
but it do not work on database link....


any ideas plz
0
Comment
Question by:mohammedf
  • 3
  • 2
  • 2
7 Comments
 
LVL 23

Expert Comment

by:David
ID: 22833039
Apparently you have an invalid cursor in your code block.  Please post the code as a snippet.  And, I have no idea what word you mean by "corsure" -- regrets and please clarify.
0
 
LVL 6

Author Comment

by:mohammedf
ID: 22838595
hi
the procedure that retures the cursor is working 100% on the local Database , but in the other database that i have link to it , it did not work ,,
so i guess the problem is in the link,,im not sure

0
 
LVL 74

Expert Comment

by:sdstuber
ID: 22839649
please post the code
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 6

Author Comment

by:mohammedf
ID: 22839947

create or replace package reg_pack as
TYPE rec IS RECORD(cd_tb_cd rg_code_tb.cd_tb_cd%TYPE,
                              cd_cd rg_code_tb.cd_cd%TYPE,
                              CD_ARB_TR rg_code_tb.CD_ARB_TR%TYPE);
type my_ref is ref cursor RETURN rec;
procedure test_ref_proc(my_cur in out my_ref);
end reg_pack;
 
create or replace package body reg_pack as
procedure test_ref_proc(my_cur in out my_ref) is
begin
open my_cur for select cd_tb_cd,cd_cd,cd_arb_tr from rg_code_tb
where cd_tb_cd=0;
end test_ref_proc;
end reg_pack;
 
CREATE TYPE code_tab AS OBJECT
       (code_main         number(5),
        code_sub          number(5),
        Icode_desc       VARCHAR2(50));
/
CREATE TYPE code_tab_table AS VARRAY(1000) OF code_tab;
/
CREATE FUNCTION gets_code (code_main number) 
         RETURN code_tab_table PIPELINED IS
v_tab code_tab_table := code_tab_table();
begin
FOR cur IN (SELECT cd_tb_cd,cd_cd,cd_arb_tr 
                 FROM   rg_code_tb
                 WHERE  cd_tb_cd =code_main
                 ORDER BY cd_cd)
  LOOP
PIPE ROW(code_tab(cur.cd_tb_cd, cur.cd_cd, cur.cd_arb_tr));        
  END LOOP;
  RETURN;
END;

Open in new window

0
 
LVL 74

Expert Comment

by:sdstuber
ID: 22840332
where is the db link involved?

what line generates the error?
0
 
LVL 23

Accepted Solution

by:
David earned 500 total points
ID: 22855543
I assume you've checked for the appropriate privs and synonyms on the remote object -- and please show the error in context.
0
 
LVL 23

Expert Comment

by:David
ID: 22961540
May we be of any further assistance or has this been abandoned?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Oracle Public Synonyms and Privileges 2 73
Oracle - SQL Parse String 5 44
Help on model clause 5 37
Not able to drop or recreate an Oracle stored procedure 1 38
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows how to recover a database from a user managed backup
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question