Home » RDBMS Server » Server Administration » DB LINK Error ORA-02085
DB LINK Error ORA-02085 [message #50547] Thu, 21 March 2002 00:39 Go to next message
Hitesh Shenoy
Messages: 11
Registered: January 2002
Junior Member
OS : Windows2000
DB : Oracle 8i

I have created a DB Link to connect from my database to another database (located on a different server). When i try to access the other database using the dblink I get ora error 'ORA-02085'.

Please advise.
Re: DB LINK Error ORA-02085 [message #50556 is a reply to message #50547] Thu, 21 March 2002 03:48 Go to previous messageGo to next message
Sanjay Bajracharya
Messages: 279
Registered: October 2001
Location: Florida
Senior Member
Error message details:

02085, 00000, "database link %s connects to %s"
// *Cause: a database link connected to a database with a different name.
// The connection is rejected.
// *Action: create a database link with the same name as the database it
// connects to, or set global_names=false.
//
Re: DB LINK Error ORA-02085 [message #51050 is a reply to message #50547] Tue, 23 April 2002 02:05 Go to previous message
Abdullah Gilani
Messages: 18
Registered: October 2001
Junior Member
#create a database link with the same name as the database it connects to, OR set global_names=false.
######################################## at Remote Server #################
SQL> alter database rename global_name TO test.com;

Database altered.

SQL> select * from global_name;

GLOBAL_NAME
-----------------------------------------------------
TEST.COM

######################################## at Local Server #################
SQL> Create Public Database Link TEST.COM connect to SYSTEM identified by MANAGER using 'ORCL';

Database link created.

### Note: where 'ORCL' is the Tnsnames String for Remote DB Server and must be exists in the Local DB tnsnames.ora file.
'TEST.COM' is the Remote Database Global Name.

SQL> select count(*) from scott.emp@test.com;

COUNT(*)
----------
8

#########################################################################

###--------- Procedure for LoopBack DB Link -------------###
declare
dbName varchar2(30);
begin
select name
into dbName
from v$database;

begin
execute immediate 'drop public database link loopback';
exception
when others then
null;
end;
execute immediate 'create public database link loopback connect to admin identified by admin using '''||dbName||'''';
end;
###--------- End Procedure for LoopBack DB Link ------------###

Written by,
Abdullah Gilani
Email: syedgilani@hotmail.com
Previous Topic: Re: ocp *.* - dumps,braindumps,kits,cbt,tbt,sts......
Next Topic: Re: Regarding Database Link
Goto Forum:
  


Current Time: Wed Dec 25 08:48:37 CST 2024