Bu Blogda Ara

6 Aralık 2011 Salı

Unknow user password is changed to open from expire - dbms_metadata.get_ddl

If application user profile has PASSWORD_LIFE_TIME, application user password could be expired. If you don't know old password, you can reopen account like that:


SQL> set linesize 1000
SQL> create user user_pass identified by "password" ;
User created.
SQL> alter user user_pass PASSWORD  expire;
User altered.
SQL> select username,ACCOUNT_STATUS from dba_users where username='USER_PASS';
USERNAME                       ACCOUNT_STATUS
------------------------------ --------------------------------
USER_PASS                      EXPIRED
SQL> select dbms_metadata.get_ddl('USER', username) || ';' usercreate from dba_users where username='USER_PASS';
USERCREATE
--------------------------------------------------------------------------------
   CREATE USER "USER_PASS" IDENTIFIED BY VALUES 'S:1E268627E76ACBE2A0C750D4FF86C6685514BEE0656BABDA251615E2E9BD;FDFAC641632E49E9'
      DEFAULT TABLESPACE "USERS"
      TEMPORARY TABLESPACE "TEMP"
      PASSWORD EXPIRE;
SQL> ALTER USER "USER_PASS" IDENTIFIED BY VALUES 'S:1E268627E76ACBE2A0C750D4FF86C6685514BEE0656BABDA251615E2E9BD;FDFAC641632E49E9';
User altered.
SQL> select username,ACCOUNT_STATUS from dba_users where username='USER_PASS';
USERNAME                       ACCOUNT_STATUS
------------------------------ --------------------------------
USER_PASS                      OPEN

Hiç yorum yok:

Yorum Gönderme