Document Type | Troubleshooting
Category | Administration
Applicable Product Version | 7FS02PS
Document Number | TADTS033
Issue
When performing UNLOCK on a locked account, the LAST_LOGIN column in DBA_USERS is updated.
Scenario
SQL> create user u5 identified by 'u5';
User 'U5' created.
SQL> grant resource to u5;
Granted.
SQL> set time on
14:00:31 SQL> set timing on
14:00:37 SQL> col username for a20
14:00:53 SQL> col last_login for a20
14:01:44 SQL> select username, ACCOUNT_STATUS, LAST_LOGIN from dba_users where username = 'U5';
USERNAME ACCOUNT_STATUS LAST_LOGIN
-------------------- ------------------------------ --------------------
U5 OPEN
1 row selected.
Total elapsed time 00:00:00.000464
14:01:57 SQL> alter user u5 account lock;
User 'U5' altered.
Total elapsed time 00:00:00.009598
14:03:09 SQL> select username, ACCOUNT_STATUS, LAST_LOGIN from dba_users where username = 'U5';
USERNAME ACCOUNT_STATUS LAST_LOGIN
-------------------- ------------------------------ --------------------
U5 LOCKED
1 row selected.
Total elapsed time 00:00:00.000657
14:04:24 SQL> alter user u5 account unlock;
User 'U5' altered.
Total elapsed time 00:00:00.004211
14:04:31 SQL> select username, ACCOUNT_STATUS, LAST_LOGIN from dba_users where username ='U5';
USERNAME ACCOUNT_STATUS LAST_LOGIN
-------------------- ------------------------------ --------------------
U5 OPEN 2025/02/26 14:04:31.
000000000 Asia/Seoul
1 row selected.
Total elapsed time 00:00:00.000543
Cause
The existing logic is designed so that when UNLOCK is performed on a USER account, the LOGIN_DATE is updated.
Solutions
A patch (FS02PS_338235a) has been applied to modify the behavior so that LOGIN_DATE is not updated when unlocking a USER account.
CautionThe patch is applied through technical support provided by TmaxTibero.