eygle.com   eygle.com
eygle.com eygle
eygle.com  
 

« 《深入浅出Oracle》技术交流会视频下载 | Blog首页 | Oracle初学者入门指南-Oracle的价格 »

高级复制下如何强制删除复制组
modb.pro

在高级复制环境下,有时候由于一些故障,可能导致复制组删除时出现错误。

$ sqlplus repadmin/repadmin

SQL*Plus: Release 10.1.0.2.0 - Production on Tue Sep 19 10:34:30 2006

Copyright (c) 1982, 2004, Oracle. All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> set linesize 120
SQL> col sname for a10
SQL> col gname for a10
SQL> col schema_comment for a1
SQL> col fname for a10
SQL> col owner for a10
SQL> select * from dba_repgroup;

SNAME M STATUS S GNAME FNAME R OWNER
---------- - --------- - ---------- ---------- - ----------
REP_TEST Y NORMAL REP_TEST N PUBLIC

SQL> exec dbms_repcat.drop_master_repgroup(gname=>'rep_test',all_sites => true);
BEGIN dbms_repcat.drop_master_repgroup(gname=>'rep_test',all_sites => true); END;

*
ERROR at line 1:
ORA-23353: deferred RPC queue has entries for object group "PUBLIC"."REP_TEST"
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.DBMS_REPCAT_MAS", line 1190
ORA-06512: at "SYS.DBMS_REPCAT_MAS", line 2666
ORA-06512: at "SYS.DBMS_REPCAT", line 635
ORA-06512: at line 1

这表明此时,在deftran中还有记录,而可能在deftrandest中已经没有需要push的事务

SQL> select count(*) from deftran;

COUNT(*)
----------
3

SQL> select count(*) from deftrandest;

COUNT(*)
----------
0

正常情况下可以通过dbms_defer_sys.purge过程去清除队列。
在异常情况下,我们可以选择直接截断(truncate),强制删除复制组:

SQL> truncate table system.def$_aqcall;

Table truncated.

SQL> exec dbms_repcat.drop_master_repgroup(gname=>'rep_test',all_sites => true);

PL/SQL procedure successfully completed.


此时可以进行其他操作,如恢复复制组等。

-The End-


历史上的今天...
    >> 2019-09-19文章:
    >> 2014-09-19文章:
    >> 2013-09-19文章:
    >> 2012-09-19文章:
    >> 2010-09-19文章:
    >> 2009-09-19文章:
    >> 2007-09-19文章:
    >> 2005-09-19文章:
    >> 2004-09-19文章:
           Undo Internal的研究

By eygle on 2006-09-19 11:09 | Comments (0) | Advanced | 906 |


CopyRight © 2004~2020 云和恩墨,成就未来!, All rights reserved.
数据恢复·紧急救援·性能优化 云和恩墨 24x7 热线电话:400-600-8755 业务咨询:010-59007017-7040 or 7037 业务合作: marketing@enmotech.com