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

Home -> Community -> Usenet -> c.d.o.tools -> Re: PLS-00201 Error

Re: PLS-00201 Error

From: RHC <rclarence_at_juno.com>
Date: Thu, 15 Feb 2001 23:30:06 -0000
Message-ID: <t8opju6pvbru17@corp.supernews.com>

Dave,

It appears that the user calling the procedure and the user owning the procedure are different (I'm not sure from your message), but if so you need to add a public synonym so that any user who needs to execute this procedure can find it. Do so as follows

create public synonym production_procedure_008 for USER.production_procedure_008;

where USER = the username of the owner of the stored procedure. This should solve your problem, also all you need to do is grant execute on stored procedures, but you may ave to grant privileges on the underlying objects that the procedure manipulates.

HTH RHC Dave Wishart wrote:
>
>
> I have an oracle stored procedure which on execution from a perl
 DBI:Oracle
> script generates the following:-
>
> Inputs are:- drname=Oracle, dbname=test, dbuser=system, dbpw=manager,
> my_dblink=
> gatewayeuro_008, my_procedure=production_procedure_008,
 my_username=APPT008,
> my_
> password=WRIGHT8
> Oracle connect parameters:-test, system ,manager, Oracle
> After connect
> BEGIN production_procedure_008(:data, :itpname, :userid, :pwd); END;
> BEGIN production_procedure_008(:data, TC022, APPT008, WRIGHT8); END;
> DBD::Oracle::st execute failed: ORA-06550: line 1, column 7:
> PLS-00201: identifier 'PRODUCTION_PROCEDURE_008' must be declared
> ORA-06550: line 1, column 7:
>
> I know that the procedure exists because if a run the query
>
> select text from user_source where name = 'PRODUCTION_PROCEDURE_008'
 order
> by line;
>
> I get the procedure listed correctly:-
>
> SQL> select text from user_source where name = 'PRODUCTION_PROCEDURE_008'
> order
> by line;
>
> TEXT
> -------------------------------------------------------------------------
 ---
> ----
>
> PROCEDURE PRODUCTION_PROCEDURE_008
> (io_MESSAGE IN OUT VARCHAR2, ITPname IN VARCHAR2, IUser IN VARCHAR2, IPW
 IN
> VARCHAR2)
>
> IS
> indx BINARY_INTEGER;
> trannum BINARY_INTEGER;
> apirc BINARY_INTEGER;
> BUILDMSG varchar2(4000);
> PLSMsgIn varchar2(4000);
> PLSMsgOut varchar2(4000);
>
> TEXT
> -------------------------------------------------------------------------
 ---
> ----
>
> testoutput varchar2(4000);
> passarea varchar2(4000);
> ISendBufL integer;
> IRecvBufL integer;
> /* ITPname VARCHAR2(8) := 'TC052 ';*/
> ILUname VARCHAR2(8) := 'IM1WAMVS';
> ISideName VARCHAR2 (8) := 'CAFEM1WA';
> BEGIN
> dbms_output.enable;
> passarea := io_MESSAGE;
> trannum := 0;
>
> TEXT
> -------------------------------------------------------------------------
 ---
> ----
>
> dbms_output.put_line('Before Initialise gateway');
> APPC2IMS4.APPC2IMS4_G_init_at_gatewayEURO_008(
> trannum ,
> ITPname ,
> ILUname ,
> ISideName ,
> IUser ,
> IPW ,
> apirc );
> dbms_output.put_line('after initialise gateway');
> PLSMsgIn := passarea;
>
> TEXT
> -------------------------------------------------------------------------
 ---
> ----
>
> PLSMsgOut := ' ';
> ISendBufL := 4000;
> IRecvBufL := 4000;
> dbms_output.put_line('Start SendRecv');
> APPC2IMS4.SENDRECV_at_gatewayEURO_008(
> trannum ,
> ISendBufL ,
> PLSMsgIn ,
> IRecvBufL ,
> PLSMsgOut ,
> apirc );
>
> TEXT
> -------------------------------------------------------------------------
 ---
> ----
>
> dbms_output.put_line('After SendRecv');
> APPC2IMS4.DeAllocateTP_at_gatewayEURO_008(trannum ,0,apirc);
> dbms_output.put_line('After Deallocate');
> io_MESSAGE := substr(PLSMsgOut,3,800);
> dbms_output.put_line(' send and receive answer back
 was '||testoutput);
> END PRODUCTION_PROCEDURE_008;
>
> 48 rows selected.
>
> Having done a search on the net for the PLS error a consistent suggestion
> was to check the security so after doing a
>
> grant all privileges on PRODUCTION_PROCEDURE_008 to public;
>
> I tried again and got the same error. I have also 'dropped' and recreated
> the procedure but without success.
>
>
>
> Has anyone got any suggestions as to what else may be causing the error ?
>
> The script is being run using:-
>
> perl v5.6.0 built for sun4-solaris with DBI v1.14 and DBD-Oracle v1.06
> on Solaris 2.6 and Oracle7 Server Release 7.3.3.0.0 - Production Release
>
>
> Many thanks.
>
> Regards,
>
> David Wishart
> Server And Interface Team
> Dealer Applications
> FCE Bank plc
>
> Tel: +44-(0)-1277-692570 Fax: +44-(0)-1277-692124
> SMTP: dwishar1_at_ford.com
> Mail: GB-12/300, Jubilee House, The Drive, Brentwood, Essex, CM13 3AR
>
>
>
>
>

--
Posted via CNET Help.com
http://www.help.com/
Received on Thu Feb 15 2001 - 17:30:06 CST

Original text of this message

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