I'm facing to a problem with PL/SQL stored procedure. I have a single SP, named sp1, which i deployed to my oracle schema using ODT for VS2010 and i can execute with no problems.
The problem is pulled out when i try to execute sp1 from another stored procedure named sp2 already present in the schema before the deployment(i add the call to sp1 in the sp2's body and call sp2 directly from the same schema). In this way all i get is a ORA-01031 insufficient privileges
exception.
I googled and found that the problem is due to the lack of the clause AUTHID CURRENT_USER
in the CREATE PROCEDURE
statement. I created another stored procedure named sp3 in another package with that clause and inserted in it the call to sp1. With this modify the execution works.
create or replace procedure sp3(string param)
authid current_user
as
begin
sp1(param);
end;
Unfortunately i can't accept this solution becouse i must use the already present package (there are at least M applications that use sp2 procedure and adding sp3 or sp1 directly in every one is obviusly impossible). I use version 11 for both oracle server and client.
Any ideas?