DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: accessing multiple instances

  1. #1
    Join Date
    Jul 2004
    Posts
    2

    accessing multiple instances

    Hi,
    I need to access more that 1 instance, is there a way to start a new connection from a pl/sql script ?
    eg.
    inst1 has table I1
    inst2 has table I2

    I need to query I2 using columns from I1. It may sound unusual etc.etc. But this is not a design error

    I have stored the field-values its just one column from I1 and want to connect to I2.
    I thought that the following would work, but it didnt


    declare
    begin
    execute immediate 'conn abc/abc@inst2 ';
    end;
    /

    Want to run something like this


    declare
    curosr c is
    select 1,2,3,4 from inst1.table1 where ---- ;
    c_rec is c%rowtype;

    begin
    for c_rec in c loop
    -- get the c_rec.1 value and query inst2

    select c1 into holder1 from inst2.table2 where (.....);

    end loop;
    end;
    /


    Thanks

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    First, you have to learn how to read. By posting your question in a forum that explicitly says "Do not post questions here" you will never get an answer.

    Effectively, you can't "create" a connection while in pl/sql unless you call a java stored procedure. The easier way to do it would be with database links. I would start with the documentation at http://tahiti.oracle.com.
    Jeff Hunter

  3. #3
    Join Date
    Jul 2004
    Posts
    2
    Sorry about the posting the question here didnt know this was not the right place.


    regards,
    naimy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width