用impdp导入数据的一次经历



同事给我发来了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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/28916011/viewspace-1392535/

你可能感兴趣的:(用impdp导入数据的一次经历)