Identifier must be declared ORA-06550 and PLS-00201

40,089

Solution 1

Check your connection string and make sure that you are calling correct database and/or schema name from C# application.

If all the other stored procedures are working fine and this specific one not working fine when you debug on oracle sql developer; it must be connection issue. If it debugs and work on both databases under DBA account there should be no permissions issues as well.

I think if you focus on connection as mmmmmpie said in his comment, you should find the issue.

Solution 2

You are getting this error because of insufficient permission to execute the stored procedure. Try to grant permissions at the user level (user level means through which credentials you are connecting to the database. Check in your config file).

I got the same issue. I created a stored procedure in Oracle DB. I executed, it compiled successfully. But, it was getting issue at runtime. After granting permissions at user level for the stored procedure then the issue resolved completely.

Run-time Exception ORA-06550: line 1, column 7:
PLS-00201: identifier 'Package.StoredProcedure' must be declared
ORA-06550: line 1, column 7: PL/SQL: Statement ignored

Share:
40,089
Mord Fustang
Author by

Mord Fustang

Updated on July 23, 2022

Comments

  • Mord Fustang
    Mord Fustang almost 2 years

    I have two databases; one is in local server;

    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    "CORE   11.1.0.7.0  Production"
    TNS for 64-bit Windows: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production
    

    The other one is a VM :

    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    PL/SQL Release 11.2.0.4.0 - Production
    "CORE   11.2.0.4.0  Production"
    TNS for Linux: Version 11.2.0.4.0 - Production
    NLSRTL Version 11.2.0.4.0 - Production
    

    Everything else about these servers are identical. I am DBA for both of the servers. All the tables and stored procedures and are working fine in both databases but one stored procedure is not working when Asp.net tries to connect to it.

    When I run my Asp.net app that is connecting to the VM database I get the following error telling me that stored procedure must be declared :

    Message: Sys.WebForms.PageRequestManagerServerErrorException: ORA-06550: line 1, column 7: PLS-00201: identifier 'GETINFO' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored

    I open my SQL Developer and debug the procedure on the VM database and I get the desired values. It is only happening in .Net app if I try to get that particular stored procedure. Everything else, being all the other stored procedures, are working fine.

    What I have done to fix the issue;

    1. Changed the name of the procedure (didnt work)
    2. Checked the schema to make sure all the tables and stored procedures belongs to correct user (they do belong to correct user)
    3. I granted access to user even though stored procedure created by that user.
    4. I dropped and recreated stored procedure
    5. I used Myuser.storedprocedure name notation it didnt work

    What I don't understand is that exact same code is working on local network, and also that I can debug the stored procedure via Oracle SQL Developer.

    I can share the stored product here but it is really, really long.

    How can I fix this?