简体   繁体   English

标识符必须声明为 ORA-06550 和 PLS-00201

[英]Identifier must be declared ORA-06550 and PLS-00201

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.我是两台服务器的DBA 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.所有表和存储过程在两个数据库中都运行良好,但是当 Asp.net 尝试连接到它时,一个存储过程不起作用。

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 :当我运行连接到 VM 数据库的 Asp.net 应用程序时,出现以下错误,告诉我必须声明存储过程:

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.我打开我的 SQL Developer 并调试 VM 数据库上的过程,并获得所需的值。 It is only happening in .Net app if I try to get that particular stored procedure.如果我尝试获取该特定存储过程,它只会在 .Net 应用程序中发生。 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我使用了Myuser.storedprocedure名称符号它没有用

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.我不明白的是,完全相同的代码正在本地网络上运行,而且我可以通过 Oracle SQL Developer 调试存储过程。

I can share the stored product here but it is really, really long.我可以在这里分享存储的产品,但它真的很长。

How can I fix this?我怎样才能解决这个问题?

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.我在 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:运行时异常 ORA-06550:第 1 行,第 7 列:
PLS-00201: identifier 'Package.StoredProcedure' must be declared PLS-00201:必须声明标识符“Package.StoredProcedure”
ORA-06550: line 1, column 7: PL/SQL: Statement ignored ORA-06550:第 1 行,第 7 列:PL/SQL:忽略语句

Check your connection string and make sure that you are calling correct database and/or schema name from C# application.检查您的连接字符串并确保您从 C# 应用程序调用正确的数据库和/或架构名称。

If all the other stored procedures are working fine and this specific one not working fine when you debug on oracle sql developer;如果在 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.如果它在 DBA 帐户下对两个数据库进行调试和工作,也应该没有权限问题。

I think if you focus on connection as mmmmmpie said in his comment, you should find the issue.我认为如果你像 mmmmmpie 在他的评论中所说的那样专注于连接,你应该找到问题所在。

I got this error when a stored procedure was changed in the database.当数据库中的存储过程发生更改时,我收到此错误。

The script used for update the changes started with:用于更新更改的脚本开始于:

PROCEDURE myProcedure

By adding the following lines:通过添加以下几行:

CREATE OR REPLACE myProcedure

Solved this error.解决了这个错误。 In my case, maybe this error didn't show at first because it was a new stored procedure.就我而言,也许这个错误一开始没有显示,因为它是一个新的存储过程。

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 :另一个是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.我是两台服务器的DBA 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.所有表和存储过程都可以在两个数据库中正常工作,但是当Asp.net尝试连接到它时,一个存储过程无法正常工作。

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 :当我运行连接到VM数据库的Asp.net应用程序时,出现以下错误告诉我必须声明存储过程:

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.我打开SQL Developer并在VM数据库上调试该过程,然后得到所需的值。 It is only happening in .Net app if I try to get that particular stored procedure.如果我尝试获取特定的存储过程,它只会在.Net应用程序中发生。 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我用Myuser.storedprocedure名称表示法不起作用

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.我不了解的是,完全相同的代码在本地网络上运行,而且我可以通过Oracle SQL Developer调试存储过程。

I can share the stored product here but it is really, really long.我可以在这里共享存储的产品,但是它确实非常长。

How can I fix this?我怎样才能解决这个问题?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ORA-06550:第1行,第37列:PLS-00201:必须声明标识符“ XYZ” - ORA-06550: line 1, column 37: PLS-00201: identifier 'XYZ' must be declared PLS-00201:必须声明标识符“ schema.cursorname” - PLS-00201: identifier 'schema.cursorname' must be declared “ASP.NET / C#中必须声明”pls-00201标识符 - “pls-00201 identifier must be declared” in ASP.NET/C# ORA-06550,PLS-00306; 将数据插入Oracle过程时出错 - ORA-06550, PLS-00306; Error inserting data to Oracle procedure 存储过程调用给出错误PLS-00306 ORA-06550 - Stored procedure call gives an error PLS-00306 ORA-06550 ORA-06550第10行,第41列:PLS-00103:在预期以下情况之一时遇到了符号“,”: - ORA-06550 line 10, column 41: PLS-00103: Encountered the symbol “,” when expecting one of the following: 运行Oracle命令时出现错误ORA-06550和PLS-00103 - Error ORA-06550 and PLS-00103 When Running Oracle Command ODP.Net - 使用自定义类型参数调用存储过程抛出 ORA-06550/PLS-00306 - ODP.Net - Calling stored procedure with custom type parameter throws ORA-06550/PLS-00306 ORA-06550 PLS-00103:在预期以下之一时遇到符号“”::=。 (@%; - ORA-06550 PLS-00103: Encountered the symbol "" when expecting one of the following: := . ( @ % ; ORA-06550:第1行第7列:PLS-00306:参数的数量或类型错误 - ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM