If you would like you use Oracle Fine Grained Auditing with some audit condition , do not write condition with multiple arguments.It is not possible to use AND,OR , IN operators in audit condition.If it is used , ORA-28138 error will be thrown.
To avoid this a simple function which returns single value is written into audit_condition and checked its value.
Before function audit_condition was like ,
SYS_CONTEXT('USERENV','HOST') <> 'myhost' and SYS_CONTEXT('USERENV','user') <>'TEST'
New function,
function isConditionValid return number is
i number;
begin
if SYS_CONTEXT('USERENV','HOST') <> 'myhost' and SYS_CONTEXT('USERENV','user') <>'TEST'
i:=1;
else
i:=0;
end if;
return i;
end;
New audit_condition,
isConditionValid=1
No comments:
Post a Comment