Re: Tables accessed from forms/triggers ?

From: Stephen Newhouse <bps2_at_bps2.ebay.sun.com>
Date: 1995/05/24
Message-ID: <3puav6$ol_at_male.EBay.Sun.COM>#1/1


In article e69_at_aplinfo.jhuapl.edu, Stan Novinsky <stan_novinsky_at_jhuapl.edu> writes:
> I created several tables in my own schema. I granted users
> the SELECT priv to access the tables. When I run the Form
> I have no problem accessing the tables. The Form extracts
> data from the tables by executing the Select clause from a trigger.
>
> If a user logs in as him/herself via the Oracle username/pass and
> runs the Form, an error occurs. If the user logs in as me, it
> works. The problem may be that the select clause
> is using the table name only and not prefixing it with my name
> as the owner (ie. tablename vs. OPS$STAN.tablename).
>
> Is there a way to grant a priv or something to allow a user to execute
> my Form ...

Obviously, you can modify your form to hard-code the userid in front of the tablename in the query. If you don't want to do that:

log into a userid with DBA privilege (e.g. SYSTEM) and type: create public synonym tablename for ops$stan.tablename;

In either case, your users need privilege to access the table. log into your userid and type:

grant select on tablename to public;

These commands allow any userid to access your table(s). You can also create separate synonyms and individual grants. Received on Wed May 24 1995 - 00:00:00 CEST

Original text of this message