纠正中一处错误--dba_*视图有公共同义词

oracle 10gR2 doc <>的 Part II Oracle Database Architecture
"How the Data Dictionary Is Used"中有一处错误
Views with the Prefix DBA
Views with the prefix DBA show a global view of the entire database. Synonyms are
not created for these views, because DBA views should be queried only by
administrators. Therefore, to query the DBA views, administrators must prefix the
view name with its owner, SYS, as in the following:

SELECT owner, object_name, object_type FROM SYS.DBA_OBJECTS;

Oracle recommends that you implement data dictionary protection to prevent users
having the ANY system privileges from using such privileges on the data dictionary.
If you enable dictionary protection (O7_DICTIONARY_ACCESSIBILITY is false),
then access to objects in the SYS schema (dictionary objects) is restricted to users
with the SYS schema. These users are SYS and those who connect as SYSDBA.


以DBA_为前缀的视图也有public synonym,并且,enable dictionary protection之后,非sys用户,非sysdba系统权限同样可以访问sys下的字典视图,证明如下:

SQL> col synonym_name for a15
SQL> col table_ower for a10
SQL> col table_name for a15
SQL> col owner for a10
SQL> select SYNONYM_NAME,TABLE_OWNER,TABLE_NAME,owner from dba_synonyms where lower(TABLE_NAME) like '%dba_user%';
SYNONYM_NAME    TABLE_OWNER                    TABLE_NAME      OWNER
--------------- ------------------------------ --------------- ----------
DBA_USERS       SYS                            DBA_USERS       PUBLIC
SQL> show user
USER is "BOSS"
SQL> show parameter O7_DICTIONARY_ACCESSIBILITY

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
O7_DICTIONARY_ACCESSIBILITY          boolean     FALSE

SQL> select * from V$PWFILE_USERS;

USERNAME                       SYSDB SYSOP
------------------------------ ----- -----
SYS                            TRUE  TRUE
TEST                           FALSE TRUE

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/94384/viewspace-600304/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/94384/viewspace-600304/

你可能感兴趣的:(纠正中一处错误--dba_*视图有公共同义词)