1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

How to open connection for multiple databases in same pl/sql script?

Discussion in 'SQL PL/SQL' started by ana, Sep 21, 2009.

  1. ana

    ana Guest

    Hi;

    I am using SqlDeveloper editor for writing Sql script.

    I want to open connection for multiple databases in same sql script at a time.

    Actually i want to fetch records from one database table and insert it into another database table after running the same script.

    So can any body help me?

    Thank You.
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    You want to execute this query in Database A and take those records and insert them into a table in Database B through SQL Developer?
     
  3. apunhiran

    apunhiran Active Member

    Messages:
    7
    Likes Received:
    2
    Trophy Points:
    65
    Hello Ana,
    I am not sure what you want to exactly achieve:
    TO open multiple connects in one scripts is not possible.
    Alternately, you can create database link in the other database where you want to write/insert data and then using the the database link, select and insert data.
    like:
    insert into table A (select * from b@<db link>);

    I hope this help...
    Regards
    Apun