Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Failed to execute SP with error PLS-00201

user11432758Dec 15 2013 — edited Dec 15 2013

I've stored procedure called CAL_TAX which create by schema EMP_DBA, right now I want to grant execute right on this SP to user USER1. I've execute below statement:

CREATE USER USER1 IDENTIFIED BY USER1234;

GRANT CONNECT TO USER1;

GRANT RESOURCE TO USER1;

GRANT CREATE SESSION TO USER1;

GRANT EXECUTE ON EMP_DBA.CAL_TAX TO USER1;

DECLARE

CURSOR C1 IS SELECT TABLE_NAME FROM USER_TABLES;

CMD VARCHAR2(200);

BEGIN

FOR C IN C1 LOOP

CMD:='GRANT SELECT ON ' || C.TABLE_NAME || ' TO USER1';

EXECUTE IMMEDIATE CMD;

END LOOP;

END;

When I connect as USER1 and execute SP CAL_TAX, I received below error messages. Can anyone help me on this ? I've no problem to execute SP if connect as EMP_DBA

BEGIN CAL_TAX; END;

             *

ERROR AT LINE 1:

ORA-06550: LINE 1, COLUMN 7:

PLS-00201: IDENTIFIER 'CAL_TAX' MUST BE DECLARED

ORA-06550:LINE 1, COLUMN 7:

PL/SQL: STATEMENT IGNORED

This is the part of the SP CAL_TAX, could it AUTHID CURRENT_USER caused this problem ?

CREATE OR REPLACE PROCEDURE CAL_TAX

AUTHID CURRENT_USER

IS

.

.

.

This post has been answered by unknown-7404 on Dec 15 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 12 2014
Added on Dec 15 2013
3 comments
597 views