Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL Permissions

Re: PL/SQL Permissions

From: <sybrandb_at_hccnet.nl>
Date: Thu, 16 Aug 2007 00:59:23 +0200
Message-ID: <9317c3tkohr9vaprs1jl9oat561ulbbmhg@4ax.com>


On Wed, 15 Aug 2007 15:32:00 -0700, JMecc <jmecc_at_telus.net> wrote:

>I've created a table, say tbl and a PL/SQL function fcn that I want to
>share with a friend. I used the following:
>
>GRANT SELECT ON tbl TO friend;
>GRANT EXECUTE ON fcn TO friend;
>CREATE PUBLIC SYNONYM tbl FOR me.tbl;
>CREATE PUBLIC SYNONYM fcn FOR me.fcn;
>
>and now by going on the SQL comand line my friend can select from tbl
>no problem, but the problem comes in PL/SQL. When he runs fcn, it
>errors at the line
>
>SELECT col2 INTO x FROM tbl WHERE col1 = 1;
>
>stating ORA-00942: table or view does not exist.
>
>Is there another privilege which I can grant him that will allow him
>to access my table though my function?
>
>Thanks,
>Jo

As the code is correct, are you positive he is calling the correct function and he doesn't have a function fcn himself? If he *does* have a function fcn, he will use *that* function and the synonym will be ignored.
If my assumption is incorrect, code you post the *exact* statements resulting in ora-942, not just 'when he runs fcn'

-- 
Sybrand Bakker
Senior Oracle DBA
Received on Wed Aug 15 2007 - 17:59:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US