首页 文章

将oracle10g数据dmp文件导入oracle 11g

提问于
浏览
4

我正在尝试导入使用oracle 10g生成的dmp文件,这是我得到的导出日志:

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses WE8MSWIN1252 character set (possible charset conversion)

About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user dbname 
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user dbname 
About to export dbname's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export dbname's tables via Conventional Path ...
. . exporting table                  CONTROL_SL_MV       2605 rows exported
. . exporting table                 CUBE$ACCEXCISE
. . exporting partition                          P_0_0          0 rows exported
. . exporting table             CUBE$BANK_REGISTER
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_55_96      71075 rows exported
. . exporting partition                       P_55_101      74949 rows exported
. . exporting table                  CUBE$BILLCOLL
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                         P_28_9     355263 rows exported
. . exporting table                  CUBE$BOMCHECK
. . exporting partition                          P_0_0          0 rows exported
. . exporting table            CUBE$BUDGETANALYSIS
. . exporting partition                          P_0_0          0 rows exported
. . exporting table                   CUBE$FINOTSD
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_2_102      24276 rows exported
. . exporting table                    CUBE$FINREG
. . exporting partition                          P_0_0          0 rows exported
. . exporting table                CUBE$FINREGSITE
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_36_69     342072 rows exported
. . exporting table                  CUBE$FINREGSL
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_35_70     138696 rows exported
. . exporting partition                       P_35_135     252140 rows exported
. . exporting table                    CUBE$FINTDS
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_37_59       7463 rows exported
. . exporting table                 CUBE$GATEENTRY
. . exporting partition                          P_0_0          0 rows exported
. . exporting table                  CUBE$INTRNSUM
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_4_144        242 rows exported
. . exporting table                   CUBE$INVCONV
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                          P_3_1      52975 rows exported
. . exporting table                   CUBE$INVMISC
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_11_24      35705 rows exported
. . exporting table                  CUBE$INVSPLIT
. . exporting partition                          P_0_0          0 rows exported
. . exporting table                       CUBE$LGT
. . exporting partition                          P_0_0          0 rows exported
. . exporting table                   CUBE$ORDSTAT
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_22_80        726 rows exported
. . exporting table                    CUBE$PERMIT
. . exporting partition                          P_0_0          0 rows exported
. . exporting table                CUBE$POSBILLDET
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_29_23     277919 rows exported
. . exporting partition                        P_29_15    1137910 rows exported
. . exporting table               CUBE$POSBILLSUMM
. . exporting partition                          P_0_0          0 rows exported
. . exporting table                    CUBE$POSDSR
. . exporting partition                          P_0_0          0 rows exported
. . exporting table                 CUBE$PRDJOBBOM
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                       P_45_106       4418 rows exported
. . exporting table                 CUBE$PRDJOBCNL
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                       P_51_119          4 rows exported
. . exporting table                 CUBE$PRDJOBITM
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                       P_42_105        896 rows exported
. . exporting table                 CUBE$PRDJOBRCT
. . exporting partition                          P_0_0          0 rows exported
. . exporting table                 CUBE$PRDJRCBOM
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                       P_54_112       3128 rows exported
. . exporting table                    CUBE$PRDLTT
. . exporting partition                          P_0_0          0 rows exported
. . exporting table                CUBE$PRDPLANBOM
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_47_99       7808 rows exported
. . exporting table                CUBE$PRDPLANITM
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                       P_41_100        863 rows exported
. . exporting table                CUBE$PRDPLANOPR
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                       P_43_104       1477 rows exported
. . exporting table                 CUBE$PRDWIPTXN
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                       P_48_107       3112 rows exported
. . exporting table                 CUBE$PRDWIPVAL
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                       P_49_120       7668 rows exported
. . exporting table                      CUBE$PSTK
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_6_114          0 rows exported
. . exporting table                    CUBE$PTCREG
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_31_93      33830 rows exported
. . exporting table                  CUBE$PURCHASE
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_21_14      31774 rows exported
. . exporting table                    CUBE$PURCHG
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_20_20      23374 rows exported
. . exporting table                    CUBE$PURINV
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_19_94      14048 rows exported
. . exporting table                 CUBE$PURINVSUM
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_39_97      14048 rows exported
. . exporting table                    CUBE$SALCHG
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_23_16      41696 rows exported
. . exporting table                     CUBE$SALDC
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_27_37       6787 rows exported
. . exporting partition                        P_27_57    1473651 rows exported
. . exporting partition                       P_27_142     349656 rows exported
. . exporting table                    CUBE$SALINV
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                       P_25_108    1047449 rows exported
. . exporting partition                        P_25_17    2054685 rows exported
. . exporting table                 CUBE$SALINVSUM
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_38_92      43937 rows exported
. . exporting table                    CUBE$SALORD
. . exporting partition                          P_0_0          0 rows exported
. . exporting table                 CUBE$SITE2SITE
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                         P_5_51     764452 rows exported
. . exporting table                 CUBE$SITESTOCK
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_26_86     962251 rows exported
. . exporting partition                        P_26_10          0 rows exported
. . exporting partition                        P_26_89          0 rows exported
. . exporting table                       CUBE$STF
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_8_145         79 rows exported
. . exporting table                    CUBE$STKADJ
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                       P_13_115      35845 rows exported
. . exporting table                 CUBE$STKANLDET
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                        P_14_22    9921680 rows exported
. . exporting table                 CUBE$STKANLSUM
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                          P_7_3    3748950 rows exported
. . exporting partition                        P_7_138    2436579 rows exported
. . exporting partition                        P_7_143    4745478 rows exported
. . exporting partition                         P_7_73    4756191 rows exported
. . exporting partition                        P_7_146     928416 rows exported
. . exporting partition                          P_7_7    5435920 rows exported
. . exporting table                   CUBE$STKMOVE
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                       P_15_123     805427 rows exported
. . exporting partition                        P_15_66     908402 rows exported
. . exporting partition                        P_15_67     963341 rows exported
. . exporting table                 CUBE$STKMOVEGP
. . exporting partition                          P_0_0          0 rows exported
. . exporting table                CUBE$STKTRANSIT
. . exporting partition                          P_0_0          0 rows exported
. . exporting partition                       P_10_103     647140 rows exported
. . exporting partition                       P_10_111     695534 rows exported
. . exporting partition                       P_10_121     784606 rows exported
. . exporting partition                       P_10_132     760269 rows exported
. . exporting table                    CUBE$STKVAL
. . exporting partition                          P_0_0          0 rows exported
. . exporting table                  CUBE$STKVALOU
. . exporting partition                          P_0_0          0 rows exported
. . exporting table              EUL5_ACCESS_PRIVS        236 rows exported
. . exporting table                EUL5_APP_PARAMS         17 rows exported
. . exporting table                 EUL5_ASMP_CONS          0 rows exported
. . exporting table                 EUL5_ASMP_LOGS          0 rows exported
. . exporting table              EUL5_ASM_POLICIES          1 rows exported
. . exporting table                       EUL5_BAS          8 rows exported
. . exporting table              EUL5_BATCH_PARAMS          0 rows exported
. . exporting table             EUL5_BATCH_QUERIES          0 rows exported
. . exporting table             EUL5_BATCH_REPORTS          0 rows exported
. . exporting table              EUL5_BATCH_SHEETS          0 rows exported
. . exporting table              EUL5_BA_OBJ_LINKS         96 rows exported
. . exporting table                   EUL5_BQ_DEPS          0 rows exported
. . exporting table                 EUL5_BQ_TABLES          0 rows exported
. . exporting table                   EUL5_BR_RUNS          0 rows exported
. . exporting table                 EUL5_DBH_NODES         38 rows exported
. . exporting table                 EUL5_DOCUMENTS        102 rows exported
. . exporting table               EUL5_DOC_FOLDERS          1 rows exported
. . exporting table                   EUL5_DOMAINS         59 rows exported
. . exporting table                EUL5_ELEM_XREFS        100 rows exported
. . exporting table                 EUL5_EUL_USERS         29 rows exported
. . exporting table               EUL5_EXPRESSIONS       3063 rows exported
. . exporting table                  EUL5_EXP_DEPS        711 rows exported
. . exporting table                EUL5_FREQ_UNITS          6 rows exported
. . exporting table                 EUL5_FUNCTIONS        271 rows exported
. . exporting table             EUL5_FUN_ARGUMENTS        301 rows exported
. . exporting table                  EUL5_FUN_CTGS         10 rows exported
. . exporting table              EUL5_FUN_FC_LINKS        262 rows exported
. . exporting table                  EUL5_GATEWAYS          2 rows exported
. . exporting table               EUL5_HIERARCHIES         95 rows exported
. . exporting table                  EUL5_HI_NODES        424 rows exported
. . exporting table               EUL5_HI_SEGMENTS        367 rows exported
. . exporting table              EUL5_IG_EXP_LINKS        424 rows exported
. . exporting table              EUL5_IHS_FK_LINKS          0 rows exported
. . exporting table                  EUL5_KEY_CONS        177 rows exported
. . exporting table                      EUL5_OBJS         96 rows exported
. . exporting table                  EUL5_OBJ_DEPS          0 rows exported
. . exporting table             EUL5_OBJ_JOIN_USGS          0 rows exported
. . exporting table                EUL5_PLAN_TABLE          0 rows exported
. . exporting table                 EUL5_QPP_STATS      12056 rows exported
. . exporting table                  EUL5_SEGMENTS        152 rows exported
. . exporting table                 EUL5_SEQUENCES          1 rows exported
. . exporting table                EUL5_SQ_CRRLTNS          0 rows exported
. . exporting table               EUL5_SUB_QUERIES          0 rows exported
. . exporting table              EUL5_SUMMARY_OBJS          0 rows exported
. . exporting table             EUL5_SUMO_EXP_USGS          0 rows exported
. . exporting table               EUL5_SUM_BITMAPS          0 rows exported
. . exporting table             EUL5_SUM_RFSH_SETS          0 rows exported
. . exporting table                  EUL5_VERSIONS          1 rows exported
. . exporting table                        ITEM_MV     240210 rows exported
. . exporting table                      LEDGER_MV        332 rows exported
. . exporting table          MV_CAPABILITIES_TABLE         27 rows exported
. . exporting table                        PACKDEF          1 rows exported
. . exporting table                 SITE_DETAIL_MV        424 rows exported
. . exporting table                        SITE_MV        700 rows exported
. . exporting table                  SUB_LEDGER_MV       3538 rows exported
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting materialized views
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully without warnings.

现在我尝试使用此命令将此文件导入到我的oracle 11g标准安装中:

imp user / password FULL = Y FILE = dbname.dmp log = dbname.log

但对于每个表,它产生一个错误说:

IMP-00003:ORACLE错误959遇到ORA-00959:tablespace
'GINOLAP'不存在

在它产生的所有处理之后:

> IMP-00003: ORACLE error 1435 encountered ORA-01435: user does not
> exist ORA-06512: at "SYS.DBMS_ISNAPSHOT", line 108 ORA-06512: at
> "SYS.DBMS_SNAPSHOT_UTL", line 1520 ORA-06512: at line 1 IMP-00000:
> Import terminated unsuccessfully

我该如何导入这个数据库dmp文件?

PS:dmp文件是使用exp命令创建的,因此我无法使用impdp命令 .

2 回答

  • 2

    这意味着您在目标数据库服务器上没有名为GINOLAP的表空间,并且用户/架构错误 .

    您是否已选中TRANSPORT_TABLESPACES = Y选项以在目标服务器上创建它们,而FROMUSERTOUSER来映射用户?

  • 1

    Steps to follow when doing this :

    • 在源服务器上设置相同的字符

    • 从源数据库导出数据

    • 借助以下脚本从恶劣的数据库中提取表脚本

    对于表空间

    select ‘create tablespace ‘ || df.tablespace_name || chr(10)
    || ‘ datafile ”’ || df.file_name || ”’ size ‘ || df.bytes
    || decode(autoextensible,’N',null, chr(10) || ‘ autoextend on maxsize ‘
    || maxbytes)
    || chr(10)
    || ‘default storage ( initial ‘ || initial_extent
    || decode (next_extent, null, null, ‘ next ‘ || next_extent )
    || ‘ minextents ‘ || min_extents
    || ‘ maxextents ‘ ||  decode(max_extents,’2147483645′,’unlimited’,max_extents)
    || ‘) ;’
    from dba_data_files df, dba_tablespaces t
    where df.tablespace_name=t.tablespace_name
    

    对于用户

    set pagesize 0
    set escape on
    select ‘create user ‘ || U.username || ‘ identified ‘ ||
    DECODE(password,
    NULL, ‘EXTERNALLY’,
    ‘ by values ‘ || ”” || password || ””
    )
    || chr(10) ||
    ‘default tablespace ‘ || default_tablespace || chr(10) ||
    ‘temporary tablespace ‘ || temporary_Tablespace || chr(10) ||
    ‘ profile ‘ || profile || chr(10) ||
    ‘quota ‘ ||
    decode ( Q.max_bytes, -1, ‘UNLIMITED’, NULL, ‘UNLIMITED’, Q.max_bytes) ||
    ‘ on ‘ || default_tablespace ||
    decode (account_status,’LOCKED’, ‘ account lock’,
    ‘EXPIRED’, ‘ password expire’,
    ‘EXPIRED \& LOCKED’, ‘ account lock password expire’,
    null)
    ||
    ‘;’
    from dba_users U, dba_ts_quotas Q
    – Comment this clause out to include system & default users
    where U.username not in (‘SYS’,'SYSTEM’)
    and U.username=Q.username(+) and U.default_tablespace=Q.tablespace_name(+)
    ;
    set pagesize 100
    set escape off
    
    • 将文件复制到目标服务器 .

    • 在目标服务器上安装Oracle 11g二进制文件

    • 在已安装的11g上创建数据库

    • 运行用于创建表空间和用户的脚本

    • 在目标服务器上设置相同的字符

    • 将转储文件导入目标服务器


    如果您没有用户和 DDL 用于要导入的对象,则需要从 dmp 文件中提取 DDL .
    确保目标数据库已启动并运行确保已创建目录(转储将位于何处以及将存储DDL日志的位置) To extract the DDL issue the command bellow :

    imp file=metadata.dmp userid=system/password full=y show=y log=/tmp/ddl_log.sql dumpdir=DIR_NAME
    

    在您获得DDL后,提取表空间和用户定义,然后在数据库中运行 .

相关问题