barbara6555
asked on
Oracle user privileges
Hello... I have a database with 2 schema's on it (one is for testing). Is there a way to grant privileges to a user with read only access to only ONE of the schema's so they can access reports runtime? If so, how?
THANKS!!!!
THANKS!!!!
Hi!
Don't forget the ';' behind user2, :)
Regards
/Hans - Erik Skyttberg
Don't forget the ';' behind user2, :)
Regards
/Hans - Erik Skyttberg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Everyone was very helpful. Thanks for spelling it out for me. This worked great!
Short answer no you cannot.
You can't grant such a privilege.
What you can do is give a role or user, in your case role might be better so you can remove/add role to user(s) at will.
What you need to do is create a role that has select rights on all views and tables in that schema.
Then the user can do:
select * from other_schem.table
Easiest to do is:
login as user1:
select 'grant select on ||'table_name||' to user2' from user_tables;
Now you can cut and paste this into a sql script or directly into sqlplus.
This can be done for all objects and privileges that needs to be set.
Hope this helps.
Regards
/Hans - Erik Skyttberg