[ocp0531] 答复: [ocp0531] 关于 inpdp

  • From: "Jianjun Li" <4.4bsd.lite@xxxxxxxxx>
  • To: <ocp0531@xxxxxxxxxxxxx>
  • Date: Sat, 20 Jun 2009 17:03:00 +0800

ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT REFERENCES ON "HR"."COUNTRIES" TO "OE"

 

上面这种报错是因为你的hr.dmp是从别人那里导出来的,别人数据库中有OE用户,并且
hr schema里有些对象被赋予OE用户某种权限。但是你的数据库中没有OE用户,所以imp
过程中,grant xxx to oe的时候就会报错。

 

Schemas=system

这个参数用在expdp时,是指定导出system schema中的对象

用在impdp时,是指定只导入system schema中的对象

关于参数的描述,请参照b14215 第102页 Parameters Available in Import's
Command-Line Mode

 

 

  _____  

发件人: ocp0531-bounce@xxxxxxxxxxxxx [mailto:ocp0531-bounce@xxxxxxxxxxxxx]
代表 李浩然
发送时间: 2009年6月20日 13:10
收件人: ocp0531@xxxxxxxxxxxxx
主题: [ocp0531] 关于 inpdp

 

[oracle@n01 oracle]$ impdp hr/hr directory=dp dumpfile=hr.dmp 

 

Import: Release 10.2.0.1.0 - Production on Thursday, 11 June, 2009 15:14:19

 

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

 

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 -
Production
With the Partitioning, OLAP and Data Mining options
Master table "HR"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "HR"."SYS_IMPORT_FULL_01":  hr/******** directory=dp
dumpfile=hr.dmp 
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "HR"."COUNTRIES"                            6.085 KB      25
rows
. . imported "HR"."DEPARTMENTS"                          6.632 KB      27
rows
. . imported "HR"."EMPLOYEES"                            15.76 KB     107
rows
. . imported "HR"."JOBS"                                 6.609 KB      19
rows
. . imported "HR"."JOB_HISTORY"                          6.585 KB      10
rows
. . imported "HR"."LOCATIONS"                            7.710 KB      23
rows
. . imported "HR"."REGIONS"                              5.296 KB       4
rows
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT SELECT ON "HR"."COUNTRIES" TO "OE"
 
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT REFERENCES ON "HR"."COUNTRIES" TO "OE"
 
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT SELECT ON "HR"."LOCATIONS" TO "OE"
 
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT REFERENCES ON "HR"."LOCATIONS" TO "OE"
 
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT SELECT ON "HR"."DEPARTMENTS" TO "OE"
 
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT SELECT ON "HR"."JOBS" TO "OE"
 
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT SELECT ON "HR"."EMPLOYEES" TO "OE"
 
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT REFERENCES ON "HR"."EMPLOYEES" TO "OE"
 
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT SELECT ON "HR"."JOB_HISTORY" TO "OE"
 
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "HR"."SYS_IMPORT_FULL_01" completed with 9 error(s) at 15:14:33

 

 

 

 

我实验了下没有加schemas=system 出现了这些这到底是导入成功

而这个schemas=system假了之后会报错说 Schema SYSTEM was not found.

这是为什么

Other related posts:

  • » [ocp0531] 答复: [ocp0531] 关于 inpdp - Jianjun Li