Home » SQL & PL/SQL » SQL & PL/SQL » need to create a "read only" user
need to create a "read only" user [message #138] Thu, 17 January 2002 04:56 Go to next message
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 Go to previous message
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
Previous Topic: Re: Changing the Port of The Oracle Server
Next Topic: IN/OUT/INOUT PL-SQL arguments from Perl
Goto Forum:
  


Current Time: Wed Apr 24 17:22:21 CDT 2024