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: Invalid log-in to the system

Re: Invalid log-in to the system

From: <fitzjarrell_at_cox.net>
Date: 6 Feb 2007 20:11:30 -0800
Message-ID: <1170821490.474823.239010@v33g2000cwv.googlegroups.com>


On Feb 6, 8:29 pm, "sandeep" <hyd.sand..._at_gmail.com> wrote:
> Hi All,
>
> I need to take a report on the invalid log in to the system every
> week, is there a way to identify this from any of the dictionary
> tables available in Oracle 10g release 2.
>
> Thanks in Advance.
> - Sandeep

You'll need something like this in place to generate such data:

drop trigger log_errors_trig;
drop table log_errors_tab;

create table log_errors_tab (

	error     varchar2(30),
	timestamp date,
	username  varchar2(30),
        osuser    varchar2(30),
        machine   varchar2(64),
	process   varchar2(9),
	program   varchar2(64));

create or replace trigger log_errors_trig
	after servererror on database
declare
	var_user     varchar2(30);
	var_osuser   varchar2(30);
	var_machine  varchar2(64);
	var_process  varchar2(9);
	var_program  varchar2(64);
begin
	select username, osuser, machine, process, program
	into   var_user, var_osuser, var_machine, var_process, var_program
	from   sys.v_$session
	where  audsid = userenv('sessionid');

	insert into log_errors_tab
	  values(dbms_standard.server_error(1),sysdate,var_user,
	         var_osuser,var_machine,var_process,var_program);
end;
/

Only then can you generate your report.

David Fitzjarrell Received on Tue Feb 06 2007 - 22:11:30 CST

Original text of this message

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