码迷,mamicode.com
首页 > 数据库 > 详细

执行DBMS_METADATA.get_ddl报ORA-39212的解决方法

时间:2017-05-09 16:57:40      阅读:252      评论:0      收藏:0      [点我收藏+]

标签:man   xpl   taf   10g   use   ora   div   correct   语句   

环境:
    数据库:oracle 10.2.0.4 --64位
    操作系统:红旗dc 5.0  --64位

以sys登陆,执行DBMS_METADATA.get_ddl得到某个表空间的元数据报错
select DBMS_METADATA.get_ddl(‘TABLESPACE‘,‘PDA‘) 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 7428
ORA-06512: at "SYS.DBMS_METADATA_INT", line 7477
ORA-06512: at "SYS.DBMS_METADATA_INT", line 9495
ORA-06512: at "SYS.DBMS_METADATA", line 1920
ORA-06512: at "SYS.DBMS_METADATA", line 2793
ORA-06512: at "SYS.DBMS_METADATA", line 4333
ORA-06512: at line 1

马上查看10g的在线文件:
ORA-39212: installation error: XSL stylesheets not loaded correctly

Cause: The XSL stylesheets used by the Data Pump Metadata API were not loaded correctly into the Oracle dictionary table "sys.metastylesheet." Either the stylesheets were not loaded at all, or they were not converted to the database character set.
Action: Connect AS SYSDBA and execute dbms_metadata_util.load_stylesheets to reload the stylesheets.


解决方法:
以sysdba权限的用户登陆执行以下语句:

SQL> exec dbms_metadata_util.load_stylesheets;

PL/SQL procedure successfully completed.


再次执行成功:

SQL> select DBMS_METADATA.get_ddl(‘TABLESPACE‘,‘PDA‘) from dual;

DBMS_METADATA.GET_DDL(‘TABLESPACE‘,‘PDA‘)
--------------------------------------------------------------------------------

CREATE TABLESPACE "PDA" DATAFILE 
  ‘/db_data/app/oracle/oradata/pda/PDA_01.dbf‘ SIZE 2147483648
  LOGGING ONLINE PERMANENT BLOCKSIZE 8192
  EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT AUTO

执行DBMS_METADATA.get_ddl报ORA-39212的解决方法

标签:man   xpl   taf   10g   use   ora   div   correct   语句   

原文地址:http://www.cnblogs.com/lihaiming93/p/6831120.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!