How can I set account to EXPIRED(GRACE)?

Hello,
We have database 9i, but our clients are old Forms 4.5 using SQLNet2 and it isnt't able to handle expired passwords. Account status EXPIRED(GRACE) solve my problem, but Oracle doesn't have any commands for it.
Therefore I have to manually update table user$, column ptime and user status after next logon will be EXPIRED(GRACE). But it is very interesting for me that is working only after restart database.
Could anybody explain it? Why I must restart database?
Should I update something else?
Here is detailed example from SQLPLus:
SQL> conn / as sysdba
Connected.
SQL> create profile test_prof limit
2 password_life_time 30
3 password_grace_time 10;
Profile created.
SQL> create user test_user identified by qwerty profile test_prof;
User created.
SQL> grant create session to test_user;
Grant succeeded.
SQL> update user$ set ptime=sysdate-500 where name='TEST_USER';
1 row updated.
SQL> commit;
Commit complete.
SQL> conn test_user/qwerty
Connected. ## NO WARNING, WHY ????
SQL> conn / as sysdba
Connected.
SQL> startup force
ORACLE instance started.
Total System Global Area 210837176 bytes
Fixed Size 454328 bytes
Variable Size 142606336 bytes
Database Buffers 67108864 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> conn test_user/qwerty
ERROR:
ORA-28002: the password will expire within 10 days
Connected.
SQL> spool off
Marian

Try this-- note the PASSWORD_GRACE_TIME & PASSWORD_LIFE_TIME parameters. This specifies that the password expires in 1 day, but that there is a 10 day grace period
CREATE PROFILE "PASSWD"
    LIMIT CPU_PER_SESSION DEFAULT CPU_PER_CALL DEFAULT
    CONNECT_TIME DEFAULT IDLE_TIME DEFAULT SESSIONS_PER_USER
    DEFAULT LOGICAL_READS_PER_SESSION DEFAULT
    LOGICAL_READS_PER_CALL DEFAULT PRIVATE_SGA DEFAULT
    COMPOSITE_LIMIT DEFAULT FAILED_LOGIN_ATTEMPTS DEFAULT
    PASSWORD_LOCK_TIME DEFAULT PASSWORD_GRACE_TIME 10
    PASSWORD_LIFE_TIME 1 PASSWORD_REUSE_MAX DEFAULT
    PASSWORD_REUSE_TIME DEFAULT PASSWORD_VERIFY_FUNCTION DEFAULT
system@jcave > create user expiredPasswd identified by xp profile passwd;
User created.
system@jcave > grant connect, resource to expiredPasswd;
Grant succeeded.
Elapsed: 00:00:00.01
system@jcave > @connect expiredPasswd/xp;
Connected.Now, set the clock on the database ahead to simulate the passage of time...
expiredpasswd> @connect expiredPasswd/xp;
ERROR:
ORA-28002: the password will expire within 10 days
Connected.Justin
Distributed Database Consulting, Inc.
www.ddbcinc.com/askDDBC

Similar Messages

Maybe you are looking for

  • Keyboard not working after water spill

    Ok, so a while back I spilt some water on my MBP and I shut it off immediately and took it in to have it looked at.  I was told it was pretty much hopeless and that it'd be cheaper to buy a new one. So I just left it alone and would periodically test

  • Printout of report

    hi i am tyying to print report.but the printout is coming in landscape formet. i want it should be in portrait.how can i do this...

  • User Exit or BADI  to get the Total Tax Amount in a New PO (ME21M)

    Hi, Can somebody tell me any user exit or BADI I can look at to get the total Tax amount of a new PO, after user press SAVE button and before data is written to tables (EKKO, EKPO etc). Key requirement here is AFTER save button is pressed and before

  • XSan performance

    Hi All, I would very much like to know what speeds you're getting on your XSans. We're setting up such a system to do multiple HD/2K Video streams. The system I'm setting up is an XSan with 4 XRaids, each filled with 14 500Gbytes drives. We're using

  • Best all in 1 B

    What is the best all in 1 B&W printer for Mac's with Lion OS? What is the best all in 1 color Printer for Mac's with LION OS? Thanks