Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to save username from a failed login.

Re: How to save username from a failed login.

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sun, 16 Sep 2001 14:17:57 +0200
Message-ID: <tq964730la27d@news.demon.nl>

"I hate Spam" <tbf_at_cn.stam.dk> wrote in message news:e8s6qt0tjaprh2au3ecj3fr8bf520ebf78_at_4ax.com...
> I need to save the typed user name from a failed login, be it a valid
> or invalid user name for the database.
> So far I have made a trigger to catch the event, but where can I find
> the user name?
> The following trigger catches the event all right, but just stores an
> empty string.
>
> create trigger system.login_errors after server error on database
> begin
> if (is_servererror(1017)) then
> insert into baktus.logerrors
> (select sys.login_user from dual);
> end if;
> end;
>
> Oracle 8.1.6 SE on Win NT 4.0 SP6a
>
> Yours Hans Erik Busk
> tbf_at_cn.stam.dk

AUDIT will save the username allright. You need to set the init.ora parameter audit_trail to db (and bounce the database) and then issue audit connect

this will audit both successful and unsuccessful attempts, and has been available since Oracle 6.0 at least.

Also I would *never ever* create triggers using the SYSTEM user as owner. Also you didn't create a login_user function under SYS didn't you? IMO you are compromising the database integrity using SYS and SYSTEM for your own objects.

Regards,

Sybrand Bakker, Senior Oracle DBA Received on Sun Sep 16 2001 - 07:17:57 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US