0

I'm not very familiar with Oracle SQL at all, but using our admin account I ran the following query on our Oracle database server: GRANT SELECT ON Table1 TO OtherUser. I then committed this change (not sure if you need to even commit this?)

I'm using Oracle SQL Developer to connect to our Oracle database and after I ran the above GRANT statement from our admin account, I would've thought I would see Table1 listed under the Table objects node when I connect as OtherUser, but I do not see it and cannot select from it when I try.

Is there any other permissions I need to grant, or anything else I need to do that I missed?

Edit: When I query DBA_TAB_PRIVS I do see Table1 listed with the SELECT privilege for grantee OtherUser, even though from OtherUser's perspective I can't see Table1 under the Tables node in Oracle SQL Developer.

1 Answer 1

1

Objects owned by other users are not listed under your objects in SQL Developer.

Expand Other Users, Owner (username), Tables, and you will find the table there.

enter image description here

5
  • Fair enough, but shouldn't I be able to SELECT from the table in a worksheet for the OtherUser account (the one that doesn't own the object but does have SELECT privilege granted to it)?
    – J.D.
    Commented Jun 19, 2018 at 14:05
  • @J.D. - You can, with specifying the owner of the table: select * from owner.table_name;. Commented Jun 19, 2018 at 14:08
  • That's actually how I'm trying to SELECT and it's still not working. I'm getting the error: ORA-00942: table or view does not exist 00942. 00000 - "table or view does not exist" *Cause: *Action: Error at Line: 4 Column: 12 The query I'm running from a worksheet for OtherUser is: SELECT * FROM AdminAccount.Table1; -- AdminAccount is the owner of Table1
    – J.D.
    Commented Jun 19, 2018 at 14:09
  • Not sure if this is relevant, but I am able to drag the table into the Query Builder and then run the statement from the Query Builder. And when I look at the SQL (Ctrl+Q), it shows the exact same query I'm trying to run from the Worksheet, even though in the Worksheet it gives me an error.
    – J.D.
    Commented Jun 19, 2018 at 14:19
  • Never mind, now it is working from the Worksheet tab. Bug with Oracle SQL Developer perhaps? In any case, I appreciate your help.
    – J.D.
    Commented Jun 19, 2018 at 14:22

Your Answer

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

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