If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > Connect to different Oracle databases in PL/SQL code

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-05-10, 11:28
nsrdata nsrdata is offline
Registered User
 
Join Date: Feb 2010
Posts: 2
Connect to different Oracle databases in PL/SQL code

Hi,

Here around 250 oracle databases in our company. Extract information from each database and load them in my target databases.

Info like database name, host name, port number…etc

So here I' have written the Oracle Procedure, looks like we can't use

CONNECT abc/password@' || DB_CUR1.DB_NAME ||';'


DB_CUR1.DB_NAME --> define the cursor and db_name has list of 250 oracle database name(SID).

I knew its possible using database link, but need to create 250 database links.

Please let me know if there is any alternative way to connect to each database store them in target database


Any help that will make job easy
Reply With Quote
  #2 (permalink)  
Old 02-05-10, 13:40
anacedent anacedent is offline
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 6,407
>Please let me know if there is any alternative way to connect to each database store them in target database
SQL*Net is the only way to connect to a remote Oracle instance.
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Reply With Quote
  #3 (permalink)  
Old 02-05-10, 14:22
nsrdata nsrdata is offline
Registered User
 
Join Date: Feb 2010
Posts: 2
As you said, SQL*Net is only way! Will you please provide more detail steps

Thank You
Reply With Quote
  #4 (permalink)  
Old 02-05-10, 14:33
Littlefoot Littlefoot is offline
Lost Boy
 
Join Date: Jan 2004
Location: Croatia, Europe
Posts: 3,629
It appears that you'll have to create 250 database links.
Reply With Quote
  #5 (permalink)  
Old 02-05-10, 14:34
anacedent anacedent is offline
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 6,407
Quote:
Originally Posted by nsrdata View Post
As you said, SQL*Net is only way! Will you please provide more detail steps
You have a chicken & the egg dilemma.
For each remote instance you need a tnsnames.ora file entry which includes hostname, service_name & port.
Only you or others at YOUR site can provide these details.
Sorry, but my crystal ball in is the shop for repair.
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Reply With Quote
  #6 (permalink)  
Old 02-05-10, 14:58
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,448
Quote:
Originally Posted by anacedent View Post
Sorry, but my crystal ball in is the shop for repair.
Was it made by Toyota, by chance?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On