Re: On 9i and 10g, When an Oracle User Last Accessed the Database?
Date: Fri, 28 Aug 2009 11:21:05 -0700 (PDT)
On Aug 28, 11:10 am, "if_inves..._at_yahoo.com" <basis_consult..._at_hotmail.com> wrote:
> On Oracle 10g and 9i, is there a way to find out when a given user
> last accessed the
In '10g' this is fairly easy; in the init.ora file set
then restart the database. While still connected as SYS type:
and you're done as userid and logoff$time is populated in SYS.AUD$ (along with other bits of information). To report the last logoff for a user:
select userid, max(nvl(logoff$time, sysdate)) last_logoff
group by userid;
All users who have connected and disconnected or who are still connected will be reported (those still connected will display a last_logoff value of sysdate).
With '9i' you'll need two triggers and a table to do this; read here:
to see a script to create a table, logon and logoff triggers to provide that information.
David Fitzjarrell Received on Fri Aug 28 2009 - 13:21:05 CDT