Question : oracle 11g - How to grant view privilege to user2 from user1 objects

Hi,

How to grant view privilege to user2 from user1 objects

Scenario:
I have few tables and views created by “user1”.
Would like to create another user “user2” with read only access to user1 objects...plus user2 can also create views from “user1” tabes.

So I have done
1.      Created a role “ro_role”
2.      Granted select on “user1” objects to “ro_role”
3.      Grant view all to “ro_role” (but I’m not sure how to specify grant create view only on user1 objects to this role)
Please help

Answer : oracle 11g - How to grant view privilege to user2 from user1 objects

from which user did you run the below ?

grant select on table1 to user2; --> this need to be executed from user1

grant create any view to user2;  --> this needs to be done from DBA user say SYSTEM or some other user which has DBA privilege

CREATE VIEW TESTVW AS SELECT * FROM USER1.TABLE1 ; --> this needs to be run in user2

Thanks

Random Solutions  
 
programming4us programming4us