Saturday, September 6, 2008

Firewall trigger ?

Unfortunately this did not work because ora_client_ip_address is null :(

REATE OR REPLACE TRIGGER firewall_trig
AFTER LOGON
ON DATABASE
BEGIN
if NVL(ora_client_ip_address, 'N/A') like '111.111.111%' then
raise_application_error(-20000,'Your IP address is not allowed to login');
end if;
END firewall_trig;
/