Home » RDBMS Server » Security » Accessing Public Objects
icon14.gif  Accessing Public Objects [message #128964] Thu, 21 July 2005 07:03 Go to next message
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 ;

Re: Accessing Public Objects [message #129247 is a reply to message #128964] Fri, 22 July 2005 14:26 Go to previous message
Barbara Boehmer
Messages: 8922
Registered: November 2002
Location: California, USA
Senior Member
Make sure that execute on dbms_rls is granted directly, not through a role.
Previous Topic: encrypted user name and password
Next Topic: Enforce password change on first login
Goto Forum:
  


Current Time: Thu Sep 23 18:09:21 CDT 2021