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

Home -> Community -> Usenet -> c.d.o.tools -> Re: whos logged in when

Re: whos logged in when

From: ok <j_p_x_at_hotmail.com>
Date: Tue, 08 May 2001 20:30:13 -0000
Message-ID: <tfglqlg2329q86@corp.supernews.com>

Another way for 8i (as you said), create a table and write a logon and logoff (database) trigger to insert a record into this table.

Such as:

create table logonf_log (username varchar2(10), log_date date, on_off varchar2(3)) tablespace users;

create or replace trigger logon_aud
after logon on database
begin
if login_user not in ('SYS','OEM', 'DBSNMP' 'SYSTEM') then
insert into logonf_log values (login_user, sysdate, 'ON'); else
null;
end if;
end;
/

You can figure out the logoff trigger. Then you can show the records in logonf_log table to your boss. Good luck.



OK

Sybrand Bakker wrote:
>
>
>
> "Simon Cunningham" <cs40_at_gre.ac.uk> wrote in message
> news:3AF7C827.C36E0D3E_at_gre.ac.uk...
> > Is there a way to find out how much the database is being accessed by
> > its users??
> > I can think of having a or a trigger quering the v$session view but Im
> > not sure you can do that. Other than that could you have a script
> > running on the server(NT 4 with a 8i db)???
> >
> > I have to show the bosses how busy our db's are accessed
> >
> > Thanks in advance
> >
>
> Fortunately you can't have triggers on any v$ object.
> Few ideas:
> run utlbstat and utlestat, utlestat is providing a report on how many
 users
> are logged in.
> Of course you can run a script on v$session
> select count(distinct schemaname)
> from v$session
> where type = 'USER'
> you can also enable audit on your database (change audit_trail in
 init.ora
> to true and bounce the database, followed by audit connect whenever
> successful.
> You now have audit records in dba_audit_session.
> You can also write an on schema trigger, which inserts a record in your
 own
> table when the user logs in.
> Just a few ideas...
>
> Regards,
> Sybrand Bakker, Oracle DBA
>
>
>

--
Posted via CNET Help.com
http://www.help.com/
Received on Tue May 08 2001 - 15:30:13 CDT

Original text of this message

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