ALL_OBJECTS describes all objects accessible to the current user. Describes all objects accessible to the
current
user
.
DBA_OBJECTS describes all objects in the database
.
USER_OBJECTS describes all objects owned by the current user. Describes all objects owned by the current
user
Don't think that all_* and dba_* views mean all objects,
all_* is related to permissions
;
So it appears [different users access all_objects view, the same filter conditions, different results (for example: "User A accesses all_objects view to filter B.T1 table with data, and C user also accesses all_objects view to filter B.T1 table but has no data")] It is normal because user C does not have permission to access the B.T1 table, which can be solved with dba_objects;
So
select dba_* and all_* views appropriately.
There are probably three ways:
1: grant select any table to B; (this method is not very precise, and some tables such as sys, system, etc. can also be viewed)
2:grant select on A.tableName1 to public;grant select on A.tableName2 to public;......................(How many times how many tables are executed) , this method is more troublesome
3: Implicit cursor empowerment:
select 'GRANT SELECT ON A.'||object_name||' to B;' from dba_objects where owner='A' and object_type='TABLE';
The third method is generally used, and the permission control is more refined.