Call: +44 (0)1904 557620 Call
Blog

Pete Finnigan's Oracle Security Weblog

This is the weblog for Pete Finnigan. Pete works in the area of Oracle security and he specialises in auditing Oracle databases for security issues. This weblog is aimed squarely at those interested in the security of their Oracle databases.

[Previous entry: "Mark has a good post about the new 10g Release 2 version"] [Next entry: "SYS.USER_ASTATUS_MAP missing values solved"]

Database user account status's in SYS.USER_ASTATUS_MAP



I got an email the other day from someone who asked me if I knew why account status's with key values of 3 and 7 were missing as indicated in the table SYS.USER_ASTATUS_MAP. The table is used to link the numeric status listed in SYS.USER$ to the text description for those status's. I will give the contents of the SYS.USER_ASTATUS_MAP table so you can see what I mean:

SQL> connect sys/change_on_install@sans as sysdba
Connected.
SQL> desc sys.user_astatus_map
Name Null? Type
----------------------------------------- -------- -----------------------
STATUS# NOT NULL NUMBER
STATUS NOT NULL VARCHAR2(32)

SQL> select *
2 from sys.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

9 rows selected.

SQL>

As you can see the status's of 3 and 7 are missing. The table is created and populated by the script $ORACLE_HOME/rdbms/admin/sql.bsq - The only other places the table is mentioned is in catalog.sql and migrate.bsq. From the order of insert statements in sql.bsq if new entries were added in order then a sort of binary sequence was started 0,1,2,4,8 (see the descriptions above), then 5,6,9 and 10 were added. But why were 3 and 7 not used, are there two other status's planned or used in the past? Do they have some internal meaning?

I was interested by the question but cannot answer it other than its probably not meaningful that status's 3 and 7 are missing. Doe anyone know? - let me know if you do.