Join between 2 tables on different servers

DBA Geral (instalação, configuração do banco, scripts do Sql*Plus, shell scripts, batch scripts, etc...)
Post Reply
Carlos Sérgio
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 13
Joined: Tue, 27 Dec 2005 10:16 am
Location: SÃO PAULO

Good Morning!!

I would like to know how I can hold a join between 2 tables, on different B. servers.

grateful by the precious information and attention,

Carlos
carlosergio631@yahoo.com.br
User avatar
dr_gori
Moderador
Moderador
Posts: 5026
Joined: Mon, 03 May 2004 3:08 pm
Location: Portland, OR USA
Contact:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

It's simple!
You create a dblink between the two banks more or less like this:

Select all

create public database link BANCO1 
  connect to USUARIO 
  using 'SENHA'; 
Dai You do the SELECT that way:

Select all

select a.table_name 
from user_tables@banco1 a 
,    user_tables        b 
where a.table_name = b.table_name 
Remembering that to create public dblinks you have to be allowed and this is not very safe ...

Another important thing is that the TNS_NAMES.ORA of your server should contain the Information from the other server you want to access.

: -O
Carlos Sérgio
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 13
Joined: Tue, 27 Dec 2005 10:16 am
Location: SÃO PAULO

Thank you so much ! I learned one more !!

Valeu !!
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests