Home » SQL & PL/SQL » SQL & PL/SQL » HELP: 'table' must name a table which the user has access
HELP: 'table' must name a table which the user has access [message #35816] Wed, 17 October 2001 05:14 Go to next message
Nicola Farina
Messages: 63
Registered: October 2001
Member
Hi all,

In a stored procedure I tried to insert a record in
table G. I am logged as user JT and G is owned by JT
When I try to compile my procedure I got the error:
'G' must name a table which the user has access
If I prepend the user name (as in JT.G) the procedure compiles fine, but I don't want to hard-code the user name. If I try to insert "manually" logged as JT, I can do that even without the "JT" user prefix.
Why do I have this strange behaviour in PL/SQL?
I am using Oracle 7.3.4
Thanks in advance
Nicola

----------------------------------------------------------------------
Re: HELP: 'table' must name a table which the user has access [message #35818 is a reply to message #35816] Wed, 17 October 2001 07:45 Go to previous messageGo to next message
Hans
Messages: 42
Registered: September 2000
Member
possible reason:
 
connect scott/tiger

create or replace procedure proc
as
   <b>emp</b>  varchar2(3);
begin
   insert into <b>emp</b> values ( 3 );
end;
/
show errors
 
Warning: Procedure created with compilation errors.
 
SQL> show errors
Errors for PROCEDURE PROC:
 
LINE/COL ERROR
-------- -----------------------------------------------------------------
5/2      PL/SQL: SQL Statement ignored
5/14     PLS-00356: 'EMP' must name a table to which the user has access


----------------------------------------------------------------------
Re: HELP: 'table' must name a table which the user has access [message #35822 is a reply to message #35818] Wed, 17 October 2001 08:35 Go to previous messageGo to next message
Nicola Farina
Messages: 63
Registered: October 2001
Member
Thank you very much Hans, but I am unable to find
another identifier with the same name of my table.
The actual table name is LOG. I thougt it may be a reserved word but I didn't find it..
Still searching...

----------------------------------------------------------------------
Re: HELP: 'table' must name a table which the user has access [message #35824 is a reply to message #35818] Wed, 17 October 2001 09:22 Go to previous messageGo to next message
Hans
Messages: 42
Registered: September 2000
Member
connect test/test
 
drop table log;
create table log (
   id number(3)
   );
   
create or replace procedure proc
is
begin
   insert into log values ( 1 );
end;
/
show errors
 
Warning: Procedure created with compilation errors.
 
SQL> show errors
Errors for PROCEDURE PROC:
 
LINE/COL ERROR
-------- -----------------------------------------------------------------
4/2      PL/SQL: SQL Statement ignored
4/14     PLS-00356: 'LOG' must name a table to which the user has access
 
 
 
drop table sin;
create table sin (
   id number(3)
);
 
create or replace procedure proc
is
begin
   insert into sin values ( 1 );
end;
/
show errors
 
Warning: Procedure created with compilation errors.
 
SQL> show errors
Errors for PROCEDURE PROC:
 
LINE/COL ERROR
-------- -----------------------------------------------------------------
4/2      PL/SQL: SQL Statement ignored
4/14     PLS-00356: 'SIN' must name a table to which the user has access


----------------------------------------------------------------------
Re: HELP: 'table' must name a table which the user has access [message #35835 is a reply to message #35818] Wed, 17 October 2001 23:27 Go to previous messageGo to next message
Nicola Farina
Messages: 63
Registered: October 2001
Member
Oops! You are right, I didn't see that..
Many thanks, sorry for stupid question..

----------------------------------------------------------------------
Re: HELP: 'table' must name a table which the user has access [message #36788 is a reply to message #35818] Thu, 20 December 2001 11:23 Go to previous message
Alan Hill
Messages: 1
Registered: December 2001
Junior Member
I'm gettting this error also and I don't have anything named LOG in it. I'm wondering if it is some type of permissions issue.

----------------------------------------------------------------------
Previous Topic: UTL_FILE Package
Next Topic: How can i pass the number of users who are connected in the database
Goto Forum:
  


Current Time: Wed Apr 08 22:11:50 CDT 2020