Home » RDBMS Server » Networking and Gateways » connecting two ORACLE Servers
connecting two ORACLE Servers [message #186653] Tue, 08 August 2006 22:04 Go to next message
teenu80
Messages: 4
Registered: August 2006
Location: CALI
Junior Member

Hi, I know how to create a database link between two oracle servers, but problem is that SID is same for both servers, Is there any other way to connect two servers without using only 'SID' ..here are TNSNAMES.ORA FILE i HAVE

D.w=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL = TCP)
(HOST=ff.ffc.pic.com)
(PORT = 1521)
)
(CONNECT_DATA=
(SID = abc)
)
)

A.w=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=aa.bb.cs.com)
(PORT = 1521)
)
(CONNECT_DATA=
(SID = abc)
)


Is there any other way rather that this

Create database link a connect to username identified by password
using 'SID';

If anyone know the alternative like using SID.A.w or how I can differentiate these two SID s. Please reply soon

Thanks
Re: connecting two ORACLE Servers [message #186658 is a reply to message #186653] Tue, 08 August 2006 22:37 Go to previous messageGo to next message
BlackSwan
Messages: 23070
Registered: January 2009
Senior Member
> but problem is that SID is same for both servers,
Why is that a problem?
I have the same SID in both Production & QA, but use different aliases.
Re: connecting two ORACLE Servers [message #186722 is a reply to message #186653] Wed, 09 August 2006 04:18 Go to previous messageGo to next message
ramakris
Messages: 21
Registered: July 2006
Location: Delhi
Junior Member
Hi-

I am not sure why you specifying SID in you create db link command.

It should be like

Create database link <db link>
connect to <username> identified by <pwd>
using 'A.W';

You just have to specify the service name not the SID.

Thanks!
Rama.
Re: connecting two ORACLE Servers [message #186796 is a reply to message #186722] Wed, 09 August 2006 11:00 Go to previous messageGo to next message
teenu80
Messages: 4
Registered: August 2006
Location: CALI
Junior Member

No still not working
error says
ERROR at line 1:
ORA-12154: TNS:could not resolve service name
Re: connecting two ORACLE Servers [message #186816 is a reply to message #186653] Wed, 09 August 2006 12:49 Go to previous messageGo to next message
BlackSwan
Messages: 23070
Registered: January 2009
Senior Member
Teenu80,
my car is not working.
The Check Engine light is on.
Tell me how to fix my car.

The above is essentially what you've told us (TINU).
>Create database link a connect to username identified by password using 'SID';
Above is NOT correct.
The string between the single quote marks is the TNSNAMES alais.
You could benefit from reading the fine manuals found at
http://tahiti.oracle.com
Re: connecting two ORACLE Servers [message #186825 is a reply to message #186816] Wed, 09 August 2006 14:14 Go to previous messageGo to next message
teenu80
Messages: 4
Registered: August 2006
Location: CALI
Junior Member

Its working now
If two databases on different servers have the same SID then this code doesn't work :

create database link <link name> connect to <userid> identified by <password> using 'SID'

otherwise it will work for sure.

To solve this problem I just copied the whole code = alais

create database link <link name> connect to <username> identified by <password> using '(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = f.f.p.com)
(PORT = 1521)
)
(CONNECT_DATA =
(SID = abc)
)
)'

This is how I solved my problem
but if you write only alais name like " using 'A.W' "
will not work.


Thanks for all to help
icon6.gif  Re: connecting two ORACLE Servers [message #186836 is a reply to message #186825] Wed, 09 August 2006 15:24 Go to previous messageGo to next message
teenu80
Messages: 4
Registered: August 2006
Location: CALI
Junior Member

thanks to all for help
Re: connecting two ORACLE Servers [message #560683 is a reply to message #186836] Mon, 16 July 2012 07:14 Go to previous messageGo to next message
sivac47
Messages: 25
Registered: July 2012
Location: CHENNAI
Junior Member
Please provide your listener.ora file and tnsnames.ora file content in this forum.....

i need help...
Re: connecting two ORACLE Servers [message #560696 is a reply to message #560683] Mon, 16 July 2012 08:26 Go to previous messageGo to next message
BlackSwan
Messages: 23070
Registered: January 2009
Senior Member
sivac47 wrote on Mon, 16 July 2012 05:14
Please provide your listener.ora file and tnsnames.ora file content in this forum.....

i need help...


why do you resurrect six year old thread?
Re: connecting two ORACLE Servers [message #560711 is a reply to message #560696] Mon, 16 July 2012 08:56 Go to previous messageGo to next message
sivac47
Messages: 25
Registered: July 2012
Location: CHENNAI
Junior Member
Now i try the same concept..Oracle to oracle data transfer using database link in different server..
Re: connecting two ORACLE Servers [message #560720 is a reply to message #560711] Mon, 16 July 2012 09:09 Go to previous messageGo to next message
BlackSwan
Messages: 23070
Registered: January 2009
Senior Member
>Oracle to oracle data transfer using database link
DB_LINK is always required between different instances regardless of different or same server.
Re: connecting two ORACLE Servers [message #560722 is a reply to message #560720] Mon, 16 July 2012 09:12 Go to previous messageGo to next message
sivac47
Messages: 25
Registered: July 2012
Location: CHENNAI
Junior Member
server 1 - 10.50.20.36
server 2 - 10.50.31.91

i want to connect server 1 to server 2...

which tnsnames.ora and listener.ora file i want to modify...server 1 and server 2..
Re: connecting two ORACLE Servers [message #560740 is a reply to message #560722] Mon, 16 July 2012 10:27 Go to previous message
Michel Cadot
Messages: 59821
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Stay in your other topic for this question:
http://www.orafaq.com/forum/m/360742/102589/?msg_360742#msg_360742

This one is now locked.
Regards
Michel
Previous Topic: ORACLE Disconnect every 5 mins
Next Topic: Problem in Hostnaming method
Goto Forum:
  


Current Time: Fri Nov 28 21:47:51 CST 2014

Total time taken to generate the page: 0.12631 seconds