【翻譯自mos文章】對dba_users視圖中,account_status列的解釋,dbausers

來源:互聯網
上載者:User

【翻譯自mos文章】對dba_users視圖中,account_status列的解釋,dbausers

對dba_users視圖中,account_status列的解釋

參考原文:
How to Interpret the ACCOUNT_STATUS Column in DBA_USERS (Doc ID 260111.1)

適用於:
Oracle Server - Enterprise Edition - Version 9.2.0.1 to 11.2.0.3 [Release 9.2 to 11.2]
Information in this document applies to any platform.
Checked for relevance on 06-Jan-2013

目的:
本文解釋了dba_users視圖中,account_status列的意義。


細節:

DBA_USERS視圖中的 ACCOUNT_STATUS 列 有如下的值:
select * from user_astatus_map;  -->請注意這個視圖。這個視圖比較有價值。

STATUS# STATUS
---------- --------------------------------
0 OPEN
1 EXPIRED
2 EXPIRED(GRACE)
4 LOCKED(TIMED)
8 LOCKED
5 EXPIRED & LOCKED(TIMED)
6 EXPIRED(GRACE) & LOCKED(TIMED)
9 EXPIRED & LOCKED
10 EXPIRED(GRACE) & LOCKED

如上的這些值是與兩個特性 'Account Locking' and 'Password Aging and Expiration' 直接相關,解釋如下:

1. Account Locking - LOCKED / LOCKED(TIMED)

An account 可以被dba鎖定,也可以在超過失敗嘗試次數之後被自動鎖定。
當 PASSWORD_LOCK_TIME 被定義時,過了此時間之後,account 會被自動取消鎖定:此種情況被標記為 LOCKED(TIMED).
 LOCKED(TIMED) 只要出現了,就能說明:該account的鎖定原因是 錯誤的登陸次數> FAILED_LOGIN_ATTEMPTS
 
如果該account在create or alter的時候被明確鎖定,你只會看到LOCKED


你可能希望 在PASSWORD_LOCK_TIME 被設定為unlimited,並且account 被自動鎖定時,account 的狀態顯示為LOCKED。
但是你希望的這個狀態顯示是不對的:該 account 的狀態依然會顯示 LOCKED(TIMED)
只不過該account永遠不會自動unlock,原因是 the unlimited PASSWORD_LOCK_TIME ---也就是說 lock time 是無期限的(即:永久鎖定)

To add to the confusion, at some point it was decided that even if the account is locked automatically,
we should not set it to LOCKED(TIMED) if the PASSWORD_LOCK_TIME is unlimited, since in that case the account would never automatically unlock,
this would give up on a crucial piece of information, namely if the account was locked manually or automatically, this change was introduced in 11.2.0.1.
However this change caused a regression in Bug 9693615 causing the lock_date to be NULL in dba_users in case the account was locked automatically, the fix to this bug backed out the change again and now we have the LOCKED(TIMED) for automatically locked accounts back with this fix.

因此,我們知道當 ACCOUNT_STATUS 的值是  LOCKED(TIMED) 時, lock是 失敗登陸嘗試的結果,即使lock will not expire
在11.2.0.1 (without the fix to Bug 9693615) 中,你可以驗證 如果account被自動鎖定,看dba_users視圖中lock_date列是null的。

2. Password Expiration - EXPIRED / EXPIRED(GRACE)

無論有沒有 grace period,一個password 都可以被設定為expire。當一個password expired 並且沒有grace被定義時,該password被設定為EXPIRED,EXPIRED的含義是該user 在下一次登入時會被提示輸入新的密碼。

當grace被定義時,在grace period期間內,一個警告(warning)被發出,並且ACCOUNT_STATUS 會被置為EXPIRED(GRACE).


結論:
Password Expiration and Account Locking 是兩個獨立的特性:
一個account 不會由於 超過expire 或者 grace time 被 lock住。

一個既沒有expired,也沒有被lock的 account 顯示是open(status#為0),因為account locking (基於錯誤的登陸次數)和 expiration (基於沒有修改密碼)從根本上說是沒有關係的。

In addition to the EXPIRED (1,2) and LOCKED (4,8) bits being set, you can
have combinations of both with STATUS# 5,6,9 and 10: internally the
STATUS# are added for the combinations of expired and locked.

For example :

'EXPIRED' + 'LOCKED' = 1 + 8 = 9 = 'EXPIRED & LOCKED'

 

 

 


oracle中的dba_tablespaces,dba_users,user_tables裡面都是什資料

dba_tablespaces為所有資料表空間資訊。

dba_users 為所有的資料庫使用者資訊。

user_tables為目前使用者的所有表資訊。
 
oracle資料庫中涉及到使用者權限的三個表,dba_users,all_users,user_users有什不同

dba_開頭的是查全庫所有的,all_開頭的是查目前使用者可以看到的,user_開頭的是查目前使用者的
 

相關關鍵詞:
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.