Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL-Problem with access to table of another user
"Ralf Hofmann" <hofmannb_at_informatik.uni-muenchen.de> wrote in message
news:3BF51ED5.87386945_at_informatik.uni-muenchen.de...
> Hello!
>
> This is my problem:
> One pl/sql-Function opens a sql-query with a cursor. In this
> sql-statment an second pl/sql-Function is called. This second
> pl/sql-Function again opens a sql-query with a cursor. This sql-statment
> looks like this:
> select name from other_user.table_name;
> The following error occurs:
> ORA-00942: table or view does not exist
> ORA-06512: at "IDAP.PDM", line 341
> ORA-06512: at line 1
> ORA-06512: at "IDAP.IDAP", line 354
> ORA-06512: at line 1
>
> The table exists and access to this table is granted.
> if i change the query to :
> select name from table_name
> it works.
>
> If i call the second pl/sql-Function directly, it works, too.
> If the first pl/sql-Function calls the second without sql-statment it
> also works.
>
> As anyone a idea, where the error really is?
>
> Thanks for your help,
>
> Ralf
>
>
> --
> Ralf Hofmann
> Rosenstr. 3a
> 85778 Haimhausen
> mobile: 0175-2719574
> hofmannb_at_informatik.uni-muenchen.de
>
>
Please _always_ specify version (3 digits and 2 dots, so 5 keystrokes)
Do you access to that table _directly_ or to a role?
Roles are disabled during compilation of stored procedures, as roles are
volatile
You need to have _direct_ access (pre 8i)
or
run the function with authid invoker (8i and higher)
Hth
-- Sybrand Bakker Senior Oracle DBA to reply remove '-verwijderdit' from my e-mail addressReceived on Fri Nov 16 2001 - 08:44:46 CST