Oracle 12c SQL*Plus added additional
information to the display that comes up when you enter
SQL*Plus, showing the last login time for that user ID.
Now by default, the successful last login is displayed for
the user ID when they enter SQL*Plus:
sqlplus scott/tiger
SQL*Plus: Release
12.1.0.1.0 Production on <date of login>
Copyright (c) 1982, 2015, Oracle. All rights reserved.
Last Successful
login time: <last_login>
Connected to:
Oracle Database 12c Enterprise Edition
Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced
Analytics, Real Application Testing
and Unified Auditing options
This option can be disable when you enter sqlplus with
the -nologintime sreument to the sqlplus command:
sqlplus
-nologintime scott/tiger
Reporting on users SQL*Plus activity
This login duration information is also stored in the column
named spare6 of sys.user$ and can be queried in the column
last_login of the dba_users view.
You can get a report of all users and their last
successful login time with this script
col username
format a15
col
last_login format a25
alter session set
NLS_TIMESTAMP_TZ_FORMAT='DD.MM.YYYY HH24:MI:SS';
Session altered.
select
username,
last_login
from
dba_users
order by
username';