Oracle数据泵导入dmp文件,报UDI-12154、ORA-12154错误解决办法

1. 数据泵导入dmp文件,报UDI-12154、ORA-12154

  1.1 导入命令

impdp cwy_init/init@orcl directory=DATA_PUMP_DIR dumpfile=cwy_init_0806.dmp REMAP_SCHEMA=cwy_init:cwy_init transform=segment_attributes:n  logfile= imp_cwy_init_0806.log

   1.2 问题现象

[oracle@yonyouoracle ~]$ cd /home/oracle/app/oracle/product/11.2.0/db/bin/
[oracle@yonyouoracle bin]$ ./impdp cwy_init/init@orcl directory=DATA_PUMP_DIR dumpfile=cwy_init_0806.dmp REMAP_SCHEMA=cwy_init:cwy_init transform=segment_attributes:n  logfile= imp_cwy_init_0806.log

Import: Release 11.2.0.4.0 - Production on Sat Aug 6 14:39:08 2022

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

UDI-12154: operation generated ORACLE error 12154
ORA-12154: TNS:could not resolve the connect identifier specified

2. 解决办法

  2.1 导入时去掉SID

impdp cwy_init/init directory=DATA_PUMP_DIR dumpfile=cwy_init_0806.dmp REMAP_SCHEMA=cwy_init:cwy_init transform=segment_attributes:n  logfile= imp_cwy_init_0806.log

   2.2 开始导入成功

[oracle@yonyouoracle bin]$ ./impdp cwy_init/init directory=DATA_PUMP_DIR dumpfile=cwy_init_0806.dmp REMAP_SCHEMA=cwy_init:cwy_init transform=segment_attributes:n  logfile= imp_cwy_init_0806.log

Import: Release 11.2.0.4.0 - Production on Sat Aug 6 14:42:54 2022

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "CWY_INIT"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "CWY_INIT"."SYS_IMPORT_FULL_01":  cwy_init/******** directory=DATA_PUMP_DIR dumpfile=cwy_init_0806.dmp REMAP_SCHEMA=cwy_init:cwy_init transform=segment_attributes:n logfile=
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"CWY_INIT" 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/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 "CWY_INIT"."ACT_HI_VARINST"                 2.847 GB 15435581 rows
. . imported "CWY_INIT"."GL_VOU_DETAIL_ASS_HIS"          2.169 GB 5427441 rows

 

posted @ 2022-08-07 16:03  查拉图斯特拉面条  阅读(2749)  评论(0编辑  收藏  举报