ORACLE搭建Stream過程中報錯【error收集】

來源:互聯網
上載者:User

標籤:des   style   blog   io   color   ar   for   sp   檔案   

錯誤一:在配置完源庫和目標資料庫後,建立複製管理員。串連上複製管理員後,在源庫執行MAINTAIN_TABLE過程:

declare  v_tables DBMS_UTILITY.UNCL_ARRAY;begin  v_tables(1) := ‘hr.test01‘;  v_tables(2) := ‘hr.test02‘;  v_tables(3) := ‘hr.test03‘;  dbms_streams_adm.maintain_tables(table_names                  => v_tables,                                   source_directory_object      => null,                                   destination_directory_object => null,                                   source_database              => ‘orcl.net‘,                                   destination_database         => ‘weber.net‘,                                   perform_actions              => true,                                   bi_directional               => true,                                   include_ddl                  => true,                                   instantiation                => dbms_streams_adm.instantiation_table_network);end;/

就發現是這個錯誤:

就發現是這個錯誤:

ERROR at line 1:ORA-23616: Failure in executing block 22 for script06F6BBB2E70137C5E05054B4F621416CORA-06512: at "SYS.DBMS_RECOVERABLE_SCRIPT", line 593ORA-06512: at "SYS.DBMS_RECOVERABLE_SCRIPT", line 616ORA-06512: at "SYS.DBMS_STREAMS_MT", line 7747ORA-06512: at "SYS.DBMS_STREAMS_ADM", line 2458ORA-06512: at line 7

解決方案:

解決方案:

通過捕獲源庫的執行指令碼,根據錯誤id找到是第幾步執行出錯

select invoking_package_owner as owner,       invoking_package as package,       invoking_procedure as procedure,       status,       total_blocks,       done_block_num  from dba_recoverable_script  8   where script_id = ‘06F6BBB2E70137C5E05054B4F621416C‘  9  ;OWNER                   PACKAGE------------------------------ ------------------------------PROCEDURE               STATUS        TOTAL_BLOCKS DONE_BLOCK_NUM------------------------------ ------------ ------------ --------------SYS                   DBMS_STREAMS_ADMMAINTAIN_TABLES            ERROR              48         21

再查一下究竟是什麼原因:

select error_number, error_message  from dba_recoverable_script_errors  3   where script_id = ‘06F6BBB2E70137C5E05054B4F621416C‘ and block_num=22;ERROR_NUMBER------------ERROR_MESSAGE--------------------------------------------------------------------------------      -25153ORA-25153: Temporary Tablespace is Empty

原來是暫存資料表空間報錯報空。那麼就查一下源庫的臨時檔案情況,結果顯示存在。那就納悶了。

SQL> select tablespace_name,file_name from dba_temp_files  2  ;TABLESPACE_NAME------------------------------FILE_NAME--------------------------------------------------------------------------------TEMP/u01/app/oracle/oradata/orcl/temp01.dbf

再查一下目標資料庫的臨時檔案:

SQL> select name from v$tempfile;no rows selected

擦,居然沒有,這個時候就基本可以發現了是這個問題。把目標資料庫的臨時檔案加上去就好了。

alter tablespace temp add tempfile ‘/u01/app/oracle/oradata/weber/temp01.dbf‘;Tablespace altered.

再次執行在源庫執行MAINTAIN_TABLE過程。OK,發現沒有報錯!

ORACLE搭建Stream過程中報錯【error收集】

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.