在a数据库上创建一个指向b库的dblinkcreate or replace trigger tgname after insert or update or delete on A for each row begin if inserting then insert into b@dblinkname values(:new.col1,:new.col2..); .... end;
首先建立DBLink 然后建立触发器,来实现对DBLink表的操作 可以参考1楼
create database link linkfwq connect to fzept identified by neu using '(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.142.202.12)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = fjept) ) )
after insert or update or delete on A
for each row
begin
if inserting then
insert into b@dblinkname values(:new.col1,:new.col2..);
....
end;
然后建立触发器,来实现对DBLink表的操作
可以参考1楼
connect to fzept identified by neu
using '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.142.202.12)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = fjept)
)
)