ITPub博客

首页 > Linux操作系统 > Linux操作系统 > restart oracle stream

restart oracle stream

原创 Linux操作系统 作者:zhouwf0726 时间:2019-06-18 12:42:05 0 删除 编辑

由于oracle10R1的stream复制的bug---leak of memory,在升级到10R2以前临时写个job,重新启动由于memory leak停止的stream。

http://www.itpub.net/853849.html


保留足够的归档日志

15,45 * * * * . /.../admin/bin/.oraenvamzn; oraenvamzn fc1cn; /.../manage-oracle-archive-logs --oracle-sid=xxxxxx --alarm-threshold=80 --delete-threshold=60 --hours-behind=5>/.../output/manage-oracle-archive-logs-`/bin/date +%Y%m%d-%H%M%S`.log 2>&1

创建存储过程


create or replace procedure p_restart_stream is
p_count number(8,0);
begin
select count(1) into p_count from v$streams_capture;
if p_count = 0 then
dbms_capture_adm.start_capture('STRM_CAPTURE');
insert into restart_stream_log values(sysdate);
commit;
end if;
end p_restart_stream;
/

创建job


variable jobno number;
begin
dbms_job.submit(:jobno, 'p_restart_stream;', trunc(sysdate+1/24,'HH'), 'trunc(SYSDATE+1/24,''HH'')', TRUE);
commit;
end;
/
print jobno;

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/756652/viewspace-242492/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 2007年社会总结
请登录后发表评论 登录
全部评论

注册时间:2006-02-22

  • 博文量
    458
  • 访问量
    416645