Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Oracle Database Link Won't work
Hi,
I'm absolutely new to Oracle and I'm no DBA also, so my apologies if
the questions will sound stupid.
I'm trying to create a link from DATABASE1.mycompany.com to
DATABASE2.mycompany.com (i.e. I want to connect from Database1 to
Database2)
Both databases run 1.7.X version (X I think differs from one to
another)
I understand that on a SERVER that runs database1 (the one I want to connect FROM) I need to modify TNSNAMES.ORA file.
I added the following to TNSNAMES.ORA on database1:
Database2.mycompany.COM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.20.30.40)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = NAME.mycompany.COM)
)
)
Then, I created a link on database1 as follows:
create database link Database2.mycompany.COM connect to SOMETHING identified by SOMETHING using 'Database2.mycompany.COM;
Should I have done:
create database link Database2.mycompany.COM
connect to SOMETHING identified by SOMETHING
using 'NAME.mycompany.COM'
(the difference is in "using")
I also created a synonym:
create synonym my_DATA
for SOMETHING.DATA_at_Database2.mycompany.COM;
When I select form my_DATA I get the following error: TNS: could not resolve service name.
Can you help?
This is very confusing for me so please elaborate in your explanations.
Thanks in advance
NK
Received on Thu May 12 2005 - 15:46:24 CDT
![]() |
![]() |