Oracle Permissions – Missing View Privileges in USER_TAB_PRIVS

oraclepermissionsview

I can't figure out how to view the grant privileges I've given users on views —

FIRSTUSER@SQL> create view remotetabletest
  2  as select * from A_TABLE where PKEY = '123456'
  3  /

FIRSTUSER@SQL> grant select on remotetabletest to USERB;
FIRSTUSER@SQL> exit

[... login as USERB ...]

USERB@SQL> select count(*) from FIRSTUSER.remotetabletest;

  COUNT(*)
----------
        1

USERB@SQL> select * from user_tab_privs where TABLE_NAME = 'remotetabletest';

no rows selected

Normally, if this were a table, querying user_tab_privs would return a line about 'GRANT SELECT', but for views I get nothing.

I also tried querying dba_tab_privs from SYS: nothing.

(Also, in reality, I'm creating the view over a DB Link, but that doesn't seem related to my problem here.)

Best Answer

Unquoted identifiers in SQL are implicitly converted to upper case, so the statement create view remotetabletest creates the view named 'REMOTETABLETEST', not 'remotetabletest'.

In other words, the following should return the expected result:

select * from user_tab_privs where TABLE_NAME = 'REMOTETABLETEST'