PLS-00201和IMP-00013

春节上班的第二天,在导入一个用户数据的时候,发现一个报错:

 

IMP-00058: ORACLE error 6550 encountered
ORA-06550: line 1, column 7:
PLS-00201: identifier 'SYS.DBMS_EXPORT_EXTENSION' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
IMP-00000: Import terminated unsuccessfully

 

巡查环境,发现数据库oracle被安全加固(各种限制sys用户下的东西不让普通用户使用)了

 

解决方法:

GRANT EXECUTE ON SYS.DBMS_DEFER_IMPORT_INTERNAL TO <user_name>;

GRANT EXECUTE ON SYS.DBMS_EXPORT_EXTENSION TO <user_name>;

 

开始重新导入,又有报错

Enter insert buffer size (minimum is 8192) 30720>

Export file created by EXPORT:V11.01.00 via conventional path
IMP-00013: only a DBA can import a file exported by another DBA
IMP-00000: Import terminated unsuccessfully

猜想又是安全加固搞的鬼,导致权限缺失

解决方法:

grant dba to <user_name>;

 

开始重新导入,又有报错:

IMP-00017: following statement failed with ORACLE error 6550:
 "BEGIN   DBMS_JOB.ISUBMIT(JOB=>67,WHAT=>'P_ADD_PARTITION_WAREID;',NEXT_DATE="
 ">TO_DATE('2014-02-12:00:00:00','YYYY-MM-DD:HH24:MI:SS'),INTERVAL=>'trunc(sy"
 "sdate + 1)',NO_PARSE=>TRUE); END;"
IMP-00003: ORACLE error 6550 encountered
ORA-06550: line 1, column 9:
PLS-00201: identifier 'DBMS_JOB' must be declared
ORA-06550: line 1, column 9:
PL/SQL: Statement ignored
Import terminated successfully with warnings.


猜想又是安全加固搞的鬼,导致权限缺失

 

解决办法:

GRANT EXECUTE ON SYS.DBMS_JOB TO <user_name>;

 

总结:

1. GRANT EXECUTE ON SYS.DBMS_EXPORT_EXTENSION TO wsj;
2. GRANT DBA TO wsj;
3. GRANT EXECUTE ON SYS.DBMS_JOB TO wsj;

你可能感兴趣的:(PLS-00201和IMP-00013)