CREATE OR REPLACE TRIGGER ip_restrict
AFTER LOGON ON DATABASE
DECLARE
v_user VARCHAR2 (30);
BEGIN
SELECT USER
INTO v_user
FROM DUAL;
IF v_user = 'SCOTT' THEN
IF SYS_CONTEXT ('USERENV', 'IP_ADDRESS') NOT IN ('IP1', 'IP2') THEN
raise_application_error (-20001, 'Access restricted for this IP');
END IF;
END IF;
END;
Windows Recall : How to disable spy mode
4 days ago
No comments:
Post a Comment