在Oracle 12.2上使用imp导入时,出现IMP-00403错误。
[oracle@hisdb dmp]$ imp dba/1234321@hisdb file=yy2021.dmp log=yy2021.log
Import: Release 12.2.0.1.0 - Production on Mon Oct 31 11:56:53 2022
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Export file created by EXPORT:V12.02.00 via conventional path
Warning: the objects were exported by YBCX, not by you
import done in ZHS16GBK character set and AL16UTF16 NCHAR character set
import server uses AL32UTF8 character set (possible charset conversion)
IMP-00403:
Warning: This import generated a separate SQL file "yy2021_sys.sql" which contains DDL that failed due to a privilege issue.
IMP-00031: Must specify FULL=Y or provide FROMUSER/TOUSER or TABLES arguments
IMP-00000: Import terminated unsuccessfully
通过MOS文档(IMP-00403 “Warning: This import generated a separate SQL file” Using 12.2 imp Command (Doc ID 2298963.1)
As described in the Utilities documentation, this warning is raised when imp command is run by a user having the DBA role.
When such warning is displayed, check the contents of the specified sql file.
If the file is empty, no objects needs to be recreated manually.
If the file contains DDL statements, it means imp command could not recreate those objects by user SYSTEM. Verify each DDL, and manually recreate the objects if necessary.
导入完成后检查提示的这个.sql文件,如果是空的,不需要处理,即可忽略该告警;
如果不为空,则需要根据提示手工处理。
[oracle@hisdb dmp]$ ll
total 7687428
-rwxrwxr-x 1 oracle oinstall 1332699136 Oct 29 09:53 yy2021.dmp
-rw-r--r-- 1 oracle oinstall 655 Oct 31 12:02 yy2021.log
-rw-r--r-- 1 oracle oinstall 0 Oct 31 11:58 yy2021_sys.sql
[oracle@hisdb dmp]$ cat yy2021_sys.sql
检查发现yy2021_sys.sql为空,此次处理过程中,该告警忽略。