Home » SQL & PL/SQL » SQL & PL/SQL » ORA-06550 PLS-00201: identifier must be declared Issue. (Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit)
ORA-06550 PLS-00201: identifier must be declared Issue. [message #599068] Tue, 22 October 2013 01:20 Go to next message
Manoj.Gupta.91
Messages: 239
Registered: March 2008
Location: Delhi
Senior Member
Hi All,

I'm facing an issue as below.

We have two schemas COMN and APPL. Procedure exists in COMN schema from COMN we have given Execute and Debug grants to APPL. In APPL we have created synonym for the procedure in COMN. On checking I found grants are properly given and synonym is also valid.

SELECT * FROM DBA_OBJECTS WHERE OBJECT_NAME = 'PRC_EOD_PROCESSING' ;

OWNER	OBJECT_NAME	      SUBOBJECT_NAME	OBJECT_ID  DATA_OBJECT_ID   OBJECT_TYPE	 CREATED
COMN	PRC_EOD_PROCESSING	                83531	   PROCEDURE	                 03-09-2013 11:58:26
APPL	PRC_EOD_PROCESSING	                83644	   SYNONYM	                 04-09-2013 15:10:44


LAST_DDL_TIME	        TIMESTAMP	        STATUS	TEMPORARY  GENERATED  SECONDARY	NAMESPACE  EDITION_NAME
18-10-2013 17:51:17	2013-10-18:17:51:17	VALID	N	   N	      N	        1	
22-10-2013 11:04:17	2013-10-22:11:04:17	VALID	N	   N	      N	        1	



SELECT * FROM DBA_TAB_PRIVS WHERE TABLE_NAME = 'PRC_EOD_PROCESSING' ;

GRANTEE	OWNER	TABLE_NAME	        GRANTOR	PRIVILEGE	GRANTABLE	HIERARCHY
APPL	COMN	PRC_EOD_PROCESSING	COMN	EXECUTE	        NO	        NO
APPL	COMN	PRC_EOD_PROCESSING	COMN	DEBUG	        NO	        NO



From APPL User.

If I execute procedure using COMN.PRC_EOD_PROCESSING I'm able to execute. Since I've created synonym I should be able to execute without prefixing owner schema name. If I execute it without prefixing owner name PRC_EOD_PROCESSING I receive below error.

ORA-06550: line 1, column 7:
PLS-00201: identifier 'PRC_EOD_PROCESSING' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored


When I executed below statement I was able to execute procedure without prefixing owner name.
CREATE OR REPLACE SYNONYM PRC_EOD_PROCESSING FOR COMN.PRC_EOD_PROCESSING ;



It seems there was an issue with synonym. But data dictionary was showing it's status as valid.

Is this issue related to SGA or Shared Pool flushing etc.

Please help me to resolve this issue.

Thanks & Regards
Manoj
icon5.gif  Re: ORA-06550 PLS-00201: identifier must be declared Issue. [message #599069 is a reply to message #599068] Tue, 22 October 2013 01:29 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
It works for me:
SQL> create user u1 identified by u1;

User created.

SQL> create user u2 identified by u2;

User created.

SQL> grant create session, create synonym to u2;

Grant succeeded.

SQL> create or replace procedure u1.p is begin dbms_output.put_line('In U1.P'); end;
  2  /

Procedure created.

SQL> grant execute on u1.p to u2;

Grant succeeded.

SQL> connect u2/u2
Connected.
U2> exec u1.p;
In U1.P

PL/SQL procedure successfully completed.

U2> create synonym p for u1.p;

Synonym created.

U2> exec p;
In U1.P

PL/SQL procedure successfully completed.

Please post what you have I did it.

Re: ORA-06550 PLS-00201: identifier must be declared Issue. [message #599076 is a reply to message #599069] Tue, 22 October 2013 01:50 Go to previous messageGo to next message
Manoj.Gupta.91
Messages: 239
Registered: March 2008
Location: Delhi
Senior Member
Hi Michel,

It normally works. But I faced this situation which looks very very odd for me.

I suppose it is some memory related issue. Anyhow background processed didn't find this object.

I don't know which data dictionary should be used to find information related to this issue. May be some traces etc. will help.

Please guide me how to investigate this issue.


Thanks & Regards
Manoj
icon2.gif  Re: ORA-06550 PLS-00201: identifier must be declared Issue. [message #599078 is a reply to message #599076] Tue, 22 October 2013 01:59 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Try flushing the shared pool but if it does not work, restart from the beginning as I did.

Re: ORA-06550 PLS-00201: identifier must be declared Issue. [message #599082 is a reply to message #599078] Tue, 22 October 2013 02:15 Go to previous messageGo to next message
Manoj.Gupta.91
Messages: 239
Registered: March 2008
Location: Delhi
Senior Member
Hi Michel,

I'll do the same when I come across this issue again.

At present can we have some historical traces to investigate this issue. Because this is strange and should not happen in production system. Although this has happened in development environment but we should do some route cause analysis for this issue.

Thanks & Regards
Manoj
Re: ORA-06550 PLS-00201: identifier must be declared Issue. [message #599089 is a reply to message #599082] Tue, 22 October 2013 02:54 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Copy and paste what you did and got.

Re: ORA-06550 PLS-00201: identifier must be declared Issue. [message #599094 is a reply to message #599089] Tue, 22 October 2013 03:45 Go to previous messageGo to next message
Manoj.Gupta.91
Messages: 239
Registered: March 2008
Location: Delhi
Senior Member
Hi Michel,

Steps are same as you described in your post. I didn't do anything, just attempted to execute that procedure and faced below issue.

ORA-06550: line 1, column 7:
PLS-00201: identifier 'PRC_EOD_PROCESSING' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored


Please advise.

Thanks & Regards
Manoj
icon13.gif  Re: ORA-06550 PLS-00201: identifier must be declared Issue. [message #599097 is a reply to message #599094] Tue, 22 October 2013 04:03 Go to previous message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
Steps are same as you described in your post.


if you say so... then it works.

Previous Topic: How to create table replica dynamically
Next Topic: SQL query
Goto Forum:
  


Current Time: Thu Apr 18 20:10:29 CDT 2024