oracle 使用者登入相關

tian1982tian發表於2012-06-20

oracle 9I:
資料庫使用者登陸10次以上使用者不被鎖,且在user$檢視裡的登陸錯誤資訊也沒有
SQL> conn hr/hr1
ERROR:
ORA-01017: invalid username/password; logon denied


Warning: You are no longer connected to ORACLE.
SQL> conn hr/hr1
ERROR:
ORA-01017: invalid username/password; logon denied


SQL> conn hr/hr1
ERROR:
ORA-01017: invalid username/password; logon denied


SQL> conn hr/hr1
ERROR:
ORA-01017: invalid username/password; logon denied


SQL> conn hr/hr1
ERROR:
ORA-01017: invalid username/password; logon denied


SQL> conn hr/hr1
ERROR:
ORA-01017: invalid username/password; logon denied


SQL> conn hr/hr1
ERROR:
ORA-01017: invalid username/password; logon denied


SQL> conn hr/hr1
ERROR:
ORA-01017: invalid username/password; logon denied


SQL> conn hr/hr1
ERROR:
ORA-01017: invalid username/password; logon denied


SQL> conn hr/hr1
ERROR:
ORA-01017: invalid username/password; logon denied


SQL> conn hr/hr1
ERROR:
ORA-01017: invalid username/password; logon denied


SQL>  select name,lcount
  2  from user$
  3  where name='HR';

NAME                               LCOUNT
------------------------------ ----------
HR                                      0

SQL> /

NAME                               LCOUNT
------------------------------ ----------
HR                                      0

SQL> /

NAME                               LCOUNT
------------------------------ ----------
HR                                      0

SQL> /

NAME                               LCOUNT
------------------------------ ----------
HR                                      0

SQL>

oracle 10G:
資料庫使用者登陸10次以上使用者被鎖,且在user$檢視裡的登陸錯誤資訊被記錄

SQL> conn bdi/bdi
Connected.
SQL> conn bdi/12
ERROR:
ORA-01017: invalid username/password; logon denied


Warning: You are no longer connected to ORACLE.
SQL> conn bdi/890
ERROR:
ORA-01017: invalid username/password; logon denied


SQL> conn bdi/12
ERROR:
ORA-01017: invalid username/password; logon denied


SQL> conn bdi/12
ERROR:
ORA-01017: invalid username/password; logon denied


SQL> conn bdi/12
ERROR:
ORA-01017: invalid username/password; logon denied


SQL> conn bdi/12
ERROR:
ORA-01017: invalid username/password; logon denied


SQL> conn bdi/12
ERROR:
ORA-01017: invalid username/password; logon denied


SQL> conn bdi/12
ERROR:
ORA-01017: invalid username/password; logon denied


SQL> conn bdi/12
ERROR:
ORA-01017: invalid username/password; logon denied


SQL> conn bdi/12
ERROR:
ORA-01017: invalid username/password; logon denied


SQL> conn bdi/12
ERROR:
ORA-28000: the account is locked

SQL> select name,lcount
  2  from user$
  3  where name='BDI';

NAME                               LCOUNT
------------------------------ ----------
BDI                                     0

SQL> /

NAME                               LCOUNT
------------------------------ ----------
BDI                                     1

SQL> /

NAME                               LCOUNT
------------------------------ ----------
BDI                                     2

SQL> /

NAME                               LCOUNT
------------------------------ ----------
BDI                                    10

SQL> /

NAME                               LCOUNT
------------------------------ ----------
BDI                                    10

SQL>

SQL> alter user bdi accouont unlock;
SP2-0640: Not connected
SQL> conn / as sysdba
Connected.
SQL> alter user bdi account unlock;

User altered.

SQL>

在這裡我終於明白了一件事情,好幾次開發來找我說是資料庫連不上,我一使用者連資料庫,就報資料庫使用者被鎖了,
原來是開發把密碼搞錯了,輸入錯誤密碼超過10次以上oracle就會自動的把使用者鎖掉,下次開發的來找可有話說了

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/16400082/viewspace-733462/,如需轉載,請註明出處,否則將追究法律責任。

相關文章