I am using oracle database 11g Release 2 I am able to create user and give it create session privileges, but I am unable to give it select privilege.
create user user1 identified by pass;
User created.
grant create session to user1;
Grant succeeded.
grant select on emp to user1;
Grant succeeded.
After this I connect as user1 Now when I run this statement it say
select * from emp;
oracle reply=
ERROR at line 1:
ORA-00942: table or view does not exist
Than I checked privileges to user1 using
select * from session_privs;
PRIVILEGE
---------------------------------
CREATE SESSION
Which means only create session privilege is available to user1. How can I give select privileges to user1?
Giving a use the
SELECT
privilege (or any other privilege for that matter) does not create a synonym. Asuser1
, who is not the table's owner, you should still reference the table by its fully qualified name, with the owner. Assuming the owner is calledowner1
,user1
's query should be:As for the data dictionary query, this is also to be expected. These privileges are recorded in the
[DBA|ALL|USER]_TAB_PRIVS
views: