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样式表
SQL> exec dbms_metadata_util.load_stylesheets; SQL>Analyze table METASTYLESHEET validate structure cascade;
执行发现还是报错
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有关,而我已经按步骤修复。尝试重启数据库。
SQL> set long 5000 SQL> set pagesize 500 SQL> select dbms_metadata.get_ddl('VIEW','DICTIONARY') from dual;