ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle streams相关启_停_删capture_apply_propagation

oracle streams相关启_停_删capture_apply_propagation

原创 Linux操作系统 作者:wisdomone1 时间:2009-10-30 17:06:14 0 删除 编辑

--check streams environment

show parameter  aq_tm_processes    --2
show parameter global_names   --true
show parameter job_queue_processes   --10
show parameter parallel_max_servers   --20
show parameter undo_retention    --3600
show parameter nls_date_format    --'YYYY-MM-DD HH24:MI:SS'
show parameter streams_pool_size   --25M
show parameter utl_file_dir    --'*'
show parameter  open_links    --4
-----------------------------------------------------------------------------------------------------------
select owner,object_name from dba_objects where object_type='DATABASE LINK';
select owner,object_name from dba_objects where object_type='DIRECTORY';
select capture_name ,queue_name, rule_set_name, negative_rule_set_name,captured_scn,applied_scn,status from dba_capture;
select apply_name ,apply_captured,error_number,error_message,status from dba_apply;
select * from dba_propagation;

select apply_name,error_number,error_message from dba_apply_error;

select name, queue_table from user_queues;
------------------------------------------------------------------
select owner,object_name from dba_objects where object_type='DATABASE LINK';
select owner,object_name from dba_objects where object_type='DIRECTORY';
select name, queue_table from user_queues;
select capture_name ,status from dba_capture;
select apply_name,status from dba_apply;
select propagation_name,status from dba_propagation;
--------------------------------------------------------------------------------------------

--clear and remove streams environment
conn strmadmin/strmadmin@bjdb
select capture_name,status from dba_capture;
select propagation_name,status from dba_propagation;
select apply_name,status from dba_apply;

exec dbms_capture_adm.stop_capture('WDB$CAP');
exec dbms_capture_adm.drop_capture('WDB$CAP');

exec dbms_propagation_adm.stop_propagation('PROPAGATION$_27');
exec dbms_propagation_adm.drop_propagation('PROPAGATION$_27');

exec dbms_apply_adm.stop_apply('APPLY$_ORA10G_18');
exec dbms_apply_adm.start_apply('APPLY$_ORA10G_18');
exec dbms_apply_adm.drop_apply('APPLY$_ORA10G_18');

exec dbms_streams_adm.remove_streams_configuration;

以下如果没有报错可以不用执行
begin
     dbms_streams_adm.recover_operation(
     script_id=>'6ECEAA16E37D6FBCE04400144F9F6BEA',
     operation_mode=>'PURGE');
end;

begin
 dbms_streams_adm.remove_streams_configuration();
 dbms_streams_adm.remove_queue(queue_name => 'WDB$CAPQ',cascade => true);
 dbms_streams_adm.remove_queue(queue_name => 'BDB$APPQ',cascade => true);
end;
/
conn strmadmin/strmadmin@whdb
begin
 dbms_streams_adm.remove_streams_configuration();
 dbms_streams_adm.remove_queue(queue_name => 'hbdbc_queue',cascade => true);
 dbms_streams_adm.remove_queue(queue_name => 'hbdbr_queue',cascade => true);
end;
/


-------------------------------------------------
--restart streams 3 process:capture,propagation,apply
begin
dbms_capture_adm.stop_capture('HBDB$CAP');
dbms_propagation_adm.stop_propagation('PROPAGATION$_86');
dbms_apply_adm.stop_apply('APPLY$_BJDB_83');

dbms_apply_adm.start_apply('APPLY$_BJDB_83');
dbms_capture_adm.start_capture('HBDB$CAP');
dbms_propagation_adm.start_propagation('PROPAGATION$_86');

end;


-----------------------------------------

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

请登录后发表评论 登录
全部评论
提供针对oracle初学者及进阶的数据库培训,欢迎大家咨询: 微信: wisdomone 微信公众号: lovedb 工作经历: 中国普天 北京科蓝 北京云和恩墨 北京神州新桥

注册时间:2008-04-04

  • 博文量
    2189
  • 访问量
    12689917