问题描述:
网络链接:https://cn.forums.oracle.com/forums/thread.jspa?messageID=10728244#10728244
环境:RAC11gR2+Redhat6.1
[oracle@bppfedb1 mouse]$ exp BPPF_EAS/xxx BUFFER=64000 FILE='/home/oracle/mouse/exp_bppf_tvs20121126.DMP' log='/home/oracle/mouse/exp_bppf_tvs20121126.log' WNER=BPPF_EAS
Export: Release 11.2.0.3.0 - Production on Tue Nov 27 00:12:16 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security,
OLAP, Data Mining,
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses ZHS16GBK character set (possible charset conversion)
About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user BPPF_EAS
. exporting PUBLIC type synonyms
EXP-00008: ORACLE error 904 encountered
ORA-00904: : invalid identifier
EXP-00000: Export terminated unsuccessfully
使用
expdp BPPF_EAS/xxx directory=DATA_PUMP_DIR dumpfile=exp_bppf_tvs20121126.dmp schemas=BPPF_EAS logfile=exp_bppf_tvs20121126.log
换用expdp可以成功
尝试了几台服务器都遇到这个问题,暂时没有找到问题的原因
解决过程:
1 生成trace 文件
--前提grant dba to bppf_eas;
exp BPPF_EAS/xxx BUFFER=64000 FILE='/home/oracle/mouse/exp_bppf_tvs20121126.DMP' log='/home/oracle/mouse/exp_bppf_tvs20121126.log' WNER=BPPF_EAS trace=y
SELECT value FROM v$diag_info WHERE name='Default Trace File';
可以找到trace文件的目录
2 分析trace文件
发现:
PARSE ERROR #140397199813648:len=301 dep=0 uid=164 ct=3 lid=164 tim=1354631507795143 err=904
SELECT SYNNAM, DBMS_JAVA.LONGNAME(SYNNAM), DBMS_JAVA.LONGNAME(SYNTAB), TABOWN, TABNODE, PUBLIC$, SYNOWN, SYNOWNID, TABOWNID, SYNOBJNO FROM SYS.EXU9PTS WHERE SYNOBJNO IN ( SELECT SYNOBJNO FROM SYS.EXU9TYPT
WHERE TABOBJNO = :1 ) ORDER BY SYNTIME
PARSE ERROR #解析失败 指向 DBMS_JAVA.LONGNAME JAVA对象
查找Metalink应该是权限问题。回想到20号的时候做过权限的回收
revoke execute on sys.dbms_java from public;
可能是这个原因:
select grantee,OWNER,TABLE_NAME,PRIVILEGE from DBA_TAB_PRIVS where TABLE_NAME='DBMS_JAVA';
norows
3 解决方案:
重新授权回去
grant execute on sys.dbms_java to public;
SQL> select grantee,OWNER,TABLE_NAME,PRIVILEGE from DBA_TAB_PRIVS where TABLE_NAME='DBMS_JAVA';
GRANTEE OWNER TABLE_NAME PRIVILEGE
------------------------------ ------------------------------ ------------------------------ ----------------------------------------
PUBLIC SYS DBMS_JAVA EXECUTE
exp BPPF_EAS/xxx BUFFER=64000 FILE='/home/oracle/mouse/exp_bppf_tvs20121126.DMP' log='/home/oracle/mouse/exp_bppf_tvs20121126.log' WNER=BPPF_EAS
导出成功
需要在所有平台数据库上执行授权操作
总结
执行权限回收当初是参考银行卡检测中心给出的回复来做的,对技术细节没有去深入就直接上生产了,造成割接过程中的操作不顺利。后续需要严加控制对生产环境的任何修改
补充:10g上没这个问题,所以最初在10g上参考银行卡检测中心给的回复来做没有发现这个问题。