執行DBMS_METADATA.get_ddl報ORA-39212的解決方法


環境:
    數據庫: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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM