Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Embedded PL/SQL in Pro*C
Any procedure executed must be executable by the user attempting to execute it (the executor).
Who owns the procedure SP_TRUNCATE_RTN? If it's not owned by the executor, then either the executor must have a private synonym pointing to the procedure in another schema, or there must be a public synonym pointing to the procedure in another schema (otherwise, reference the procedure as <schema>.SP_TRUNCATE_RTN). In addition, the procedure owner must grant execute priv on the procedure to the executor. And beyond that, the procedure owner must have sufficient privileges to perform any actions in the body of the procedure. From the 'must be declared' message, I suspect that the executor does not own the procedure, so you need to preface the procedure name with the schema name.
These are generic tips, but they may not address the specific error you have encountered.
Kurt
NeedaHoliday wrote:
> Quick question.
>
> Do I need to declare a PL/SQL procedure in a specific library in order
> for the Pro*C compile to find the module.
>
> I get the following error message for this code;
>
> EXEC SQL EXECUTE
> BEGIN
> SP_TRUNCATE_RTN(:table_name);
> END;
> END-EXEC;
>
> (1) PCC-S-02201, identifier 'SP_TRUNCATE_RTN' must be declared
>
> Thanks in advance
>
> REMOVEjames.stewart_at_pwgsc.gc.ca
>
> Omit REMOVE to email.
Received on Fri Mar 10 2000 - 00:00:00 CST
![]() |
![]() |