October 21, 2024
Chicago 12, Melborne City, USA
SQL

ORA-01031 : Cross Schema Procedure Execution Issue


I have three schemas META, DATA and a Custom schema in an Oracle DB.
I’ve declared one simple procedure in META schema.

CREATE OR REPLACE PROCEDURE TEST1 ( v_name IN VARCHAR2 ) IS
BEGIN
DBMS_OUTPUT.PUT_LINE('Hello, ' || v_name);
END TEST1;
/

I haven’t given any grants on DATA or CUSTOM schema for this procedure.
When i try to run this procedure in DATA schema as META.TEST1 it works.
But when I try the same in CUSTOM schema i’m getting "insufficient privileges"

The procedure is using Definer’s Rights.
I can also see that EXECUTE ANY PROCEDURE is granted as a system privilege to both the DATA and CUSTOM schema.

Both the DATA and CUSTOM schema has same session priveleges and same roles priveleges assigned to them. They also have many synonyms from the META schema.

I want to know why its working for DATA but not for CUSTOM schema.

I’ve tried my best to find the differnce between any priveleges but I’m unable to find one.
All the queries results in them being alsmost similar in nature with regards to priveleges.



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video