RE: Database priviliges

  • From: Sanjay Mishra <smishra_97@xxxxxxxxx>
  • To: Thomas.Mercadante@xxxxxxxxxxxxxxxxx, oracle-l@xxxxxxxxxxxxx
  • Date: Wed, 25 May 2005 11:54:39 -0700 (PDT)

Thanks everybody for the comment.
"Mercadante, Thomas F (LABOR)" <Thomas.Mercadante@xxxxxxxxxxxxxxxxx> 
wrote:Sanjay,

Not to the whole schema. It is fairly trivial to generate a sql script
to grant select access to all of the objects to the user (or to a role
that has been granted to the user).

Something like:

declare
cursor c1 is
select 'grant select on ' || object_name || ' to sanjay_role' out_line
from user_objects
where object_type in ('VIEW','TABLE')
;
cid INTEGER;
v_numrows number;

begin

for c1_rec in c1 loop
execute immediate rtrim(c1_rec.out_Line,';');
end loop;

end;
/

Tom


-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Sanjay Mishra
Sent: Wednesday, May 25, 2005 2:23 PM
To: oracle-l@xxxxxxxxxxxxx
Subject: Database priviliges

Hi
=20
I have one schema in database named "A" Schema A has all of the
database object like tables etc. Now I want to give Read only access for
all Schema A Tables to "Sanjay" user. Is there any way that I can do
without granting individually on table basis. What I am looking is full
schema Read only kind of priviliges.
=20
Database is 9.2
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around=20
http://mail.yahoo.com=20

--
//www.freelists.org/webpage/oracle-l
--
//www.freelists.org/webpage/oracle-l


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--
//www.freelists.org/webpage/oracle-l

Other related posts: