Re: Granting priviledges on a synonym using a database link

From: Bill Manry <bmanry_at_us.oracle.com>
Date: 1995/10/23
Message-ID: <46h0o9$f25_at_inet-nntp-gw-1.us.oracle.com>#1/1


roxane edjlali <re> wrote:
>I have 2 database instances A and B.
>A has a user account A1 containing
>a table T1.
>B has a user account B1 with a database link to
>A1.
>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.
>Is there any way of getting around this pb?
>I would like to avoid creating a second
>database link between B2 and A1.

Access priviledges cannot span databases at this time. Although your synonym T'1 is on the same system as the grantee (B2), the object to which it resolves is not.

Views are processed differently -- a view is a real object rather than just an alternative name -- and I believe you can have something like what you set out to do by creating on B a view on T1_at_A rather than a synonym. Views are, however, more expensive in terms of performance and they behave differently in some circumstances.

Another possibility is to make the synonym T'1 a PUBLIC synonym. This eliminates local object priviledge considerations entirely on B.

/b

-- 
Bill Manry 
Standard disclaimer applies.
Received on Mon Oct 23 1995 - 00:00:00 CET

Original text of this message