Accessing Public Objects [message #128964] |
Thu, 21 July 2005 07:03 |
isvijay
Messages: 4 Registered: July 2005 Location: Chennai
|
Junior Member |
|
|
All,
While trying to access dbms_rls package from other schemas in a procedure i am getting the following error "PLS-00201: identifier 'DBMS_RLS' must be declared". But my schema has execute any procedure privilege and the dbms_rls package has a public synonym too.
What else could give me this issue.
sample of my code is
CREATE OR REPLACE PACKAGE BODY Pkg1 AS
PROCEDURE proc1 ()
AS
l_cur INTEGER;
l_stmt VARCHAR2(2000);
t_name VARCHAR2(30) := NULL;
t_count NUMBER;
from_user VARCHAR2(40) := 'xxxx';
t_object_name user_objects.object_name%TYPE;
v_flag BOOLEAN;
BEGIN
DBMS_RLS.ADD_POLICY(from_user, t_object_name, t_object_name, from_user, 'Pkg1.proc2', 'SELECT');
END proc1;
FUNCTION proc2(tab_owner VARCHAR2,tab_name VARCHAR2)
RETURN VARCHAR2 IS
Results VARCHAR2(100);
BEGIN
....
IF t_count1 >= 1 THEN
results := '1=1';
ELSE
results := '1=2';
END IF;
RETURN Results;
END proc2;
END ;
|
|
|
|