create or replace trigger myt
before insert on test
for each row
declare
-- local variables here
begin
INSERT INTO
test2@MYDBLINK(aa,bb)
VALUES (:new.aa,:new.bb);
end myt;
其中MYDBLINK是这样创建的
-- Create database link
create database link MYDBLINK.US.ORACLE.COM
connect to BV1TO1 identified by BV1TO1
using 'bv_210';
而bv_210是这样创建的在tnsnames.ora里面
BV_210 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 212.74.73.222)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = bv)
)
)