need to create a "read only" user [message #138] |
Thu, 17 January 2002 04:56  |
S. Hill
Messages: 1 Registered: January 2002
|
Junior Member |
|
|
I need to create a user(lets call this user USER1) that can only select data in user2's tables (just allow USER1 to read the data only). User2 owns the tables. There are over 400 tables so I don't want to grant select on each one. Is there someway to grant USER1 "select any table" in USER2's tablespace?
|
|
|
Re: need to create a "read only" user [message #139 is a reply to message #138] |
Thu, 17 January 2002 11:28  |
Mike
Messages: 417 Registered: September 1998
|
Senior Member |
|
|
I dont think there is such a command but you can create a script like that:
connect to sqlplus as user2 and execute folowing statements:
set heading off
spool c:grant.sql
select 'grant select on '||table_name||' to user1;' from user_tables;
spool off
@c:grant.sql
HTH
MIke
|
|
|