0

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.)

1 Answer 1

0

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'
1
  • Nice! That did it -- now I can stop banging my head against the wall
    – adamtamu
    Jul 17, 2015 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.