Home » SQL & PL/SQL » SQL & PL/SQL » DatabaseLinks
DatabaseLinks [message #2040] Tue, 18 June 2002 14:34 Go to next message
alj
Messages: 1
Registered: June 2002
Junior Member
I'm trying to execute queries against a remote database using a Database Link.

I create a public database link using a fixed user - this seems to execute fine

When I try to query a table using the link, I get an error:
ORA-02019 - connection description for remote database not found.

My database link has a name of:
MANKATO.INTERNAL.MYCO.COM

The link was created with USING 'MANKATO.MYCO.COM'
and USING 'MANKATO'
(tried it both ways)

I have two tnsnames.ora entries for this instance
MANKATO.MYCO.COM and MANKATO

The initialization parameter - global_names = FALSE for this database
Re: DatabaseLinks [message #2050 is a reply to message #2040] Wed, 19 June 2002 00:56 Go to previous message
K.SREENIVASAN
Messages: 110
Registered: January 2001
Location: banglore
Senior Member
SIR,

i read your message.no problem .it is quite
easy.

i am giving one example for you.

for example take the first database
(
sid=orcl
database name=oracle
db_domain=uk.com
host string=ss1
)

first edit the parameter file for the following

db_domain=uk.com

then start the database

In the svrmgr30.exe or sqldba execute this command

alter database rename global_name orcl.uk.com;

(name should be sid.db_domain)
then you execute this command

select * from global_name;

then you got the global database name for that
database like

orcl.uk.com

then go to the second database

(sid=tan
databasename=tani
db_domain=usa.com
host string=ss2
)

edit the parameter file for that database
db_domain=usa.com

start the database

execute this command in the svrmgr30 or sqldba

alter database rename global_name tan.usa.com;

(if in this server also the sid is orcl
don't worry.but only thing is
you should have different
db_domain parameter in each database)

execute this query

select * from global_name;

tan.usa.com

go to the first database

then create the database link by following

(execute this command in the first database)

create database link tan.usa.com
conect to system identified by manager
using 'ss2';

note :

the database link name should be the global database
name for the another database

if you have any problem ,please mail to me.

regards
k.sreenivasan
Previous Topic: Inbedding a SELECT inside of a DECODE
Next Topic: Inserting data dynamically
Goto Forum:
  


Current Time: Fri Apr 26 11:25:16 CDT 2024