Question:
> Hi:
>
> I have three Oracle (LINUX, NT, LOCAL) 8.0.5 databases on three
machines.
> I create two database links (LINUX, NT) to the two other databases
in the
> thrid database (LOCAL) .
> I can query tables in NT through LOCAL via db link
NT,
> However when I query tables in LINUX through LOCAL via db link LINUX.
> It gives me error:
>
> ORA-02085: database link LINUX.WORLD connects to BALAK.WORLD
>
> I check TNSNAMES.ORA, and LISTENER.ORA on LOCAL, LINUX and
NT.
> There is no service call BALAK.
>
> All the dababase names in those machine are ORCL.
>
> Can someone tell me why?
>
Answer:
You have global names on. global names make you name the database
link
after the databases GLOBAL_NAME (what is returned by "select * from
global_name"). When using global naming, you end up with an assurance
that all databases are uniquely named (as you cannot create 2 database
links with the same name). It remove ambiguity.
You can either:
- turn it off (alter session, alter system, and init.ora parameters
control this)
- issue "alter database rename global_name to linux" on the database
that is now globally named balak. make its global name agree
with your
database link name