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

What is the best way of checking the current user privileges on a particular table from another schema?

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

Problem

In my software, at runtime, I need to check if the connected user has the privileges on some tables, across 2 different schemas.
From what I found doing research, I came across these 2 views
ALL_TAB_PRIVS_RECD
ALL_TAB_PRIVS
Should I use one of these views, or is there another better way to do it?
Thanks

Solution

ALL_TAB_PRIVS is a superset of ALL_TAB_PRIVS_RECD. You probably want ALL_TAB_PRIVS as it includes tables that the current user owns.

Context

StackExchange Database Administrators Q#4363, answer score: 5

Revisions (0)

No revisions yet.