• <ul id="mayc0"></ul>
    <ul id="mayc0"><center id="mayc0"></center></ul>
    <strike id="mayc0"><input id="mayc0"></input></strike>
    <ul id="mayc0"></ul>
  • 始創于2000年 股票代碼:831685
    咨詢熱線:0371-60135900 注冊有禮 登錄
    • 掛牌上市企業
    • 60秒人工響應
    • 99.99%連通率
    • 7*24h人工
    • 故障100倍補償
    您的位置: 網站首頁 > 幫助中心>文章內容

    邏輯備庫之ORA-01403解決方法

    發布時間:  2012/7/30 16:53:07

    Oracle 的Data Guard環境中, 邏輯備庫應用進程停止,日志顯示錯誤為ORA-01403 not data found 。

    它具體信息如下:

    Mon May 21 10:39:31 2012

    LOGSTDBY status: ORA-01403: no data found

    LOGSTDBY Apply process P004 pid=143 OS id=13936 stopped

    -

     

    Mon May 21 10:39:32 2012

    Errors in file /u01/app/Oracle/admin/db/bdump/rdb_lsp0_13922.trc:

    ORA-12801: error signaled in parallel query server P004

    ORA-01403: no data found

    LOGSTDBY Analyzer process P003 pid=38 OS id=13932 stopped

    這種錯誤在logical standby 環境中很常見。

    通過dba_logstdby_events 視圖查詢失敗的事務信息。

    查詢SQL 如下所示:

    select event_time,

           xidusn,

           xidslt,

           xidsqn,

           status,

           status_code,

           event,

           'exec dbms_logstdby.skip_transaction(' || xidusn || ',' || xidslt || ',' ||

           xidsqn || ');' as exec_sql,

           a.*

      from dba_logstdby_events a

     where event_time = (select max(event_time) from dba_logstdby_events);

     

    從event 列中我們查詢出失敗的具體信息,是更新一張表失敗。

    解決方法

    這類問題的解決方法有兩種:

    第一種,可以使用skip_transaction 方法忽略掉該事務。

     exec dbms_logstdby.skip_transaction(487,12,951001);

    但這個方法有后遺癥,接下來的同步過程中會有不斷的麻煩,數據沒找到的問題會層出不窮。

    第二種,使用skip 方法忽略掉該表的所有的操作。

    alter database stop logical standby apply;

    execute dbms_logstdby.skip('DML','username','T_ZHUSHOU_ORDER');

    execute dbms_logstdby.skip('SCHEMA_DDL','username','T_ZHUSHOU_ORDER');

    alter database start logical standby apply immediate;

    忽略掉出問題的表的DML 操作和SCHEMA_DDL 操作。

    數據復制停止的問題是解決了,但這里造成了一張表事實上不能同步了。

    新問題:如何將已skip 的表再加入logical standby 中?

    解決這個新問題主要是靠DBMS_LOGSTDBY.INSTANTIATE_TABLE 方法。

    官方對它的使用說明:

    This procedure creates and populates a table in the standby database from a corresponding table in the primary database. The table requires the name of the database link (dblink) as an input parameter. If the table already exists in the logical standby database, it will be dropped and re-created based on the table definition at the primary database. This procedure only brings over the data associated with the table, and not the associated indexes and constraints.

    操作步驟如下:

    1 、在邏輯備庫創建指向主庫的數據庫鏈路

    2 、在邏輯備庫上unskip 掉該表。

    unskip 之前需停止邏輯備庫應用日志

    alter database stop logical standby apply;

    execute dbms_logstdby.unskip('DML','username','T_ZHUSHOU_ORDER');

    execute dbms_logstdby.unskip('SCHEMA_DDL','username','T_ZHUSHOU_ORDER');

    3 、使用INSTANTIATE_TABLE 重新實例化一張表。

    EXECUTE DBMS_LOGSTDBY.INSTANTIATE_TABLE('username', 'T_ZHUSHOU_ORDER', 'DB_RAC');

    注意,源庫上的用戶必須有  SELECT_CATALOG_ROLE 權限,否則會報錯ORA-16276

    SQL> EXECUTE DBMS_LOGSTDBY.INSTANTIATE_TABLE('username', 'T_ZHUSHOU_ORDER', 'DB_RAC');

     

    begin DBMS_LOGSTDBY.INSTANTIATE_TABLE('username', 'T_ZHUSHOU_ORDER', 'DB_RAC'); end;

     

    ORA-16276: specified database link does not correspond to primary database

    ORA-06512: at "SYS.DBMS_INTERNAL_LOGSTDBY", line 5361

    ORA-02019: connection description for remote database not found

    ORA-06512: at "SYS.DBMS_LOGSTDBY", line 636

    ORA-06512: at line 2


    本文出自:億恩科技【www.vbseamall.com】

    Oracle 的Data Guard環境中, 邏輯備庫應用進程停止,日志顯示錯誤為ORA-01403 not data found 。

    它具體信息如下:

    Mon May 21 10:39:31 2012

    LOGSTDBY status: ORA-01403: no data found

    LOGSTDBY Apply process P004 pid=143 OS id=13936 stopped

    -

     

    Mon May 21 10:39:32 2012

    Errors in file /u01/app/Oracle/admin/db/bdump/rdb_lsp0_13922.trc:

    ORA-12801: error signaled in parallel query server P004

    ORA-01403: no data found

    LOGSTDBY Analyzer process P003 pid=38 OS id=13932 stopped

    這種錯誤在logical standby 環境中很常見。

    通過dba_logstdby_events 視圖查詢失敗的事務信息。

    查詢SQL 如下所示:

    select event_time,

           xidusn,

           xidslt,

           xidsqn,

           status,

           status_code,

           event,

           'exec dbms_logstdby.skip_transaction(' || xidusn || ',' || xidslt || ',' ||

           xidsqn || ');' as exec_sql,

           a.*

      from dba_logstdby_events a

     where event_time = (select max(event_time) from dba_logstdby_events);

     

    從event 列中我們查詢出失敗的具體信息,是更新一張表失敗。

    解決方法

    這類問題的解決方法有兩種:

    第一種,可以使用skip_transaction 方法忽略掉該事務。

     exec dbms_logstdby.skip_transaction(487,12,951001);

    但這個方法有后遺癥,接下來的同步過程中會有不斷的麻煩,數據沒找到的問題會層出不窮。

    第二種,使用skip 方法忽略掉該表的所有的操作。

    alter database stop logical standby apply;

    execute dbms_logstdby.skip('DML','username','T_ZHUSHOU_ORDER');

    execute dbms_logstdby.skip('SCHEMA_DDL','username','T_ZHUSHOU_ORDER');

    alter database start logical standby apply immediate;

    忽略掉出問題的表的DML 操作和SCHEMA_DDL 操作。

    數據復制停止的問題是解決了,但這里造成了一張表事實上不能同步了。

    新問題:如何將已skip 的表再加入logical standby 中?

    解決這個新問題主要是靠DBMS_LOGSTDBY.INSTANTIATE_TABLE 方法。

    官方對它的使用說明:

    This procedure creates and populates a table in the standby database from a corresponding table in the primary database. The table requires the name of the database link (dblink) as an input parameter. If the table already exists in the logical standby database, it will be dropped and re-created based on the table definition at the primary database. This procedure only brings over the data associated with the table, and not the associated indexes and constraints.

    操作步驟如下:

    1 、在邏輯備庫創建指向主庫的數據庫鏈路

    2 、在邏輯備庫上unskip 掉該表。

    unskip 之前需停止邏輯備庫應用日志

    alter database stop logical standby apply;

    execute dbms_logstdby.unskip('DML','username','T_ZHUSHOU_ORDER');

    execute dbms_logstdby.unskip('SCHEMA_DDL','username','T_ZHUSHOU_ORDER');

    3 、使用INSTANTIATE_TABLE 重新實例化一張表。

    EXECUTE DBMS_LOGSTDBY.INSTANTIATE_TABLE('username', 'T_ZHUSHOU_ORDER', 'DB_RAC');

    注意,源庫上的用戶必須有  SELECT_CATALOG_ROLE 權限,否則會報錯ORA-16276

    SQL> EXECUTE DBMS_LOGSTDBY.INSTANTIATE_TABLE('username', 'T_ZHUSHOU_ORDER', 'DB_RAC');

     

    begin DBMS_LOGSTDBY.INSTANTIATE_TABLE('username', 'T_ZHUSHOU_ORDER', 'DB_RAC'); end;

     

    ORA-16276: specified database link does not correspond to primary database

    ORA-06512: at "SYS.DBMS_INTERNAL_LOGSTDBY", line 5361

    ORA-02019: connection description for remote database not found

    ORA-06512: at "SYS.DBMS_LOGSTDBY", line 636

    ORA-06512: at line 2


    本文出自:億恩科技【www.enidc.com】
    -->

    服務器租用/服務器托管中國五強!虛擬主機域名注冊頂級提供商!15年品質保障!--億恩科技[ENKJ.COM]

  • 您可能在找
  • 億恩北京公司:
  • 經營性ICP/ISP證:京B2-20150015
  • 億恩鄭州公司:
  • 經營性ICP/ISP/IDC證:豫B1.B2-20060070
  • 億恩南昌公司:
  • 經營性ICP/ISP證:贛B2-20080012
  • 服務器/云主機 24小時售后服務電話:0371-60135900
  • 虛擬主機/智能建站 24小時售后服務電話:0371-60135900
  • 專注服務器托管17年
    掃掃關注-微信公眾號
    0371-60135900
    Copyright© 1999-2019 ENKJ All Rights Reserved 億恩科技 版權所有  地址:鄭州市高新區翠竹街1號總部企業基地億恩大廈  法律顧問:河南亞太人律師事務所郝建鋒、杜慧月律師   京公網安備41019702002023號
      0
     
     
     
     

    0371-60135900
    7*24小時客服服務熱線