Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Got Ora-28112 failed to execute policy function error, please help

324771Dec 2 2009 — edited Dec 2 2009
Hi,

I have created the following function:
==============================
create or replace function test_job
return varchar2
as
deptinfo varchar2(100);

begin

deptinfo := 'dept_id=123000';

return(deptinfo);

end test_job;
/
==============================

and the policy:
==============================
begin
dbms_rls.add_policy(object_schema =>'myself',
object_name => 'myself_account_info',
policy_name =>'test_policy',
function_schema => 'myself',
policy_function => 'test_job');
end;
/
==============================

While I execute the sql statement
'select * from myself_account_info';

I got this ora-28112 error. Could anyone help me to pinpoint the problems?
Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 30 2009
Added on Dec 2 2009
5 comments
8,138 views