Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Log unsuccessful attemps connecting to database+Oracle error

BugsJul 24 2006 — edited Jul 24 2006
Hi,
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2006
Added on Jul 24 2006
15 comments
1,867 views