在cmd下使用imp命令導入oracle的dmp文件報錯ORA-02304
阿新 • • 發佈:2018-09-19
ati 導出 oid 標識符 gre exp gate 信息 flag
報錯信息如下:
IMP-00017: 由於 ORACLE 錯誤 2304, 以下語句失敗: "CREATE TYPE "EN_CONCAT_IM" TIMESTAMP ‘2018-04-09:16:01:30‘ OID ‘27A29B9B634" "1AD1EE050FD0AD4021A7C‘ " " " " "" AUTHID CURRENT_USER AS OBJECT" "(" " CURR_STR VARCHAR2(32767)," " STATIC FUNCTION ODCIAGGREGATEINITIALIZE(SCTX IN OUT en_concat_im) RETUR" "N NUMBER," " MEMBER FUNCTION ODCIAGGREGATEITERATE(SELF IN OUT en_concat_im," " P1 IN VARCHAR2) RETURN NUMBER," " MEMBER FUNCTION ODCIAGGREGATETERMINATE(SELF IN en_concat_im," " RETURNVALUE OUT VARCHAR2," " FLAGS IN NUMBER)" " RETURN NUMBER," " MEMBER FUNCTION ODCIAGGREGATEMERGE(SELF IN OUT en_concat_im," " SCTX2 IN en_concat_im) RETURN NUMBER" " );" "" IMP-00003: 遇到 ORACLE 錯誤 2304 ORA-02304: 無效的對象標識符文字
報這個錯的原因是因為自定義type的標準創建語句是:
create type 變量 as table of 類型
--
create type 變量 as object(
字段1 類型1,
字段2 類型2
);
但是上面的sql是exp直接導出的,包含了時間戳和OID,打開PLSQL,註釋掉時間戳和OID後,執行上述語句不報錯,問題解決。
在cmd下使用imp命令導入oracle的dmp文件報錯ORA-02304