How to Restrict Schema Access to Specific IP Address & user? I want to lock down access to specific schemas. Restrict the access to specific users when the connection is made from the specific  IP addresses.
Eg Only Access to USER1 and USER2
An AFTER LOGON trigger can be used for this purpose.

CREATE OR REPLACE TRIGGER system.check_ip_addresses 
AFTER LOGON 
ON DATABASE
BEGIN 
IF USER IN ('USER1', 'USER2') THEN
IF SYS_CONTEXT('USERENV', 'IP_ADDRESS') NOT IN 
('192.168.0.10','192.168.0.11') THEN
  RAISE_APPLICATION_ERROR(-20000, 'Can not log in from this IP address (' || 
l_ip_address || ')');
END IF;
END IF;
END; 
 /


Remember the following points.


The trigger must use ON DATABASE, as making it schema specific would prevent the RAISE_APPLICATION_ERROR from preventing the logon.
The trigger will fire for all connection attempts, so make sure you restrict which users it affects carefully to reduce the overhead.