Devi creare un nuovo profilo utente (o modificarne uno esistente) come questo:
CREATE PROFILE SHORT_LIFE_PROFILE LIMIT
PASSWORD_LIFE_TIME 1/24/60/60 --> = 1 second
PASSWORD_GRACE_TIME 1/24; --> = 1 hour
ALTER USER rdj7 PROFILE SHORT_LIFE_PROFILE;
Per ottenere ACCOUNT_STATUS = EXPIRED(GRACE)
devi accedere con questo utente, altrimenti lo stato non cambia.
C:\>sqlplus rdj7/*****@yourDB
SQL*Plus: Release 11.2.0.1.0 Production on Fri Mar 10 10:09:29 2017
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-28002: the password will expire within 0 days
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning option
SQL>
Allora dovresti vederlo:
SELECT ACCOUNT_STATUS
FROM DBA_USERS
WHERE USERNAME = 'RDJ7';
ACCOUNT_STATUS
--------------------------------
EXPIRED(GRACE)
1 row selected.