ORA-39083 ORA-01917问题解决

问题背景

给了一个expdp的文件,没有给命令,就只能试一下了

[oracle@POC-ORACLE ~]$ impdp dcps/dcps@upbs directory=dump_dir dumpfile=dcps20210630.dmp

Import: Release 19.0.0.0.0 - Production on Mon Jul 5 17:42:16 2021
Version 19.3.0.0.0

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

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Master table "DCPS"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "DCPS"."SYS_IMPORT_FULL_01":  dcps/********@upbs directory=dump_dir dumpfile=dcps20210630.dmp 
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
ORA-39083: Object type SYSTEM_GRANT failed to create with error:
ORA-01917: user or role 'C##DCPS' does not exist

ORA-39083: 对象类型 OBJECT_GRANT 创建失败, 出现错误:
ORA-01917: 用户或角色 ‘C##DCPS’ 不存在

问题解决

问题分析

导出用户的schema和导入用户的schema不一致,导致用户或者角色不存在

解决方式一:新建一样的用户名并赋予权限

create user c##dcps identified by dcps
default tablespace upbs
temporary tablespace upbs_temp; 

grant connect,resource,dba to dcps;

解决方式二:导入时带schema转换

[oracle@POC-ORACLE ~]$ impdp dcps/dcps@upbs directory=dump_dir dumpfile=dcps20210630.dmp remap_schema=c##dcps:dcps table_exists_action=replace

Import: Release 19.0.0.0.0 - Production on Mon Jul 5 17:53:38 2021
Version 19.3.0.0.0

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

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Master table "DCPS"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "DCPS"."SYS_IMPORT_FULL_01":  dcps/********@upbs directory=dump_dir dumpfile=dcps20210630.dmp remap_schema=c##dcps:dcps table_exists_action=replace 

可以转换一下,就可以使用不同的用户了

你可能感兴趣的:(oracle,问题记录,ORA-39083,ORA-01917,impdp,数据泵导入)