建立一个触发器,在该表增加一条记录后调用另外的程序比如COPY命令!如何实现????
---------------------------------------------------------------
我没做过,只是一个思路。但我试验过oracle的TCP包,能用,连接过程需要一些时间。
set serveroutput on size 100000
DECLARE
c utl_tcp.connection; -- TCP/IP connection to the Web server
i number;
j number;
BEGIN
c := utl_tcp.open_connection('10.18.1.11', 51000); -- open connection
begin
loop
i := utl_tcp.available(c);
exit when i<=0;
dbms_output.put_line('READ='||To_Char(i));
-- while i>0 loop
dbms_output.put(utl_tcp.get_text(c,i)); -- read result
-- i :=i-1;
-- end loop;
end loop;
exception
when others then null;
end;
dbms_output.put_line('');
i := utl_tcp.write_line(c, 'HELLO WORLD');
dbms_output.put_line('WRITE='||To_Char(i));
begin
j := 0;
loop
i := utl_tcp.available(c);
if (i=0) then
j := j+1;
if (j>=50) then
exit;
else
for i in 0..1000 loop
null;
end loop;
end if;
else
dbms_output.put_line('READ='||To_Char(i));
dbms_output.put(utl_tcp.get_text(c,i)); -- read result
end if;
end loop;
exception
when others then null;
end;
dbms_output.put_line('');
utl_tcp.close_connection(c);
end;
/
阅读(2227) | 评论(0) | 转发(0) |