• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2059
  • Last Modified:

dba_sys_privs, object does not exist.

I want to check if I have write privileges on a table.

I check this with below sql,


select *
from dba_sys_privs sp
where exists (select 1
              from dba_users
              where username = sp.grantee)
AND privilege like 'INSERT%'

Access to dba_sys_privs ,all_sys_privs ,user_sys_privs to check this information,yields in
object does not exist.
0
gram77
Asked:
gram77
1 Solution
 
gram77Author Commented:
What is the alternative for checking if I can insert into a table
0
 
sujith80Commented:
YOu can directly select from user_tab_privs to see whether you are granted any insert privileges on the table.
As
select * from user_tab_privs 
where table_name = '<your table name in upper case>';

Open in new window

0
 
schwertnerCommented:
To run this query you have to log as SYS user:

SQL> select *
  2  from dba_sys_privs sp
  3  where exists (select 1
  4                from dba_users
  5                where username = sp.grantee)
  6  AND privilege like 'INSERT%'
  7  ;

GRANTEE                        PRIVILEGE                                ADM
------------------------------ ---------------------------------------- ---
SYS                            INSERT ANY TABLE                         NO
0
 
johnsoneSenior Oracle DBACommented:
As sujith80 suggested, you need to be looking at user/all/dba_tab_privs, not user/all/dba_sys_privs.

I would user user_tab_privs if you are looking for privileges granted to the user you are connected as.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now