Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Joining tables from two separate oracle databases possible

Re: Joining tables from two separate oracle databases possible

From: Will Kramer <willardkNOSPAM_at_email.com>
Date: Fri, 02 Mar 2001 21:38:37 -0500
Message-ID: <v2m0at4e30k82c69mro8jg8g0bt3fjvlql@4ax.com>

Ok tried what you said...and here's what I got. I'm still missing something.

 1* create database link my_link2 using 'mdixxi/mdixxi_at_scopus1.world' SQL> / Database link created.

SQL> select a.firstname, a.lastname, b.fname, b.lname   2 from big_relief b, users_at_my_link2 a   3 where upper(a.lastname) like 'AR%'   4 or upper(b.lname) like 'AR%'
  5
SQL> /
  from big_relief b, users_at_my_link2 a

                           *

ERROR at line 2:
ORA-12154: TNS:could not resolve service name

Any ideas, I really your patience and help

Will

"Ian Ledzion" <ian.ledzion_at_xlgbow.com> wrote:

>The Cnnect Sring is user defined when you set up your TNSNAMES.ORA file (if
>you take that route). In the case of a DB link, connect string used is the
>one from TNSNAMES.ORA file on your server, so you have to ensure that
>there's consistency across your system.
>
>The naming convention we use is Server_Application_Environment, so an
>example would be: DBS1_ACCT_TEST, DBS1_ACCT_PROD etc..
>
>"Will Kramer" <willardkNOSPAM_at_email.com> wrote in message
>news:3a9eb79f.620543364_at_News.CIS.DFN.DE...
>> can you give an example of a remote conect string??
>>
>> thanks,
>> Will
>>
>> On Thu, 1 Mar 2001 09:56:10 +0100, "Ian Ledzion"
>> <ian.ledzion_at_xlgbow.com> wrote:
>>
>> >Have you tried a Database link?
>> >
>> >CREATE DATABASE LINK my_link USING '<remote_connect_string>';
>> >
>> >You can refer to tables in the remote DB using:
>> >
>> >SELECT * FROM EMP_at_my_link
>> >
>> >"Will Kramer" <willardkNOSPAM_at_email.com> wrote in message
>> >news:3a9d5b92.531442353_at_News.CIS.DFN.DE...
>> >> I'm have oracle 8.1 client installed on my NT box and two databases I
>> >> have access to via tcp/ip and mention in tnsnames.ora. Is there a way
>> >> via sql to access both databases at the same time and do a simple
>> >> join...like lastname to lastname???
>> >>
>> >> If not are there ways of doing this? do I need third party software?
>> >>
>> >>
>> >> any help , or directions to the right spot would be greatly
>> >> appreciated.
>> >>
>> >> regards,
>> >> Will Kramer
>> >>
>> >
>> >
>>
>
Received on Fri Mar 02 2001 - 20:38:37 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US