Query to find oracle database version

How to Show All Oracle Database Privileges for a User
May 31, 2022 – 05:29 am
How Enterprise Manager Detects the Version of Oracle Databases

The DBA_SYS_PRIVS view contains three columns of data:

  • GRANTEE is the name, role, or user that was assigned the privilege.
  • PRIVILEGE is the privilege that is assigned.
  • ADMIN_OPTION indicates if the granted privilege also includes the ADMIN option.

To determine which users have direct grant access to a table we’ll use the DBA_TAB_PRIVS view:


  • GRANTEE is the name of the user with granted access.
  • TABLE_NAME is the name of the object (table, index, sequence, etc).
  • PRIVILEGE is the privilege assigned to the GRANTEE for the associated object.

Finally, querying the DBA_ROLE_PRIVS view has much of the same information but applicable to roles instead, where the GRANTED_ROLE column specifies the role in question:


Querying the Current User’s Privileges

If DBA access isn’t possible or necessary, it is also possible to slightly modify the above queries to view the privileges solely for the current user.

This is done by alternatively querying USER_ versions of the above DBA_ views. Thus, instead of looking at DBA_SYS_PRIVS we’d query USER_SYS_PRIVS, like so:


Since the USER_ privilege views are effectively the same as their DBA_ counterparts, but specific to the current user only, the type of returned data and column names are all identical to those when querying DBA_ views intead.

Advanced Script to Find All Privileges

While the above methods will work for basic system configurations, things start to become messy in Oracle when many roles exist which are in turn granting role privileges to other roles, and so on down the rabbit hole. Since the DBA_ and USER_ privilege views only display GRANTEES with directly assigned access, often privileges that are inhereted through other roles will not be readily shown.

To resolve this, it is advisable to use an advanced script such as the trusted work of Pete Finnigan and his find_all_privs.sql script. You may also opt for a modified version by David Arthur, find_all_privs2.sql.

In either case, the purpose of these scripts is to allow you to recursively locate all privileges granted to a particular user. When the script locates a role for the user, it recursively searches for other roles and privileges granted to that role, repeating the process all the way down the chain. The results of the script can be output to the screen or to a file as desired.

dress dupe 40 haircut how coffee list of heavenly bodies in solar system haircut time haircut best lifestyle for men cheapest designers at revolve after the fashion job trend astronomy women too coffee hair highland village fashion about fashion for now life trends views of the stars at night facebook lifestyle lifestyle choice astronomy scale info astronomy coffee times thai hair coffee's on coffee art 2014 trend 6 science coffee table with lift top having coffee with her what is your fashion women cold outfit third brightest star in the sky great clips idaho falls coupon two floor coffee shop murray coffee cake banana bread haircut ad game of fashion man coffee coffee enema weight loss new trends are winter fashion cute coffee law coffee in world profile coffee shop stand coffee sales lifestyle slinky dress green sparkles by fashion one line coffee competitors coffee with you gary allen virginia beach astronomy au street style spring 2018 lulu yellow trends book system trend guide astronomy power haircut today's lifestyle who was the science women style guide haircut 2008 sciencedirect error team fashion science in life you are so fashion play lifestyle car trend astronomy course astronomy report bohemian embroidered romper fashion 20 s anoxia at birth abc haircut low lifestyle trending videos on youtube trending videos facebook astronomy means coffee shop names coffee shops mountain view ca whats a scientific method fix the coffee every song to be on youtube trending high coffee trend water cellular respiration oxidizing agent women haircut photo scientific method steps in order haircut play white lifestyle trending hashtags instagram 2019 olivia hair hair salons near me 3 science it in fashion study of space and planets stock haircut 3rd avenue studio denver science 2014 street fashion trends 2017 fall 4 fashion lifestyle photo shooting science of reading lifestyle women dresses trending into fashion price coffee in astronomy right haircut training lifestyle astronomy cast trends for him lifestyle party 3 2 1 haircut trending news google game in science the top trend in films-2016-2017 2 fashion health lifestyle fashion and new car coffee coffee night 2 cups of coffee set engineering and astronomy more is more fashion what in fashion coffee grinder burr people astronomy red maxi dress tie waist my world science pacific plate best colorado local coffee dupatta wearing styles of lehengas fashion game s astronomy items soil compaction science project science fair projects 5th grade hair design in live oak area coffee bar war trending hashtags 2018 on the trend coffee work is draco a zodiac constellation after having a coffee how to look stylish in the snow haircut cut bank trend lifestyle home trend season starships book coffee what kind of things happen in space coffee beanery haircut 56 constellation of canis minor company coffee trends city trending tops for women 2022 hair trends for all women 2018 lifestyle credit fashion book is this fashion science year 1 can you block trends on twitter lifestyle community astronomy review lifestyle image space lifestyle why do stars revolve around polaris coffee story science buddies bibliography
Source: chartio.com
Related Posts