Re: Oracle database links

From: Peter Rak <po080016_at_pop.ke.sanet.sk>
Date: 1996/06/19
Message-ID: <31C824C9.5CD9_at_pop.ke.sanet.sk>#1/1


Mark Heiple wrote:
>
> I can't get the database links to work. Just how do you create a database
> link? If I have two machines on the network named PRIMARY and BACKUP, I
> create a database on each with a SID of MYDB and a database name (DB_NAME)
> of MYDATABASE, and I use SQL*NET to create database aliases of
> MYDB_ON_PRIMARY and MYDB_ON_BACKUP on each machine so that I can access
> both databases from both machines, what should my CREATE DATABASE LINK
> command look like so I can access tables in MYDB_ON_BACKUP from
> MYDB_ON_PRIMARY?
>
> I've tried CREAT PUBLIC DATABASE LINK LINK_TO_BACKUP USING
> 'MYDB_ON_BACKUP' from the PRIMARY machine while logged into the database
> MYDB_ON_PRIMARY.
>
> But when I try to select anything from the table using SELECT * FROM
> TABLE_at_LINK_TO_BACKUP it fails. Both machines are in the same domain and I
> can CONNECT INTERNAL/PASSWORD_at_MYDB_ON_PRIMARY and CONNECT
> INTERNAL/PASSWORD_at_MYDB_ON_BACKUP from both machines, so I know both
> databases are OK.

Try:
  alter system set global_names=false;

on both databases and test connectivity

If it will be OK, then do alter system set global_names=true and create database links as
create database link my_db_name.my_domain_name connect to ....
using 'alias'

If you have set global_names to true then your db_link must have name db_name.domain_name, example:
db_name='db1'
domain_name='xxx.yyy.zzz'
your db_link must have name db1.xxx.yyy.zzz

                        Peter. Received on Wed Jun 19 1996 - 00:00:00 CEST

Original text of this message