I have one class (info.teggy.Logger) already loaded in schema teggy and I want to execute that class from schema scott. How do I grant the execute right to schema scott ?
Is there a way similar to what is usually done for pl/sql packages (i.e. running the following command when connected as teggy "grant execute on PKGLogger to scott") ?
From what I have read so far, it would seem this can be done using Loadjava utility. Unless that cannot be prevented, I don't want to reload the java class in the database and from what I understand, running "loadjava -grant scott Logger.jar" will reload and update the java code in the database.
You can do that using SQL:
For your example, connected as teggy:
grant execute on "info/teggy/Logger" to scott;
No that classes which are using Logger needs a resolver spec to see Logger, except that Logger was loaded with loadjava -s flag. For example, connected as SCOTT:
alter java class "business/MyBusinessClass" resolver ((* SCOTT)(* TEGGY)(* PUBLIC)) authid definer;
Best regards, Marcelo.