Log unsuccessful attemps connecting to database+Oracle error
BugsJul 24 2006 — edited Jul 24 2006Hi,
I've a simple trigger to log all user's unsuccessful attempts to connect to a database for the oracle error:ora-1017( invalid username/password when trying to login)
CREATE TABLE connection_audit (
login_date DATE,
username VARCHAR2(30));
-- trigger to trap unsuccessful logons
CREATE OR REPLACE TRIGGER T_LOGON_FAILURES
AFTER SERVERERROR
ON DATABASE
BEGIN
IF (IS_SERVERERROR(1017)) THEN
INSERT INTO connection_audit
(login_date, username)
VALUES
(SYSDATE, 'ORA-1017');
END IF;
END T_LOGON_FAILURES;
Now, I would've to log the unsuccessful attempts due to whatever Oracle error, along with the oracle error.
Can someone help me with the code changes?
Thanks,
Bhagat