ORACLE 帳戶 狀態說明
DBA_USERS中的ACCOUNT_STATUS的值有
OPEN
EXPIRED()
LOCKED(TIMED)
LOCKED
EXPIRED & LOCKED(TIMED)
EXPIRED(GRACE) & LOCKED(TIMED)
EXPIRED & LOCKED
EXPIRED(GRACE) & LOCKED
OPEN
EXPIRED()
LOCKED(TIMED)
LOCKED
EXPIRED & LOCKED(TIMED)
EXPIRED(GRACE) & LOCKED(TIMED)
EXPIRED & LOCKED
EXPIRED(GRACE) & LOCKED
大概的給解釋一下open.locked,expired,EXPIRED(GRACE) ,LOCKED(TIMED) ,
其餘幾個概念就是這幾個狀態的組合:-)
1. open 當前是開放的可以使用的.
[color=gray]SQL> select username,account_status from dba_users where username = 'TONGJW';
USERNAME ACCOUNT_STATUS
------------------------------ --------------------------------
TONGJW OPEN
SQL> conn tongjw
Enter password: *******
Connected.
[/color]
2. expired 表示使用者已經過期, 登入的時候, 如果密碼輸入正確,系統會提示重新輸入密碼的.
[color=gray]
SQL> conn jfdata/jf
Connected.
SQL> alter user tongjw account unlock;
User altered.
SQL> alter user tongjw password expire;
User altered.
SQL> conn tongjw
Enter password: *******
ERROR:
ORA-28001: the password has expired
Changing password for tongjw
New password: *******
Retype new password: *******
Password changed
Connected.
[/color]
3. locked 表明當前帳戶被鎖了, 不可以登入的.
[color=gray]
SQL> conn jfdata/jf
Connected.
SQL> alter user tongjw account lock;
User altered.
SQL> conn tongjw
Enter password: *******
ERROR:
ORA-28000: the account is locked
Warning: You are no longer connected to .
[/color]
expired (grace) 與 locked (timed) 是有的profile來進行控制的.
4. expired (grace) 指定一個期限, 到達這個期限的時候,系統會給出一個警告並且允許登入(grace), 如果過了這段期限, 對應的密碼就會自動過期, 相當於我們的密碼過期提醒.
PASSWORD_GRACE_TIME
PASSWORD_LIFE_TIME
Specify the number of days after the grace period begins during which a warning is issued and login is allowed. If the password is not changed during the grace period, the password expires.
[color=gray]
SQL> select username,account_status,profile from dba_users where username = 'TONGJW';
USERNAME ACCOUNT_STATUS PROFILE
------------------------------ -------------------------------- ------------------------------
TONGJW OPEN DEFAULT
SQL> create profile test limit
2 password_life_time 5 password_grace_time 5;
Profile created.
SQL> alter user tongjw profile test;
User altered.
SQL> select username,account_status,profile from dba_users where username = 'TONGJW';
USERNAME ACCOUNT_STATUS PROFILE
------------------------------ -------------------------------- ------------------------------
TONGJW OPEN TEST
SQL> conn tongjw/playboy
Connected.
SQL> /
[/color]
[color=red]這是我們修改系統時間, 將日期往後修改幾天[/color]
[color=gray]
[oracle@TzDbTzcenter2 ]$ su
Password:
[root@TzDbTzcenter2 ]# date
Tue Mar 22 18:42:26 CST 2005
[root@TzDbTzcenter2 ]# date '03281842'
Mon Mar 28 18:42:00 CST 2005
[root@TzDbTzcenter2 ]# exit
[oracle@TzDbTzcenter2 ]$ sqlplus tongjw/tongjw
SQL*Plus: Release 9.2.0.4.0 - Production on Mon Mar 28 18:42:01 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
ERROR:
[b]ORA-28002: the password will expire within 5 days[/b]
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL> conn jfdata/jf
Connected.
SQL> select username,account_status,profile from dba_users where username = 'TONGJW';
USERNAME ACCOUNT_STATUS PROFILE
------------------------------ -------------------------------- ------------------------------
TONGJW EXPIRED(GRACE) TEST
SQL>
[/color]
[color=red]再將日期向後修改幾天, 我們可以看到此時使用者的狀態已經改為Expired[/color]
[color=gray]
[oracle@TzDbTzcenter2 ]$ sqlplus tongjw/tongjw
SQL*Plus: Release 9.2.0.4.0 - Production on Tue Apr 5 18:44:02 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
ERROR:
ORA-28001: the password has expired
Changing password for tongjw
New password:
Retype new password:
ERROR:
ORA-00988: missing or invalid password(s)
Password unchanged
Enter user-name: jfdata/jf
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL> select username,account_status,profile from dba_users where username = 'TONGJW';
USERNAME ACCOUNT_STATUS PROFILE
------------------------------ -------------------------------- ------------------------------
TONGJW EXPIRED TEST
[/color]
5. locked(timed)
PASSWORD_LOCK_TIME
Specify the number of days an account will be locked after the specified number of consecutive failed login attempts.
其餘幾個概念就是這幾個狀態的組合:-)
1. open 當前是開放的可以使用的.
[color=gray]SQL> select username,account_status from dba_users where username = 'TONGJW';
USERNAME ACCOUNT_STATUS
------------------------------ --------------------------------
TONGJW OPEN
SQL> conn tongjw
Enter password: *******
Connected.
[/color]
2. expired 表示使用者已經過期, 登入的時候, 如果密碼輸入正確,系統會提示重新輸入密碼的.
[color=gray]
SQL> conn jfdata/jf
Connected.
SQL> alter user tongjw account unlock;
User altered.
SQL> alter user tongjw password expire;
User altered.
SQL> conn tongjw
Enter password: *******
ERROR:
ORA-28001: the password has expired
Changing password for tongjw
New password: *******
Retype new password: *******
Password changed
Connected.
[/color]
3. locked 表明當前帳戶被鎖了, 不可以登入的.
[color=gray]
SQL> conn jfdata/jf
Connected.
SQL> alter user tongjw account lock;
User altered.
SQL> conn tongjw
Enter password: *******
ERROR:
ORA-28000: the account is locked
Warning: You are no longer connected to .
[/color]
expired (grace) 與 locked (timed) 是有的profile來進行控制的.
4. expired (grace) 指定一個期限, 到達這個期限的時候,系統會給出一個警告並且允許登入(grace), 如果過了這段期限, 對應的密碼就會自動過期, 相當於我們的密碼過期提醒.
PASSWORD_GRACE_TIME
PASSWORD_LIFE_TIME
Specify the number of days after the grace period begins during which a warning is issued and login is allowed. If the password is not changed during the grace period, the password expires.
[color=gray]
SQL> select username,account_status,profile from dba_users where username = 'TONGJW';
USERNAME ACCOUNT_STATUS PROFILE
------------------------------ -------------------------------- ------------------------------
TONGJW OPEN DEFAULT
SQL> create profile test limit
2 password_life_time 5 password_grace_time 5;
Profile created.
SQL> alter user tongjw profile test;
User altered.
SQL> select username,account_status,profile from dba_users where username = 'TONGJW';
USERNAME ACCOUNT_STATUS PROFILE
------------------------------ -------------------------------- ------------------------------
TONGJW OPEN TEST
SQL> conn tongjw/playboy
Connected.
SQL> /
[/color]
[color=red]這是我們修改系統時間, 將日期往後修改幾天[/color]
[color=gray]
[oracle@TzDbTzcenter2 ]$ su
Password:
[root@TzDbTzcenter2 ]# date
Tue Mar 22 18:42:26 CST 2005
[root@TzDbTzcenter2 ]# date '03281842'
Mon Mar 28 18:42:00 CST 2005
[root@TzDbTzcenter2 ]# exit
[oracle@TzDbTzcenter2 ]$ sqlplus tongjw/tongjw
SQL*Plus: Release 9.2.0.4.0 - Production on Mon Mar 28 18:42:01 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
ERROR:
[b]ORA-28002: the password will expire within 5 days[/b]
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL> conn jfdata/jf
Connected.
SQL> select username,account_status,profile from dba_users where username = 'TONGJW';
USERNAME ACCOUNT_STATUS PROFILE
------------------------------ -------------------------------- ------------------------------
TONGJW EXPIRED(GRACE) TEST
SQL>
[/color]
[color=red]再將日期向後修改幾天, 我們可以看到此時使用者的狀態已經改為Expired[/color]
[color=gray]
[oracle@TzDbTzcenter2 ]$ sqlplus tongjw/tongjw
SQL*Plus: Release 9.2.0.4.0 - Production on Tue Apr 5 18:44:02 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
ERROR:
ORA-28001: the password has expired
Changing password for tongjw
New password:
Retype new password:
ERROR:
ORA-00988: missing or invalid password(s)
Password unchanged
Enter user-name: jfdata/jf
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL> select username,account_status,profile from dba_users where username = 'TONGJW';
USERNAME ACCOUNT_STATUS PROFILE
------------------------------ -------------------------------- ------------------------------
TONGJW EXPIRED TEST
[/color]
5. locked(timed)
PASSWORD_LOCK_TIME
Specify the number of days an account will be locked after the specified number of consecutive failed login attempts.
(在PROFILE中設定最大錯誤密碼輸入次數,而被LOCK掉了)
FAILED_LOGIN_ATTEMPTS
Specify the number of failed attempts to log in to the user account before the account is locked.
設定相關的profile屬性^_^.
[color=gray]
SQL> alter user tongjw profile default;
User altered.
SQL> drop profile test;
Profile dropped.
SQL> create profile test limit
2 password_lock_time 5 failed_login_attempts 3;
Profile created.
SQL> alter user tongjw profile test;
User altered.
[/color]
修改系統的時間資訊.
[color=gray]
[root@TzDbTzcenter2 ]# date
Tue Mar 22 18:55:42 CST 2005
[root@TzDbTzcenter2 ]# date '03281855'
Mon Mar 28 18:55:00 CST 2005
[root@TzDbTzcenter2 ]# exit
[oracle@TzDbTzcenter2 ]$ sqlplus jfdata/jf
SQL*Plus: Release 9.2.0.4.0 - Production on Mon Mar 28 18:55:02 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL> conn tongjw/tongjw
Connected.
SQL> conn tongjw/tongj1
ERROR:
ORA-01017: invalid username/password; logon denied
Warning: You are no longer connected to ORACLE.
SQL> conn tongjw/tongj2
ERROR:
ORA-01017: invalid username/password; logon denied
SQL> conn tongjw/tongj3
ERROR:
ORA-01017: invalid username/password; logon denied
SQL> conn tongjw/tongj4
ERROR:
ORA-28000: the account is locked
SQL> conn tongjw/tongjw
ERROR:
ORA-28000: the account is locked
SQL> conn jfdata/jf
Connected.
SQL> select username,account_status,profile from dba_users where username = 'TONGJW';
USERNAME ACCOUNT_STATUS PROFILE
------------------------------ -------------------------------- ------------------------------
TONGJW LOCKED(TIMED) TEST
FAILED_LOGIN_ATTEMPTS
Specify the number of failed attempts to log in to the user account before the account is locked.
設定相關的profile屬性^_^.
[color=gray]
SQL> alter user tongjw profile default;
User altered.
SQL> drop profile test;
Profile dropped.
SQL> create profile test limit
2 password_lock_time 5 failed_login_attempts 3;
Profile created.
SQL> alter user tongjw profile test;
User altered.
[/color]
修改系統的時間資訊.
[color=gray]
[root@TzDbTzcenter2 ]# date
Tue Mar 22 18:55:42 CST 2005
[root@TzDbTzcenter2 ]# date '03281855'
Mon Mar 28 18:55:00 CST 2005
[root@TzDbTzcenter2 ]# exit
[oracle@TzDbTzcenter2 ]$ sqlplus jfdata/jf
SQL*Plus: Release 9.2.0.4.0 - Production on Mon Mar 28 18:55:02 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL> conn tongjw/tongjw
Connected.
SQL> conn tongjw/tongj1
ERROR:
ORA-01017: invalid username/password; logon denied
Warning: You are no longer connected to ORACLE.
SQL> conn tongjw/tongj2
ERROR:
ORA-01017: invalid username/password; logon denied
SQL> conn tongjw/tongj3
ERROR:
ORA-01017: invalid username/password; logon denied
SQL> conn tongjw/tongj4
ERROR:
ORA-28000: the account is locked
SQL> conn tongjw/tongjw
ERROR:
ORA-28000: the account is locked
SQL> conn jfdata/jf
Connected.
SQL> select username,account_status,profile from dba_users where username = 'TONGJW';
USERNAME ACCOUNT_STATUS PROFILE
------------------------------ -------------------------------- ------------------------------
TONGJW LOCKED(TIMED) TEST
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7728585/viewspace-591187/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- PHP 有限狀態機使用說明PHP
- HTTP 常見狀態碼說明HTTP
- Oracle Latch 說明Oracle
- oracle orapwd使用說明Oracle
- 【ROWID】Oracle rowid說明Oracle
- 隨筆:MySQL 查詢事務狀態欄位說明MySql
- Elasticsearch 叢集和索引健康狀態及常見錯誤說明Elasticsearch索引
- Fiddler(二)Fiddler操作介面[工具條]和[底部狀態皮膚]說明
- MySQL:關於RR模式下insert..selcet sending data狀態說明MySql模式
- Oracle Table建立引數說明Oracle
- Oracle 官方文件 結構說明Oracle
- 【ORACLE】Oracle常用SQL及重點功能說明OracleSQL
- Oracle buffer狀態深入剖析Oracle
- RU 和 RUR oracle補丁說明Oracle
- 【NETWORK】Oracle RAC 心跳地址配置說明Oracle
- Bytom交易說明(賬戶管理模式)模式
- Oracle SCN健康狀態檢查Oracle
- 【MEMORY】Oracle 共享池堆簡單說明Oracle
- 【UNDO】Oracle系統回滾段說明Oracle
- 【TABLESPACE】Oracle 表空間結構說明Oracle
- 【PDB】Oracle 建立pdb說明(create pluggable database)OracleDatabase
- 【偏理論】Flink1.11 狀態後端說明及部分原始碼閱讀後端原始碼
- 簡說設計模式——狀態模式設計模式
- 擁有帳戶檔案
- oracle18c資料庫特性說明Oracle資料庫
- Oracle Exadata X8 Hardware DataSheet (配置說明)Oracle
- 動態開點線段樹說明
- 舉例說明表格中如何再巢狀表格巢狀
- 【ORACLE21C】Oracle21c 只讀目錄說明Oracle
- oracle RAC 診斷叢集狀態命令Oracle
- Oracle DG資料庫狀態轉換Oracle資料庫
- Oracle安裝光碟內容的檔案說明Oracle
- oracle自帶指令碼說明(rdbms,ctx,sqlplus,javavm)Oracle指令碼SQLJava
- OPC客戶端開發工具WTopcclient補充說明客戶端client
- Oracle DG 管理Broker配置成員的狀態Oracle
- Oracle11gR2 Smart Flash Cache測試說明Oracle
- 【PROFILE】Oracle11g密碼複雜度說明Oracle密碼複雜度
- Oracle邏輯備份與恢復選項說明Oracle
- 從 Redux 說起,到手寫,再到狀態管理Redux