If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

CREATE OR REPLACE TRIGGER logon_from_linux
AFTER
ON
REFERENCING NEW AS NEW OLD AS OLD
declare
W_NAME varchar2(20);
W_IP varchar2(20);
begin
select Sys_Context('USERENV','SESSION_USER') into W_NAME from dual;
select Sys_Context('USERENV','IP_ADDRESS') into W_IP from dual;
if W_NAME != 'LARRY' and W_IP = '567.79.117.6' then
insert into LINUX_LOGIN values(W_NAME,W_IP,sysdate);
RAISE_APPLICATION_ERROR(-20111, 'Sorry, you are not allowed here!');
end if;
end;
/