Home » RDBMS Server » Server Administration » Connecting to another Oracle Server (Oracle 9i)
Connecting to another Oracle Server [message #318195] Tue, 06 May 2008 01:32 Go to next message
monasingh
Messages: 229
Registered: May 2006
Location: Mumbai
Senior Member

Hi,
I have to create a procedure where I have do some inserts from a table present on database on another oracle server, where the database servername might change at times.
I do not have to use dblink as that would be static and in my case the service name might change at some intervals.

I am thinking of passing the ip address of that server.
Please suggest a way as how and what to pass in the procedure to do the same and if I pass the IP address then how to fetch the table from ip address.

Any suggestion would be highly appreciated.

Thanks in advance,
Mona Singh
Re: Connecting to another Oracle Server [message #318206 is a reply to message #318195] Tue, 06 May 2008 02:03 Go to previous messageGo to next message
Michel Cadot
Messages: 68675
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Whatever change behind the scene, entry name in tnsnames.ora should not. It is the logical level.
In the opposite IP may change, this is why DNS is made for, to hide IP change with a name.
In the same way, tnsnames.ora is made to hide any change on database location or access path, server, port, connect data and so on.
Your database link should be created on tnsnames.ora entry name and so can always access the database.
If tnsnames.ora entry names change then there is a flaw in the name you named them.

Regards
Michel

[Updated on: Tue, 06 May 2008 02:04]

Report message to a moderator

Re: Connecting to another Oracle Server [message #318214 is a reply to message #318206] Tue, 06 May 2008 02:15 Go to previous messageGo to next message
monasingh
Messages: 229
Registered: May 2006
Location: Mumbai
Senior Member

I have to pass the service name as a parameter in the procedure where I have to access a table of the remote database name.

I am new to it, Kindly guide me as how to do this as I do not have to use dblink as I said service name might change.

Thanks for your answer,
Mona
Re: Connecting to another Oracle Server [message #318239 is a reply to message #318214] Tue, 06 May 2008 03:25 Go to previous message
Michel Cadot
Messages: 68675
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Anyway you can't access remote database inside a procedure without a db link.

Regards
Michel
Previous Topic: USER_CONSTRAINTS Vs USER_INDEXS
Next Topic: About Temporary Tablespace Contents.
Goto Forum:
  


Current Time: Fri Sep 06 16:19:33 CDT 2024