用impdp匯入資料的一次經歷

czxin788發表於2015-01-06


同事給我發來了windows 平臺下的三個VEASMS__01.DMP,VEASMS__02.DMP,VEASMS__03.DMP檔案,讓我匯入linux中的10g oracle中,我看了他給我發過來匯出的日誌檔案,如下:

連線到: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
啟動 "VEBACKUP"."2015-01-05":  vebackup/******** directory=DATABAK_DIRdumpfile=veasms__01.DMP,veasms__02.DMP,veasms__03.DMP SCHEMAS=veasms parallel=3 job_name=2015-01-05 logfile=veasms_.log 
正在使用 BLOCKS 方法進行估計...
處理物件型別 SCHEMA_EXPORT/TABLE/TABLE_DATA
使用 BLOCKS 方法的總估計: 4.968 GB

透過上圖示紅色字部分,我知道了他用的是expdp匯出的,於是我在我的10g資料庫中用如下方法進行匯入:

1、將VEASMS__01.DMP,VEASMS__02.DMP,VEASMS__03.DMP放入/data/exp目錄下。

2、
SQL> create directory DATABAK_DIR as '/data/exp'

3、
SQL> grant dba to VEASMS identified by oracle;

4、
SQL> grant read,write on directory DATABAK_DIR to veasms;

5、
[root@localhost exp]# cat impdp.txt 
userid=veasms/oracle
directory=DATABAK_DIR
job_name=2015-01-05
SCHEMAS=veasms
dumpfile=VEASMS__01.DMP,VEASMS__02.DMP,VEASMS__03.DMP
logfile=veasms_1.log


6、
[oracle@localhost exp]$ impdp parfile=/data/exp/impdp.txt 

Import: Release 10.2.0.1.0 - Production on Monday, 05 January, 2015 21:54:22

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Master table "VEASMS"."2015-01-05" successfully loaded/unloaded
Starting "VEASMS"."2015-01-05":  parfile=/data/exp/impdp.txt 
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"VEASMS" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC
Processing object type SCHEMA_EXPORT/DB_LINK
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
 imported "VEASMS"."T_PT_LOG_HISTORY"                 890.7 MB  124593 rows
. . imported "VEASMS"."T_PT_LOG"                         185.8 MB   27304 rows
. . imported "VEASMS"."TICKET_ALL_LOG"                   276.1 MB  415247 rows
. . imported "VEASMS"."PNR_ERROR"                        219.1 MB   75749 rows
. . imported "VEASMS"."BB_ERROR"                         218.3 MB  331832 rows
. . imported "VEASMS"."JP_ZC_NFD":"P_3"                  65.85 MB   28534 rows
. . imported "VEASMS"."YS_ERROR"                         150.9 MB  151424 rows
. . imported "VEASMS"."KH_KHDDCHANGERECORD"              154.7 MB  480884 rows
. . imported "VEASMS"."HKGS_ALL_HB"                      128.3 MB  432781 rows
. . imported "VEASMS"."KH_KHDDCJR_LOG"                   122.7 MB  423674 rows
. . imported "VEASMS"."TICKET_EXTEND_LOG"                90.85 MB  309660 rows
. . imported "VEASMS"."TRAIN_CC_PJ"                      82.89 MB 1322864 rows
. . imported "VEASMS"."KH_KHDD_EXTEND_LOG"               79.73 MB  226916 rows
. . imported "VEASMS"."JD_WBFX"                          55.84 MB  405884 rows
. . imported "VEASMS"."TICKET_ALL"                       66.63 MB  103658 rows
. . imported "VEASMS"."JD_FX"                            55.22 MB  296340 rows
. . imported "VEASMS"."JD_JDB"                           48.79 MB   51183 rows
. . imported "VEASMS"."KH_KHDD"                          52.87 MB   75197 rows
. . imported "VEASMS"."TICKET_CHANGERECORD"              53.87 MB  208448 rows
. . imported "VEASMS"."ZC_ERROR"                         51.65 MB  383815 rows
. . imported "VEASMS"."B_AIRWAY_CW_HC"                
Processing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/FUNCTION/ALTER_FUNCTION
ORA-39082: Object type ALTER_FUNCTION:"VEASMS"."F_GET_HCBZ" created with compilation warnings
ORA-39082: Object type ALTER_FUNCTION:"VEASMS"."F_HXYJ_CHANG" created with compilation warnings
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
ORA-39082: Object type ALTER_PROCEDURE:"VEASMS"."P_LQL_YYB_WC" created with compilation warnings
ORA-39082: Object type ALTER_PROCEDURE:"VEASMS"."PROC_TFD_TJ_CW" created with compilation warnings
ORA-39082: Object type ALTER_PROCEDURE:"VEASMS"."PROC_TICKET_PH" created with compilation warnings
ORA-39082: Object type ALTER_PROCEDURE:"VEASMS"."PROC_OPTIMIZE_INDEX" created with compilation warnings
ORA-39082: Object type ALTER_PROCEDURE:"VEASMS"."PROC_SYNC_INDEX" created with compilation warnings
ORA-39082: Object type ALTER_PROCEDURE:"VEASMS"."PROC_INIT_QW" created with compilation warnings
ORA-39082: Object type ALTER_PROCEDURE:"VEASMS"."PROC_CLOB_QW" created with compilation warnings
ORA-39082: Object type ALTER_PROCEDURE:"VEASMS"."PROC_COMPARE_SOURCE" created with compilation warnings
ORA-39082: Object type ALTER_PROCEDURE:"VEASMS"."PROC_COMPARE_TABLE" created with compilation warnings
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY
ORA-39082: Object type PACKAGE_BODY:"VEASMS"."PKG_ZC" created with compilation warnings
ORA-39082: Object type PACKAGE_BODY:"VEASMS"."PKG_ZC_5000" created with compilation warnings
ORA-39082: Object type PACKAGE_BODY:"VEASMS"."PKG_ZC_OLD" created with compilation warnings
ORA-39082: Object type PACKAGE_BODY:"VEASMS"."PKG_ZZ_5000" created with compilation warnings
ORA-39082: Object type PACKAGE_BODY:"VEASMS"."PKG_ZZ_5000_NEW" created with compilation warnings
ORA-39082: Object type PACKAGE_BODY:"VEASMS"."PKG_DATA_MODIFY" created with compilation warnings
ORA-39082: Object type PACKAGE_BODY:"VEASMS"."PKG_LY_PZ" created with compilation warnings
ORA-39082: Object type PACKAGE_BODY:"VEASMS"."PKG_QUERY_NEW_5000" created with compilation warnings
Processing object type SCHEMA_EXPORT/JAVA_SOURCE/JAVA_SOURCE
Processing object type SCHEMA_EXPORT/JAVA_CLASS/JAVA_CLASS
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
ORA-39082: Object type TRIGGER:"VEASMS"."T_LJ_B_PC_OUT_ADD" created with compilation warnings
ORA-39082: Object type TRIGGER:"VEASMS"."TRIG_UPDATE_PZ_RETURN" created with compilation warnings
ORA-39082: Object type TRIGGER:"VEASMS"."TRIG_UPDATE_PZ_KHDD" created with compilation warnings
ORA-39082: Object type TRIGGER:"VEASMS"."TRIG_UPDATE_BXDD" created with compilation warnings
ORA-39082: Object type TRIGGER:"VEASMS"."TRIG_T_PTBJ_JCSZ" created with compilation warnings
ORA-39082: Object type TRIGGER:"VEASMS"."TRIG_T_PTBJ_JCSZ" created with compilation warnings
ORA-39082: Object type TRIGGER:"VEASMS"."TRIG_RETURN_PS" created with compilation warnings
ORA-39082: Object type TRIGGER:"VEASMS"."TRIG_GSY_UPDATE_BC_KHDD" created with compilation warnings
Processing object type SCHEMA_EXPORT/TABLE/INDEX/FUNCTIONAL_AND_BITMAP/INDEX
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_AND_BITMAP/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/INDEX/DOMAIN_INDEX/INDEX
ORA-39083: Object type INDEX failed to create with error:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-50857: oracle error in drvxtab.create_index_tables
ORA-00955: name is already used by an existing object
Failing sql is:
CREATE INDEX "VEASMS"."IDX_LY_XL_QW" ON "VEASMS"."LY_XL_QW" ("QW")  INDEXTYPE IS "CTXSYS"."CONTEXT" PARAMETERS ('DATASTORE CTXSYS.DIRECT_DATASTORE FILTER CTXSYS.INSO_FILTER  LEXER main_lexer WORDLIST mywordlist')PARALLEL 1 
ORA-39083: Object type INDEX failed to create with error:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-50857: oracle error in drvxtab.create_index_tables
ORA-00955: name is already used by an existing object
Failing sql is:
CREATE INDEX "VEASMS"."IDX_LY_TDD_QW" ON "VEASMS"."LY_TDD_QW" ("QW")  INDEXTYPE IS "CTXSYS"."CONTEXT" PARAMETERS ('DATASTORE CTXSYS.DIRECT_DATASTORE FILTER CTXSYS.INSO_FILTER  LEXER main_lexer WORDLIST mywordlist')PARALLEL 1 
ORA-39083: Object type INDEX failed to create with error:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-50857: oracle error in drvxtab.create_index_tables
ORA-00955: name is already used by an existing object
Failing sql is:
CREATE INDEX "VEASMS"."IDX_LY_XLJH_QW" ON "VEASMS"."LY_XLJH_QW" ("QW")  INDEXTYPE IS "CTXSYS"."CONTEXT" PARAMETERS ('DATASTORE CTXSYS.DIRECT_DATASTORE FILTER CTXSYS.INSO_FILTER  LEXER main_lexer WORDLIST mywordlist')PARALLEL 1 
Job "VEASMS"."2015-01-05" completed with 31 error(s) at 00:27:09

 為什麼在最後建立儲存、函式、觸發器、索引時報錯了呢,該怎麼解決。


另外,我在匯入資料的時候發現,閃回恢復區的空間是在急劇增長,所以在匯入的時候閃回恢復區的磁碟要有足夠的空間或db_recovery_file_dest_size  引數要指定的足夠大。
SQL> show parameter reco

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time        integer     7
db_recovery_file_dest                string      +FLASH
db_recovery_file_dest_size           big integer 5G
recovery_parallelism                 integer     0

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28916011/viewspace-1392535/,如需轉載,請註明出處,否則將追究法律責任。

相關文章