I have a problem in Oracle for where I cann't find a solution.
I have users accessing a database, with an oracle user, but due to some bad coding I cannot change the password. So I want to make some kind of validation when the user tries to logon, and block or not that session!
For example the user that enters by a unix machine can have acess, but when by a NT machine, certain conditions must be validate. (machine name, application, user login).
What is the best solution to do it?
I was thinking in make use of the trigger AFTER LOGON, but can I kill the session? or generate any error that blocks the session?
CREATE OR REPLACE TRIGGER afterlogon
AFTER LOGON on DATABASE
IF sys_context('userenv','Terminal') = 'HALOGENTEACH' THEN
RAISE_APPLICATION_ERROR (-20001, 'You are not allowed to logon from this
Read up on the sys_context function. You will be able to get all the information that you need for your task. Please be aware that afterlogon triggers will NOT lock out anyone with the DBA role. This is to prevent a bad trigger from locking everyone out of the database.
Last edited by beilstwh; 12-15-04 at 09:34.
You do not need a parachute to skydive. You only need a parachute to skydive twice.