Re: Granting priviledges on a synonym using a database link

From: Paul Baumgartel <paulb_at_pcnet.com>
Date: 1995/10/21
Message-ID: <469fre$r5h_at_pcnet2.pcnet.net>#1/1


roxane edjlali <re> wrote:

>A has a user account A1 containing a table T1.
 

>B has a user account B1 with a database link to A1.

I interpret this to mean that the database link owned by B1 specifies connection to instance A as user A1 (...CONNECT TO A1 IDENTIFIED BY...)

>I have defined a synonym T'1 in B1 for T1_at_A1.
 

>I have a second user on B called B2.
 

>When connected to B1 I try to give insert,
>select priviledges to B2 on T'1.
 

>Oracle gives the following error message :
 

>ORA-02021: DDL operations are not allowed on
>a remote database.

In essence you're trying to grant privileges to a user on a remote DB, which is impossible as far as I know.

>Is there any way of getting around this pb?
>I would like to avoid creating a second
>database link between B2 and A1.

There's really no way around it. B1 has full privileges on all of A1's objects, because B1 _is_ A1 when connected to A. If you want B2 to have privileges on only one of A1's objects, then B2 must connect to A as a different username, meaning a different DB link, and the username must have only the privileges that you wish B2 to have on A1's objects..


Paul Baumgartel, Principal Consultant              paulb_at_pcnet.com 
Adept Computer Associates, Inc.                                    
********************************************************************
Received on Sat Oct 21 1995 - 00:00:00 CET

Original text of this message