SQL> select dbms_metadata.get_ddl('VIEW','DICTIONARY') from dual; ERROR: ORA-39212: installation error: XSL stylesheets not loaded correctly ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79 ORA-06512: at "SYS.DBMS_METADATA_INT", line 7497 ORA-06512: at "SYS.DBMS_METADATA_INT", line 7532 ORA-06512: at "SYS.DBMS_METADATA_INT", line 10486 ORA-06512: at "SYS.DBMS_METADATA_INT", line 10683 ORA-06512: at "SYS.DBMS_METADATA", line 3001 ORA-06512: at "SYS.DBMS_METADATA", line 3897 ORA-06512: at "SYS.DBMS_METADATA", line 5678 ORA-06512: at line 1
查看視圖報錯如上,經過查找相關資料,提示意思是沒有正確裝載XSL樣式表。數據庫
SQL> col comp_name for a40 SQL> select COMP_NAME ,status from DBA_REGISTRY;
從新加載XSL樣式表bash
SQL> exec dbms_metadata_util.load_stylesheets; SQL>Analyze table METASTYLESHEET validate structure cascade;
執行發現仍是報錯ide
SQL> select dbms_metadata.get_ddl('VIEW','DICTIONARY') from dual; ERROR: ORA-06502: PL/SQL: numeric or value error ORA-31605: the following was returned from LpxXSLResetAllVars in routine kuxslResetParams: LPX-1: NULL pointer ORA-06512: at "SYS.UTL_XML", line 408 ORA-06512: at "SYS.DBMS_METADATA_INT", line 7704 ORA-06512: at "SYS.DBMS_METADATA_INT", line 10506 ORA-06512: at "SYS.DBMS_METADATA_INT", line 10683 ORA-06512: at "SYS.DBMS_METADATA", line 3001 ORA-06512: at "SYS.DBMS_METADATA", line 3897 ORA-06512: at "SYS.DBMS_METADATA", line 5678 ORA-06512: at line 1
看了一下反應問題均與XSL有關,而我已經按步驟修復。嘗試重啓數據庫。get
SQL> set long 5000 SQL> set pagesize 500 SQL> select dbms_metadata.get_ddl('VIEW','DICTIONARY') from dual;