取了个dmp文件,导入报错了,原因是dmp文件是通过expdp方法导出的,只能通过impdp方法导入才行。
C:\Users\Administrator>imp ncc_qt/1@orcl file=f:\ncc0303.dmp
报错信息如下:
IMP-00038: Could not convert to environment character set's handleIMP-00000: Import terminated unsuccessfully
impdp导入功能演示:
先登录oracle库。
C:\Users\Administrator>sqlplus ncc_qt/1@orclSQL*Plus: Release 11.2.0.4.0 Production on Tue Jun 2 15:38:00 Copyright (c) 1982, , Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options
然后创建一个directory,路径指向dmp文件所在的位置。
然后quit退出来。
SQL> create directory dmp_site as 'f:';Directory created.SQL> quitDisconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options
dumpfile直接对应dmp名即可。
remap_schema=A:B命令可以用来把原来Ashema表的数据导入到B表中。
C:\Users\Administrator>impdp ncc_qt/1@orcl directory=dmp_site dumpfile=ncc0303.dmp remap_schema=ncc0303:ncc_qtImport: Release 11.2.0.4.0 - Production on Tue Jun 2 16:20:18 Copyright (c) 1982, , Oracle and/or its affiliates. All rights reserved.Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bitProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsMaster table "NCC_QT"."SYS_IMPORT_FULL_01" successfully loaded/unloadedStarting "NCC_QT"."SYS_IMPORT_FULL_01": ncc_qt/********@orcl directory=dmp_sitedumpfile=ncc0303.dmp remap_schema=ncc0303:ncc_qtProcessing object type SCHEMA_EXPORT/USERORA-31684: Object type USER:"NCC_QT" already existsProcessing object type SCHEMA_EXPORT/SYSTEM_GRANTProcessing object type SCHEMA_EXPORT/ROLE_GRANTProcessing object type SCHEMA_EXPORT/DEFAULT_ROLEProcessing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMAProcessing object type SCHEMA_EXPORT/TABLE/TABLE... 省略导入过程. . imported "NCC_QT"."ZDP_1000000000JJR1" 0 KB 0 rows. . imported "NCC_QT"."ZDP_1000000000JJR3" 0 KB 0 rowsProcessing object type SCHEMA_EXPORT/TABLE/COMMENTProcessing object type SCHEMA_EXPORT/TABLE/INDEX/INDEXProcessing object type SCHEMA_EXPORT/TABLE/INDEX/FUNCTIONAL_INDEX/INDEXProcessing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINTProcessing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICSProcessing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICSProcessing object type SCHEMA_EXPORT/VIEW/VIEWProcessing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICSJob "NCC_QT"."SYS_IMPORT_FULL_01" completed with 1 error(s) at Tue Jun 2 16:35:12 elapsed 0 00:14:54
喜欢的点个赞❤吧!
oracle数据库impdp导入dmp文件功能演示 imp导入IMP-00038: Could not convert to environment character sets handle问题解决