在做一個實驗,發現原來的user,失效了,如何處理呢
[oracle@croracle01 ~]$ sqlplus ractest/password 
SQL*Plus: Release 11.1.0.6.0 - Production on Sat Nov 14 01:55:18 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
ERROR:   
ORA-28002: the password will expire within 7 days
問題原因:
SQL*Plus
[oracle@croracle01 ~]$ oerr ora 28002   
28002, 00000, "the password will expire within %s days"    
// *Cause:   The user's account is about to about to expire and the password    
//           needs to be changed    
// *Action:  change the password or contact the DBA    
//
Release 11.1.0.6.0 - Production on Sat Nov 14 01:56:34 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:   
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production    
With the Partitioning, Real Application Clusters, OLAP, Data Mining    
and Real Application Testing options 
SQL> select profile from dba_users where username='RACTEST';
PROFILE   
------------------------------    
DEFAULT
SQL> select LIMIT, RESOURCE_NAME from dba_profiles where RESOURCE_NAME in ('PASSWORD_GRACE_TIME','PASSWORD_LIFE_TIME','PASSWORD_REUSE_MAX','PASSWORD_REUSE_TIME') and PROFILE=(select profile from dba_users where username='RACTEST');
LIMIT                                    RESOURCE_NAME   
---------------------------------------- --------------------------------    
180                                      PASSWORD_LIFE_TIME    
UNLIMITED                                PASSWORD_REUSE_TIME    
UNLIMITED                                PASSWORD_REUSE_MAX    
7                                        PASSWORD_GRACE_TIME 
SQL>
應該是過期了
SQL> select ctime, ptime from sys.user$ where name='RACTEST';
CTIME     PTIME   
--------- ---------    
15-MAY-09 15-MAY-09 
SQL>
也可以這樣:
SQL> SELECT CREATED FROM DBA_USERS WHERE USERNAME = 'RACTEST';
CREATED   
---------    
15-MAY-09 
SQL>
問題的解決方法一: change password
SQL> conn ractest/password    
ERROR:    
ORA-28002: the password will expire within 7 days 
Connected.   
SQL> password    
Changing password for RACTEST    
Old password:    
New password:    
Retype new password:    
Password changed    
SQL>
SQL> select ctime, ptime from sys.user$ where name='RACTEST';
CTIME     PTIME   
--------- ---------    
15-MAY-09 14-NOV-09
另一個比較徹底的辦法就是不限制用戶的使用時間:
SQL> alter profile default limit password_life_time unlimited;
Profile altered.
SQL> select LIMIT, RESOURCE_NAME from dba_profiles where RESOURCE_NAME in ('PASSWORD_GRACE_TIME','PASSWORD_LIFE_TIME','PASSWORD_REUSE_MAX','PASSWORD_REUSE_TIME') and PROFILE=(select profile from dba_users where username='RACTEST');
LIMIT                                    RESOURCE_NAME   
---------------------------------------- --------------------------------    
UNLIMITED                                PASSWORD_LIFE_TIME    
UNLIMITED                                PASSWORD_REUSE_TIME    
UNLIMITED                                PASSWORD_REUSE_MAX    
7                                        PASSWORD_GRACE_TIME 
SQL>
參考:http://arjudba.blogspot.com/2008/07/solution-of-ora-28002-password-will.html
 
 
 博文
博文
 
 
没有评论:
发表评论