Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Synonyms and Oracle permissions
jpatokal_at_iki.fi wrote:
> Greetings,
>
> Frank van Bortel wrote:
>> jpatokal_at_iki.fi schreef: >>> So how do I grant USER access to all of OWNER's objects? In case it >>> matters, this is Oracle 10.2.0.2. >> grant all on <table_name> to user;
You are not granting access to the synonym. Rather, you are granting access on the object. The synonym just points to that object. When USER references the synonym, Oracle translates this to the real object and then checks to see if USER has permission's on that object.
There is not easy way to grant everything owned by OWNER to another user or role. You'll have to do this one by one. But you can generate a quick script as follows:
SELECT 'GRANT all ON '||table_name||' TO user;' FROM dba_objects WHERE owner='OWNER';
Spool the results to a file and then run that file.
HTH,
Brian
-- =================================================================== Brian Peasland dba_at_nospam.peasland.net http://www.peasland.net Remove the "nospam." from the email address to email me. "I can give it to you cheap, quick, and good. Now pick two out of the three" - UnknownReceived on Fri Nov 03 2006 - 07:35:18 CST
![]() |
![]() |