Monday, September 16, 2013

Last Successful Login Time in SQL*Plus in Oracle 12c

If you have been working with Oracle 12c, you may have missed a little something that appeared without mush fanfare but has some powerful implications. Let's see it with a small example--connecting with SQL*Plus.

C:\> sqlplus arup/arup

SQL*Plus: Release 12.1.0.1.0 Production on Mon Aug 19 14:17:45 2013

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Last Successful login time: Mon Aug 19 2013 14:13:33 -04:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL>

Did you note the line in red above?

Last Successful login time: Mon Aug 19 2013 14:13:33 -04:00

That line shows you when you last logged in successfully. The purpose of that little output is to alert you about the last time you (the user ARUP) logged in, very similar to the message you get after logging in to a unix session. If you didn't login earlier, this message will alert you for possible compromise of your account.

Suppression


What if you don't want to show this timestamp?

C:\> sqlplus -nologintime arup/arup

SQL*Plus: Release 12.1.0.1.0 Production on Mon Aug 19 14:23:25 2013

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

The login time has been suppressed, going back to the old behavior.

No comments:

Translate