Oracle – How to grant to stored procedure, privileges to select from a different schema

grantoracleoracle10gplsqlschema

I need that the user does not have access to another scheme, but the stored procedure could access a different schema.

Best Answer

What you are describing is not possible.

If b.procedure can select, insert, update or delete on a.table, then anyone logged in as b could do so too.

What you should do instead is create procedure a.procedure and grant execute on a.procedure to b.