GRANT SELECT ON Error 'ORA-01917

在从一台Oracle通过imp命令结合*.dmp文件导入到另一个数据库中,由于options参数设置问题,会出现如下问题:

 

 

 

Error 'ORA-01917: user or role 'FTIQA' does not exist' when importing Controller Oracle database

<!--BEGIN MAIN BODY CONTENT-->

 

<!--BEGIN CONTENT--><!-- ******** PASTE MAIN BODY CONTENT HERE ******** -->
Technote (troubleshooting)
 
Problem(Abstract)
Oracle DBA tries to import Controller user/schema into Oracle database, using a command similar to the following:

imp <a href="mailto:system/password@databasename">system/password@databasename</a> file=exp_SOURCEUSERNAME.dmp log=DESTINATION_USERNAME-imp.log
fromuser=SOURCEUSERNAME touser=DESTINATION_USERNAME

DBA receives error message.
 
Symptom
Connected to: Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production

Export file created by EXPORT:V09.02.00 via conventional path

Warning: the objects were exported by ADMIN_USERNAME, not by you

import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
export client uses WE8ISO8859P1 character set (possible charset conversion)
. importing SOURCEUSERNAME's objects into DESTINATION_USERNAME
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT SELECT ON "CCOJ_ICMPNJRNLS_GTCSMMTN_ALS" TO "FTIQA""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'FTIQA' does not exist
IMP-00017: following statement failed with ORACLE error
1917:
"GRANT SELECT ON "CCOJ_ICMPNJRNLS_GTCSMMTN_SM" TO "FTIQA""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'FTIQA' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT SELECT ON "CCOJ_ICMPNJRNLS_GTCSMMTN_SMD" TO "FTIQA""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'FTIQA' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT SELECT ON "CCOJ_ICMPNJRNLS_JRNLS_ALS" TO "FTIQA""
IMP-00003: ORACLE error 1917 encountered...
 
 
Cause
The environment from where the original backup (export / .DMP) file was created is using the (optional) Oracle feature which creates additional grants on objects in the Controller schema.
 
 
Resolving the problem
Import the user, but this time use the optional switch grants=no.

Steps:Modify your import script, to something similar to:

imp system/password@databasename file=exp_SOURCEUSERNAME.dmp log=DESTINATION_USERNAME-imp.log fromuser=SOURCEUSERNAME touser=DESTINATION_USERNAME grants=no

 

 

 


 from IBM

以上一个例子和我遇到的大同小异,上边分析中有原因也有解决方法,仅供参考(其中最主要就是grants=no这个参数)。

你可能感兴趣的:(oracle,IBM)