Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Question about two oracle server exchange data automatically
If you want to work with trigger you have to have to create a database link
first.
create database link <link name> connect to <username> identified by
<password> using '<connect string>';
The things in brackets replace with your names.
Then you can access the tables in your trigger code with
<table>@<link name>. Attention: the tnsnames.ora on the server
must have the entry for the other server!
Example
create database link my_link connect to scott identified by
tiger using 'solaris';
insert into emp_at_my_link values (111, ...);
select * from emp_at_my_link;
mfg
Andreas Prusch
In article <6k32cu$dgd$1_at_nnrp1.dejanews.com>,
sj_at_china.pages.com.cn wrote:
>
> hello :
>
> I am a new oracle programer . I am now facing such a problem :
>
> Our company has two oracle server connected by using TCP/IP , one server
is
> located at a solaris host (10.10.1.3, server1) and the other a HP UX host
> (10.10.1.6, server2) . each server has a oracle application system
installed
> .
> Formally , the two system operate indivually , but now the two oracle
> database have to exchange data with each other , means : when server1 on
> 10.10.1.3 received some kind of data( inserted into a table on it ) , It
> should immediately write these data to a buffer allocted on server2 on
> 10.10.1.6 , then the server2 process these data and write back .
> on 10.10.1.3 .
>
> I know that in oracle there is a method named trigger to facilite the
> immediate action on some database update , but I don't know how to make the
> application on server 10.10.1.3 to write to a buffer(table) on 10.10.1.6 ?
> Because I know that if I want to write some data into a database table , I
> must firstly login , can I set up such connection immediately after the
two
> database startup ?
> How to make the trigger know where it should write ?
> any smaple procedure ?
>
> Thank you very much and long for your help !
>
> Jing Shen
>
> Mail to: sj_at_china.pages.com.cn
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
>
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Fri May 22 1998 - 08:47:54 CDT