Home » RDBMS Server » Networking and Gateways » how to use database link on the remote database?
how to use database link on the remote database? [message #237191] Sun, 13 May 2007 04:02 Go to next message
sertac
Messages: 3
Registered: May 2007
Junior Member
because 10g does not connect to 7.3.4 directly, I used a middle db 8i.
I created a database link from 8i to 7.3.4 and named it dblinkto_seven, and created another database link from 10g to 8i and named it dblinkto_eight.
the problem is I do not know how to use the databaselink on the remote database.
I have to use it on 10g.

for example this works on 10g:
select * from tab@dblinkto_eight

this also works on 8i:
select * from tab@dblinkto_seven

but this does not work on 10g:
select * from tab@dblinkto_seven@dblinkto_eight

any help appreciated. thanks.
Re: how to use database link on the remote database? [message #237195 is a reply to message #237191] Sun, 13 May 2007 04:26 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I didn't try it but I think this may work.

In your 8i database create a synonym "syn" for "tab@dblinkto_seven" and use "syn@dblinkto_eight" on your 10g database.

Regards
Michel
Re: how to use database link on the remote database? [message #237198 is a reply to message #237191] Sun, 13 May 2007 04:42 Go to previous messageGo to next message
sertac
Messages: 3
Registered: May 2007
Junior Member
thanks. I tried it already. It works for a table, but it does not work for a function or procedure...

on 8i this works:
select owner_info@dblinkto_seven(103000000000792) from dual
drop synonym ownerinfoseven
create synonym ownerinfoseven for owner_info@dblinkto_seven

but still on 8i this does not work:
select ownerinfoseven(103000000000792) from dual

it says,
ORA-00904: invalid column name

it is sth about creating a synonym for a function i think...
Re: how to use database link on the remote database? [message #237206 is a reply to message #237191] Sun, 13 May 2007 05:11 Go to previous message
sertac
Messages: 3
Registered: May 2007
Junior Member
I managed to get synonym work too. It worked when I specified the full schema name...

But again 10g gives error on that case saying connection to this server are no longer supported Razz

But I wrote a new function on 8i, in which calling the function on 7.3.4.
And I called the new function of 8i from 10g. And it worked Smile

thanks...
Previous Topic: Client install..Listener or TNSnames??
Next Topic: listener and password
Goto Forum:
  


Current Time: Fri Mar 29 04:22:07 CDT 2024