DBA用户的dba_tables和all_tables都是sys用户dba_tables和all_tables的同义词ALL_TABLES describes all relational tables accessible to the user.DBA_TABLES describes all relational tables in the database.ALL_TABLES视图的定义多出了下面一段话, 我觉得主要体现tables accessible to the user and (o.owner# = userenv('SCHEMAID') or o.obj# in (select oa.obj# from sys.objauth$ oa where grantee# in ( select kzsrorol from x$kzsro ) ) or /* user has system privileges */ exists (select null from v$enabledprivs where priv_number in (-45 /* LOCK ANY TABLE */, -47 /* SELECT ANY TABLE */, -48 /* INSERT ANY TABLE */, -49 /* UPDATE ANY TABLE */, -50 /* DELETE ANY TABLE */) ) ) and t.dataobj# = cx.obj# (+) and cx.owner# = cu.user# (+)
我觉得主要体现tables accessible to the user and (o.owner# = userenv('SCHEMAID')
or o.obj# in
(select oa.obj#
from sys.objauth$ oa
where grantee# in ( select kzsrorol
from x$kzsro
)
)
or /* user has system privileges */
exists (select null from v$enabledprivs
where priv_number in (-45 /* LOCK ANY TABLE */,
-47 /* SELECT ANY TABLE */,
-48 /* INSERT ANY TABLE */,
-49 /* UPDATE ANY TABLE */,
-50 /* DELETE ANY TABLE */)
)
)
and t.dataobj# = cx.obj# (+)
and cx.owner# = cu.user# (+)