PL/SQL (MOSC)

MOSC Banner

oracle logon trigger

edited Nov 20, 2014 10:04AM in PL/SQL (MOSC) 15 commentsAnswered

Want to write oracle logon trigger, which will check record from below tables. if record not found then user session will not authorized.

Create table authorised_ips

(ip_address varchar2(20));

how to do this?

without using table logon trigger as below

CREATE OR REPLACE TRIGGER rds_logon_trigger

AFTER LOGON ON DATABASE

BEGIN

IF SYS_CONTEXT('USERENV','IP_ADDRESS') not in ('192.168.2.121','192.168.2.123','192.168.2.233') THEN

RAISE_APPLICATION_ERROR(-20003,'You are not allowed to connect to the database');

END IF;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center