HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Are the ALL_OBJECTS and DBA_OBJECTS different when you have DBA Role?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
theyoudba_objectsareroleall_objectsdifferentwhenanddba

Problem

I am trying to fully understand the difference between ALL_OBJECTS and DBA_OBJECTS.
I am still new in Oracle and get confused by the whole Access/Roles thing.

From here:

  • ALL_OBJECTS shows all objects of current and those object which you have rights to access.



  • DBA_OBJECTS shows all object of all users .



My question is, if you have DBA role, should ALL_OBJECTS be equal to DBA_OBJECTS?
I have DBA role and in the Database I am working on and ALL_OBJECTS returns fewer elements than DBA_OBJECTS.

If I have DBA Role shouldn't I have access to all the objects in DBA_OBJECTS and therefore both views should be equal?

Solution

First let's define ALL_OBJECTS and DBA_OBJECTS in oracle:

  • ALL_OBJECTS describes all objects accessible to the current user.



  • DBA_OBJECTS describes all objects in the database



As result if you select everything they are different because there are multiple levels of DBA privileges on Oracle. For example if you have SysDBA privileges then you have much more access than a normal DBA.

Context

StackExchange Database Administrators Q#88865, answer score: 4

Revisions (0)

No revisions yet.