標籤: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收集】