Can we pass Reference cursor using dblink

Can we pass reference cursor from one DB to another DB using DBlink?
I feel like it is not possible because the memory structure of same will be available in other DB.
Could you please let me know whether we can give a work around which will solve the issue.
Regards,
Balu

Balu, cursor is a memory area which contains parsed SQL statement and everything needed for
the execution of the SQL command. That, of course, is instance specific and carrying it over to another DB using db-link would make no sense whatsoever.

Similar Messages

  • Can I pass a table using field-symbols to a PERFORM

    Can I pass an internal table using a field-symbol via a PERFORM that is stored in another program.
    For example, I want to pass lt_data using a field-symbol.  If I can do this, please tell me how to define a field-symbol for a table and how I setup the parameters on the FORM.
       perform TEST_FIELD_SYMBOLS in program zadd_data
                      changing lt_data[]
                       if found.
    Thanks.
    Regards,
    Ryan

    Since in ABAP all FORM-paramters are passe call-by reference, it makes imho no difference if u pass a table directly or via a fieldsymbol.
    U can pass a REF TO DATA to a form and then assign it to an FS like shown in the following example.
    TYPES: BEGIN OF s_data,
             data TYPE c,
           END OF s_data,
           s_tab TYPE STANDARD TABLE OF s_data.
    TYPES: r_tab TYPE REF TO data.
    START-OF-SELECTION.
      DATA: t_foo TYPE s_tab.
      DATA: ref_foo TYPE r_tab.
      GET REFERENCE OF t_foo INTO ref_foo.
      PERFORM my_form_fs USING ref_foo.
    FORM my_form_fs USING u_ref TYPE r_tab.
      FIELD-SYMBOLS: <fs> TYPE s_tab.
      DATA: w_tab TYPE s_data.
      ASSIGN u_ref->* TO <fs>.
      w_tab-data = 'X'.
      APPEND w_tab TO <fs>.
    ENDFORM.
    This also works for external performs....
    Best regards,
        Sebastian
    Message was edited by:
            Sebastian Rötzel

  • Can we create cursor using the table created dynamically

    Dear all,
    Can we create the cursor using the table which is created dynamically using "Execute immediate" within the same procedure,
    or is there any way to call the table created dynamically ..
    please Do Help me in this
    thanks alot
    Edited by: khaja on Jan 18, 2009 10:57 AM

    Well, I don't think this approach is bad in any possible circumstances. It depends on the requirements we don't know. Yes, usually applications should not be designed in this way. But 'usually' does not mean 'never'. One possible case is described in Oracle's example Referencing Database Objects that Do Not Exist at Compilation. It's possible to assume that tables inv_01_2003, inv_04_2003, etc from the referenced topic What Is Dynamic SQL? are generated automatically by some job using dynamic create table stmt. If the OP has similar requirements tnen this approach is not bad. It may not be the best one but it at least is not so bad as you said.
    I believe that OPs know their requirements much better than me. This is why I always try to answer the exact question. If the approach is really ugly then I don't answer such questions at all.
    Regards,
    Dima
    Message was edited by:
    DimaCit

  • Returning Cursor using WITH

    Hi
    in my procedure there is a Parameter cursor, How can I to return cursor using WITH
    my cursor is P_cursor
      open p_curosr is
      with my_tab ( select .....  from.....)
      select columns01, columns02,....etc
       from  my_tab,
               others_tabs
       where .....did not work
    How can I to open cursor returning to Client side ?

    did not workwhat is an error?
    probably you forgot to put with my_table AS
    SQL> set serveroutput on;
    SQL>
    SQL> declare
    2   cursor p is
    3   with t as (select 1 num from dual union all
    select 2 from dual)
    4    select * from t;
    5   p1 p%rowtype;
    6   --
    7  begin
    8   open p;
    9    loop
    10      fetch p into p1;
    11      exit when p%notfound;
    12      dbms_output.put_line(p1.num);
    13     end loop;
    14   close p;
    15  end;
    16  /
    1
    2
    PL/SQL procedure successfully completed
    SQL>
    Thanks
    But I need to Open P_cursor without Fetch , P_cursor is is ref cursor passed like parameter
    procedure   my_proc (P_cursor out  out  Typedefined)
       Open P_cursor
        WITH mytable as ( select ......)
      no work

  • How to pass a cursor as IN parameter to a procedure

    Hello
    I want to pass a cursor to a procedure as IN parameter.
    See the below piece of code:
    Cursor mycur is select * from table_name;
    Procedure myproc(mycur IN ...)
    begin
    fetch mycur into v_rec;
    {want to do some updates here}
    end;
    Please suggest how can I pass the cursor?
    Thanks in advance !!!!

    793059 wrote:
    I want to pass a cursor to a procedure as IN parameter.You can use the PL/SQL type called sys_refcursor - and open a ref cursor and pass that to the procedure as input parameter.
    Note that the SQL projection of the cursor is unknown at compilation time - and thus cannot be checked. As this checking only happens at run-time, you may get errors attempting to fetch columns from the ref cursor that does not exist in its projection.
    You also need to ask yourself whether this approach is a logical and robust one - it usually is not. The typical cursor processing template in PL/SQL looks as follows:
    begin
      open cursorVariable;
      loop
        fetch cursorVariable bulk collect into bufferVariable limit MAX_ROWS_FETCH;
        for i in 1..bufferVariable.Count
        loop
          MyProcedure( buffer(i) );   --// <-- Pass a row structure to your procedure and not a cursor
        end loop;
        ..etc..
        exit when cursorVariable%not_found;
      end loop;
      close cursorVariable;
    end;

  • Sending ref cursor through dblink

    Hi,
    I have an Oracle StoredProcedure named MySP_1 in the database instance named "sourcedb". This StoreProcedure has a refcursor output parameter. In the other hand, i have an StoredProcedure named MySP_2 in the database instance named "targetdb". I need to invoke MySP_1 from MySP_2. Is this possible?... If it isn't possible, somebody knows some workaround for doing that?
    Thanks in advance !!

    Ref cursors cannot be used across a database link.
    See {message:id=9791161} for Oracle reference and scroll down that message to see how one can create a remote cursor using DBMS_SQL on the remote database, from the local database.

  • Can we pass value through "EXPORT" in background scheduled report

    hi experts
          my query is can we pass some field using 'EXPORT' statement while scheduling a report to run in background using statement
    submit 'ZXYX' via job jo_name number jo_num and return.
    i am using 'IMPORT" statement in 'ZXYZ'

    EXPORT, as I recall, is limited to your user context.   Check shared objects (which still may not work, although you can propagate to servers) and INDX-like tables.  Research use of INDX-like tables for how data is passed into and out of these tables (import/export).

  • How can I access a database remote without using dblink, synonyms,aliases?

    My store procedure access a remote tables using dblink, synonyms, alias, but by business company requirenments I nedd to use another data base access method. My PL/SQL statement looks like
    select c.cus_id, c.cus_name, p.bankaccno
    into v_cus_id, v_cus_name, v_bankaccno
    from customer c, payment@finantial p
    where c.cus_id = p.cus_id
    Are any method else to connect to several remote databases concurrently?
    If Yes, plase say me how is it, or tell me where do I obtain some examples, or any documentation.
    Edited by: user518321 on Apr 21, 2009 1:58 PM
    Ok, But I must not use any of these data base access method, metioned: dbliks, aliases, synonyms.
    Edited by: user518321 on Apr 21, 2009 2:05 PM
    Ok, It is enough for now, I am surprised for the response time and for their arguments, thanks a lot.
    Edited by: user518321 on Apr 21, 2009 2:50 PM

    If you want to access a table in a remote database using SQL, you will need a database link. It would be exceptionally odd for the business to require that you access a remote database and to prohibit the use of database links. What is the business reason for that combination?
    If you want to look into rather more esoteric solutions, you could load a JDBC driver for the remote database, write a Java stored procedure that queries the remote table using that JDBC driver, and then cobble together some PL/SQL that joins the two result sets. You won't be able to reference the remote table in SQL and the solution won't scale well as data volumes increase and you'll be writing a whole lot of code to manually join tables together, but it does avoid database links. Of course, whatever concerns lead to the ban on database links would probably apply to loading a JDBC driver into the database and writing Java stored procedures to access the remote database, but since you haven't explained the reasoning behind the restrictions, we're just guessing.
    Justin

  • Using Reference Cursor Performance Issue in Report

    Hi,
    Are reference cursor supposed to be faster than a normal query? The reason why I am asking is because I am using a reference cusor query in the data model and it has a performance issue on the report, it's taking quite a while to run than If I just run the same reference cursor query in sql*plus. The difference is significantly big. Any input is very much appreciated!
    Thanks,
    Marilyn

    From the metalink bug 4372868 on 9.0.4.x. It was fixed on 10.1.2.0.2 and does not have a backport for any 9.0.4 version.
    Also the 9.0.4 version is already desupported. Please see the note:
    Note 307042.1
    Topic: Desupport Notices - Oracle Products
    Title: Oracle Reports 10g 9.0.4 & 9.0.4.x
    Action plan:
    If you are still on 9.0.4 and later version of oracle reports and have no plan yet to migrate to 10.1.2.0.2 version use the same query you are using in your reference cursor and use it as a plain SQL query in your reports data model.

  • HT201250 how can i pass information from one mac to another mac by using the time capsule

    how can i pass information from one mac to another mac by using the time capsule

    If you want to transfer files, settings, etc., you must open Migration Assistant (Applications > Utilities) in the Mac that you want to transfer the files and follow the instructions

  • I need to pass value for Actual GI date field in VL01N t code, I am using BAPI_DELIVERYPROCESSING_EXEC. can any one tell me how can i pass vaule ?

    I need to pass value for Actual GI date field in VL01N t code, I am using BAPI_DELIVERYPROCESSING_EXEC. can any one tell me how can i pass vaule ?

    Hi Abdul,
    Sorry for my unprecise answer, but you talk about a tcode, but you're using a BAPI Call. Maybe you want to call the transaction in batch mode?
    http://help.sap.com/saphelp_erp60_sp/helpdata/de/fa/09715a543b11d1898e0000e8322d00/content.htm
    Regards,
    Franz

  • How can I pass value in status and reason for rejection using BAPI_LEAD_CREATEMULTI when creating multiple lead

    Hello,
    I want pass value in STATUS and Reason for rejection according to requirement when i am creating multiple lead using BAPI_LEAD_CREATEMULTI. Please help me how can i pass value. Please give some sample code that in which table i have to pass values and please also tell me INPUT_FIELDS values. Please help me
    Regards,
    Kshitij Rathore

    Hello,
    Please help me for solve this problem. I am trying to solve problem from last 4 days but i didn't get any solution.
    Regards,
    Kshitij Rathore

  • We can't create form using dblink  and synonim

    We have created a dblink pointing to a table in the remote database.
    When we create a form based on table or view using this dblink, we get the error "page not found".
    We read from
    Re: I can't create form using dblink
    that we must create a synonim, and this was done creating one in the same schema of the db-link using the "Database Objects" of oracle portal 10g (external db is an oracle 9.0.2).
    The new synonim work (tested with reports and pl/sql page)
    but if we click on "Grant Access" (of the synonim) we get the following error :
    Error: The underlying object of the synonym does not exist, is a remote object or is not of type function, procedure, package, sequence, synonym, table or view. (WWV-17076)
    Does form work only with table and view of the portal database (not external one)? or have we loose something in the creation of the synonim?
    Have someone succesfully created a form based on a db-link towards an external database?
    Thanks to all.

    Hei guys, has nobody created succesfully a data-driven forms based on a dblink towards an external database?
    I can't believe this!!!!

  • Can't use DBLINK in Forms 4.5!!!

    Hi All,
    Can i use dblink in forms 4.5..b'coz it is giving me an error..
    like PL/SQL Check#20108 Pls. inofrm your Oracle represnative
    Thanx in advance!!!

    Solutions previously posted to this sort of question include creating a synonym for the link or wrapping it in a view. If that fails then move all the code to the database.
    This is an issue in later versions too, certainly in 6i and IIRC in 10g.

  • Can we pass parameters using Personalization?

    Using Personalization options ,Can we pass a parameter from existing jsp to the custom jsp url given in the button/link added through personalization?e.g if A is existing jsp and B is new(custom jsp)added for button,then on the click of the button, can B take parameter from A?

    I am also looking for a solution to this.
    I am trying to pass a parameter from JTT jsp Menu link to OA Framework Page.
    Thanks
    Srini

Maybe you are looking for

  • How can I change the position of an entire frame on the timeline?

    As I've posted before, I'm very new to flash and am incredibly green. I've done HTML/Dreamweaver work in the past, but I had something thrust into my lap that was a bit more complex than I expected! :) Anyway, the person that set up the flash documen

  • Upgrade to ECC6 and Unicode: Passing HTML

    We are experiencing new issues related output on our Web page URL. Iu2019d like to convert the internal text table, t_html (now in Unicode-I assume utf-16), to contain the old hex values(I assume utf-8), before the Unicode upgrade. Or, convert the te

  • Should I link to my RSS feed or to the iTunes page from my website?

    On A Story For Bedtime I want to put a link to a podcast of the stories, should I link to the apple iTunes music store magic launching URL like this or should I link directly to my XML like this . A fair percentage of my audience will not have a clue

  • Installing Photoshop on Mac Pro

    I have purchaed and attempted to download PhotoshopElements. None of my attempts seems to have worked since when I try to install the program I get error messages, such as it is damaged, there is no program to open it with, etc.  I've read some of th

  • AHQ/Russia specific education infotype to my infoset

    Hello Techies, I want to add Russia specific education infotype to my infoset for add hoc query Now when I add education infotype via tcode sq02 , I cant see the Russia specific fields over there Like Profession (OKSO) PROFESSION         Education (O