导出 Oracle 数据库,将其导入不同的用户,存储过程不起作用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2014098/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Export an Oracle database, import it to a different user, stored procedures don't work
提问by Paul Tomblin
I export an oracle "schema" using
我使用导出一个 oracle“模式”
exp userid=/ file=pt.dmp log=pt.log owner=FOO buffer=10000000 statistics=NONE direct=Y
and then import it into a different schema on the same oracle instance on the same SID using
然后使用
imp userid=/ file=pt.dmp fromuser=FOO touser=paul
When I try to access the stored procedures with the new user, I get
当我尝试使用新用户访问存储过程时,我得到
ORA-29541: class PAUL.ESMQOracleStoredProc could not be resolved
Any idea why one user can resolve this but another one can't?
知道为什么一个用户可以解决这个问题而另一个用户不能吗?
回答by APC
The error message indicates that this is a javastored procedure. So it requires java permissions. The CREATE PROCEDURE
privilege won't cover it. For starters FOO will need JAVAUSERPRIV
as well, so perhaps this is what PAUL lacks?
错误消息表明这是一个java存储过程。所以它需要java权限。该CREATE PROCEDURE
权限将不会覆盖它。首先 FOO 也需要 JAVAUSERPRIV
,所以也许这就是 PAUL 所缺乏的?
In addition, if that JSP does anything esoteric it will require additional privileges granted through dbms_java.grant_permission()
. You can find that out by using the DBA_JAVA_POLICY viewto compare granted permissions for PAUL and FOO.
此外,如果该 JSP 执行任何深奥的操作,则需要通过dbms_java.grant_permission()
. 您可以通过使用DBA_JAVA_POLICY 视图比较 PAUL 和 FOO 的授予权限来发现这一点。