Меню

Ошибка ora 06550 pls 00201

Проблемы

«ORA-06550: строка 1, столбец 7: PLS-00201: идентификатор» Диаграмма должна быть объявлена как ORA-06550: строка 1, столбец 7 PL/SQL: оператор проигнорирован «Эта ошибка возникает при настройке компании FRx в качестве значения по умолчанию.

Причина

Таблицы индексов на стороне сервера (также называемые таблицами FRL) не заполнены.

Решение

Чтобы проверить это, выполните следующий запрос для базы данных Ross: SELECT * FROM frl_acct_code если запрос не возвращает какие-либо записи (таблица пуста), необходимо заполнить таблицы индексов на стороне сервера. Запустите сценарий FRX_Conversion. DML. Этот сценарий должен выполняться с помощью Gembase. Для получения дополнительной помощи по этому процессу обратитесь в службу поддержки Ross.

Ссылки

Нужна дополнительная помощь?

The PLS-00201: identifier must be declared error happens when the identifier is used without being declared in the PL/SQL code. Oracle Variables and other identifiers must either be declared or made available before they’ve been used. The variable is used in the code, but it isn’t declared in the database or hasn’t been given permission to use it. It throws an error PLS-00201: identifier must be declared while calling the database identifier.

In the declaration block, the oracle variables should be declared. In PL/SQL code, the variable can be used. The variable cannot be used by PL/SQL code if it is not declared. The variable is not available. The value can neither assign to the variable nor read from the variable. The identifier is not declared and is used in the PL/SQL code, so Oracle will throw an error PLS-00201: identifier must be declared.

Exception

The stack trace for the PLS-00201: identifier must be declared error will look like this. The oracle error would show the name of the identifier that it could not locate in the database, was inaccessible, or did not have authorization to execute.

Error report -
ORA-06550: line 3, column 26:
PLS-00201: identifier 'EMPNAME' must be declared
ORA-06550: line 3, column 5:
PL/SQL: Statement ignored
06550. 00000 -  "line %s, column %s:n%s"

Cause

The identifier cannot be used if it has not been declared in the Oracle database. The memory needed to store and retrieve the value will be created by the identifier declaration. Value cannot assign or retrieve from the variable if the identifier is not declared. The error would be thrown if you use a variable that is not declared or defined in the Oracle database.

Problem

If an identifier is used without being declared in the PL/SQL code, the identifier would not be available in the database. Until the identifier is declared, it can not be used in the PL/SQL code. Otherwise, the identifier would throw an error, prompting you to declare it.

declare
begin
    dbms_output.put_line(empname);
end;

Output

declare
begin
    dbms_output.put_line(empname);
end;
Error report -
ORA-06550: line 3, column 26:
PLS-00201: identifier 'EMPNAME' must be declared
ORA-06550: line 3, column 5:
PL/SQL: Statement ignored
06550. 00000 -  "line %s, column %s:n%s"
*Cause:    Usually a PL/SQL compilation error.
*Action:

Solution 1

The identifier in the code may be misspelled. If the variable is declared, the identifier is misspelled. The spelling of the identifier should be corrected. If the identifier is not found in the declaration, it must be declared. If it hasn’t already been declared, the identifier must be declared.

declare
    empname varchar2(10) :='yawin';
begin
    dbms_output.put_line(empname);
end;

Output

Yawin
PL/SQL procedure successfully completed.

Solution 2

It’s likely that the thing you’re searching for isn’t available, or that it’s misspelled. The error will be thrown when you call the members of the referenced identifier. The error would be thrown if the system packages are misspelled or not visible. The system package’s spelling needs to be changed.

declare
    empname varchar2(10) :='yawin';
begin
    dbms_ooutput.put_line(empname);
end;

Exception

declare
    empname varchar2(10) :='yawin';
begin
    dbms_ooutput.put_line(empname);
end;
Error report -
ORA-06550: line 4, column 5:
PLS-00201: identifier 'DBMS_OOUTPUT.PUT_LINE' must be declared
ORA-06550: line 4, column 5:
PL/SQL: Statement ignored

Solution

declare
    empname varchar2(10) :='yawin';
begin
    dbms_output.put_line(empname);
end;

Output

Yawin
PL/SQL procedure successfully completed.

Solution 3

It’s likely that the referring identifier object isn’t accessible. When the identifier is run, it is unable to locate the identifier’s definition. It is possible that the identifier will not be created or that it will be deleted. It’s likely that the identifier name is misspelled. Check that the identifier has been created and is usable. The name of the identifier reference should be right.

exec printmyname;

Exception

BEGIN printmyname; END;
Error report -
ORA-06550: line 1, column 7:
PLS-00201: identifier 'PRINTMYNAME' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

Solution

create procedure printmyname as
begin
dbms_output.put_line('yawin');
end;
set serveroutput on
exec printmyname;

Output

Yawin
PL/SQL procedure successfully completed.

Solution 4

It’s possible that the identifier object in the Oracle database doesn’t have permission to run. Permission needs to be granted. To receive this authorization, you may need to contact your database administrator.

create procedure myproject.printmyname as
begin
dbms_output.put_line('yawin');
end;
set serveroutput on
exec printmyname;

Exception

BEGIN printmyname; END;
Error report -
ORA-06550: line 1, column 7:
PLS-00201: identifier 'PRINTMYNAME' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

Solution

grant execute on myproject.printmyname to yawin; 
set serveroutput on
exec myproject.printmyname;

Output

Yawin
PL/SQL procedure successfully completed.

Содержание

  1. Let’s Develop in Oracle
  2. ORA-06550: line n, column n
  3. 6 comments:
  4. Accessing TABLE From READ ONLY DATABASE Using DATABASE LINK Within PL/SQL Fails With ORA-06550 ORA-04063 or PLS-00905 (Doc ID 358697.1)
  5. Applies to:
  6. Symptoms
  7. Cause
  8. To view full details, sign in with your My Oracle Support account.
  9. Don’t have a My Oracle Support account? Click to get started!
  10. ORA-06550 and PLS-00201 identifier
  11. Comments
  12. Ora 06550 error in sql
  13. Asked by:
  14. Question
  15. All replies

Let’s Develop in Oracle

ORA-06550: line n, column n

ORA-06550: line string, column string: string
Cause: Usually a PL/SQL compilation error.
Action: none

ORA-06550 is a very simple exception, and occurs when we try to execute a invalid pl/sql block like stored procedure. ORA-06550 is basically a PL/SQL compilation error. Lets check the following example to generate ORA-06550:

Here we create a stored procedure «myproc» which has some compilation errors and when we tried to execute it, ORA-06550 was thrown by the Oracle database. To debug ORA-06550 we can use «show error» statement as:

Now we know variable SAL is not defined and must be written as c.sal. So we will need to make corrections in «myproc» as

Hi every one!
Can anyone give me some idea about PRAGMA INLINE?

Pragma inline is compiler directive to replace its call with its definition, like we have #define in C language
check this link out: http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/inline_pragma.htm

i have created the package
create or replace package maths
as
procedure addition(a in number, b in number,c in out number);
function subtraction(a in number,b in number,c out number) return number;
procedure multiplication(a in number,b in number,c out number);
function division(a in number,b in number,c out number) return number;
end maths;
And i created package body,
create or replace package body maths
as
procedure addition(a in number,b in number,c in out number)
is
begin
c:=a+b;
end addition;
function subtraction(a in number,b in number,c out number) return number
is
begin
c:=a-b;
return c;
end subtraction;
procedure multiplication(a in number,b in number,c out number)
is
begin
c:=a*b;
end multiplication;
function division(a in number,b in number,c out number) return number
is
begin
c:=a/b;
return c;
end division;
end maths;
And then i called the procedure by using the code
set serveroutput on
declare
x number;
y number;
z number;
begin
x:=10;
y:=20;
addition(x,y,z);
dbms_output.put_line(z);
end;
but i am getting the below error:

Error starting at line 148 in command:
declare
x number;
y number;
z number;
begin
x:=10;
y:=20;
addition(x,y,z);
dbms_output.put_line(z);
end;
Error report:
ORA-06550: line 8, column 1:
PLS-00905: object SATYA.ADDITION is invalid
ORA-06550: line 8, column 1:
PL/SQL: Statement ignored
06550. 00000 — «line %s, column %s:n%s»
*Cause: Usually a PL/SQL compilation error.
*Action:

HOW CAN I RESOLVE THIS ERROR CAN ANY ONE PLZ HELP ME:

Источник

Accessing TABLE From READ ONLY DATABASE Using DATABASE LINK Within PL/SQL Fails With ORA-06550 ORA-04063 or PLS-00905 (Doc ID 358697.1)

Last updated on JANUARY 29, 2022

Applies to:

Symptoms

Accessing TABLE From READ ONLY (STANDBY) DATABASE Using DATABASE LINK Within PL/SQL Fails With ORA-06550 ORA-04063 or PLS-00905

To reproduce in remote read only Database:

In local database:

drop database link ora102;
create database link ora102 using ‘ora102’;

declare
i number;
begin
select count(*) into i from x@ora102;
end;
/

If local and remote database have version between Oracle9i 9.2.0 to Oracle 11.2 or later it fails with:

If local database have versions between Oracle8 8.0.6 to Oracle8i 8.1.7 it fails with :

SVRMGR> declare
2> i number;
3> begin
4> select count(*) into i from x@ora817;
5> end;
6> /
select count(*) into i from x@ora817;

*
ORA-06550: line 4, column 33:
PLS-00905: object SCOTT.X@ORA817.WORLD is invalid
ORA-06550: line 4, column 5:
PL/SQL: SQL Statement ignored

If Local Database has a version higher than Oracle9i 9.2.0 and remote Database a version lower than Oracle9i 9.0.1 then it could fails with ORA-00600 [17069]

Work OK When Accessing TABLE Using SQL From READ ONLY (STANDBY) DATABASE Using DATABASE LINK

Cause

To view full details, sign in with your My Oracle Support account.

Don’t have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.

Oracle offers a comprehensive and fully integrated stack of cloud applications and platform services. For more information about Oracle (NYSE:ORCL), visit oracle.com. пїЅ Oracle | Contact and Chat | Support | Communities | Connect with us | | | | Legal Notices | Terms of Use

Источник

ORA-06550 and PLS-00201 identifier

must be declared

I am attempting to execute a sql script in SQLplus, but I am getting this error:
ORA-06550: line 18, column 7
PLS-00201: identifier ‘IPFMODHISTORY.ALLUSERSALLTABLES’ must be declared
PL/SQL: statement ignored

I don’t understand what the problem is. I have granted EXECUTE privileges on the package to the schema owner. I also tried granting EXECUTE privileges on the package to the user. I know the package is there and the ALLUSERSALLTABLES function exists.

Maybe the allusersalltables function is only declared in the package body, not in the specification of ipfmodhistory package. This way the function cannot be called from outside.

I do have the function declared in the spec as well.

I tried something else now. I tried preceeding the package name with the name of the schema, such as: SCHEMA_NAME.ipfModHistory.AllUsersAllTables,
I get this error: ORA-00942: table or view does not exist

what does following query return?

select * from all_objects where object_name = ‘IPFMODHISTORY’;

Why do you have same package under different schemas? It is not recommended to have your own objects under SYS schema.

From which user was the EXECUTE grant given?

Since there is no package body under SYS schema, I presume it would be for PANTOS schema only?

I don’t know why the package is listed under both the SYS schema and the PANTOS schema. And yes, it is for the PANTOS schema only.
Logged in as the user who is trying to execute this package, I did a:
SELECT * FROM USER_TAB_PRIVS_RECD;
and found that PANTOS granted the user EXECUTE privileges on the package.

Thank you,
Laura

Message was edited by:
The Fabulous LB

I tried creating a synonym, but that didn’t help either. I still get the same error message.

Logged in as PANTOS, I tried your example, CREATE SYNONYM ipfModHistory FOR PANTOS.ipfModHistory, and got this error:
ORA-01471: cannot create a synonym with same name as object

So I tried this:
CREATE SYNONYM modhistory FOR PANTOS.ipfModHistory, and the synonym was created.

Logged in as PANTOS, EXECUTE privileges were granted to the user who will actually be executing the SQL script:
GRANT EXECUTE on ipfModHistory TO user2;
Grant succeeded.

Then I modified the SQL script to call the package & function with the synonym. Maybe this is where I am going wrong? And I get the same type of error as before:
PLS-00201: identifier ‘MODHISTORY.ALLUSERSALLTABLES’ must be declared.
PLS-00201: identifier ‘MODHISTORY.ALLUSERSSINGLETABLE’ must be declared.
. and so on.

What am I missing here?

Can you successfully run ipfmodhistory.allusersalltables as the pantos user? From the error message, it appears that the function is trying to access a table that does not exist, or that pantos does not have directly granted privileges on. If any of the tables used in the function are not owned by pantos, you will either need to make a private synonym in the pantos schema, or prefix the table name wih the table owners name.

When i try to execute this script logged in as PANTOS, I get this error:
ORA-00942: table or view does not exist
ORA-06512: at «PANTOS.IPFMODHISTORY», line 73

I am trying to do a select statement inside my function that selects from
v$xml_audit_trail view and the audit_actions table.

So I verified who the owner of this view/table are:
select owner, table_name from dba_tables where table_name = ‘AUDIT_ACTIONS’;
select owner, object_name from all_objects where object_name = ‘V$XML_AUDIT_TRAIL’;

Источник

Ora 06550 error in sql

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Asked by:

Question

We are currently experiencing issues trying to connect to Oracle stored procedures from Microsoft SQL Server Reporting Services 2014, receiving the following error anytime we try and run any stored procedure via a report connecting to an Oracle stored procedure:

ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to ‘ ‘ ORA-06550: line 1, column 7: PL/SQL: Statement ignored

These stored procedures return an “OUT” SYS_REFCURSOR parameter as required to return a data set to SSRS, and it seems to be that parameter that is causing the issue for all our reports.

We are running SSRS on a Windows Server 2012 R2 Standard OS, 64 bit, and SSRS is running under a 64 bit configuration. We have installed the ODAC 64 bit components (64-bit ODAC 12.2c Release 1 (12.2.0.1.1) for Windows x64) for Windows (downloaded from https://www.oracle.com/technetwork/database/windows/downloads/index-090165.html) and also registered the ODP.NET DLLs on the server into the GAC as our reports use this connection method.

From SSRS on the server, we can successfully make a connection to the Oracle datasource using the SSRS Report Manager. And from our development machines, where we installed the 32 bit ODAC / ODT Tools for Visual Studio (ODAC 12.2c Release 1 and Oracle Developer Tools for Visual Studio (12.2.0.1.1)) (because Visual Studio uses the 32-bit ODAC components), we can successfully connect to the Oracle database and execute the reports without the error we are receiving on the server.

We have already validated that we have the correct parameters in the report, and we have validated that we can connect and execute the stored procedures successfully via SQL Plus and also on our local development machines from the SSRS report.

We are trying to connect to an Oracle 11.2.0.4 database.

We have already tried following the advice and procedures from a number of articles, including those listed in other posts on this site such as «https://social.technet.microsoft.com/Forums/en-US/424f750e-7f58-49e3-bd4a-51e0acdd99a4/not-able-to-use-oracle-sp-in-ssrsgetting-an-error?forum=sqlreportingservices» and «https://social.technet.microsoft.com/Forums/en-US/626c9c6c-1c99-4718-9cb1-054a102701cd/ssrs-calling-a-stored-procedure-error-pls00306-wrong-number-or-types-of-arg?forum=sqlreportingservices&ppud=4». But as far as we can tell, the ODAC version we have installed on the server (12.2c Release 1) can connect to an Oracle database version 10g or higher (according to https://www.oracle.com/technetwork/topics/dotnet/install122010-3711118.html), and our database is 11.2.0.4 so we should be good, correct? Or is the Oracle documentation wrong, and in order to connect to an Oracle 11.x database we need the ODAC 11.2.0.3.0 components on the server (even though the ODAC 12.2c components installed on our development machines allow us to run the reports successfully from Visual Studio)?

Anyone have any thoughts?

Thanks in advance.

According to your description , seems you could check in the following aspects.

  • Do not use the stored procedure directly, try to use a simple query check if the query would runs ok in ssrs. If the simple query runs correct , seems it is an issue about the query (stored procedure ), if not seems it is an issue about the connection provider driver.
  • For the query problem .
    1. Check if you have the correct parameter type.
    2. Do you have enough permission to access the stored procedure and the correspond temp table space.
    3. Check your stored procedure again.
    4. Any custom datatype or just mistype.
  • For the provider driver.
    1. Make sure you have correct install the correspond provider driver .(both 32 bit and 64 bit ,and both user level and system level)
    2. The multiple connection driver ‘s crash , try to make sure you have a clean environment .see: Connection error after upgrading from ODAC 9i to 11.2

You could also offer the correspond ssrs log or the oracle log information to us for more further research.

Hope it can help you.

Best Regards, Eric Liu MSDN Community Support Please remember to click Mark as Answer if the responses that resolved your issue, and to click Unmark as Answer if not. This can be beneficial to other community members reading this thread.

Thanks for the response. Following your suggestions, I took the (very simple) PL-SQL out of the stored procedure, and built a new SSRS report to run directly against the SQL, and as expected this worked both on my development machine, and from the server.

However, I don’t necessarily agree that this points to an issue with the stored procedure. I say that because I can successfully use the stored procedure, using the same database and user and connection string, from my development machine and have it work. If there was an issue with the stored proc, then it shouldn’t work anywhere I try and use it, correct?

And the PL-SQL / stored procedure we are trying to get working is extremely simple. Here is the PL-SQL:

WHERE TRUNC (DATECOLUMN) =

TRUNC (TO_DATE (‘2018-01-01’, ‘yyyy-mm-dd’))

And as a stored procedure, it is pretty much just as simple, except that we have defined a single input parameter for the date, and the necessary output parameter to hold the dataset to pass back to the report:

CREATE OR REPLACE PROCEDURE BLAH.spParameterTest (

param1 IN VARCHAR,

Results OUT SYS_REFCURSOR)

OPEN Results FOR

WHERE TRUNC (DATECOLUMN) =

TRUNC (TO_DATE (param1, ‘yyyy-mm-dd’));

I have double (and triple :)) checked the stored procedure, it’s parameters and data types, and permissions, and all seem good (again, we can successfully use it from our development machines). I had actually seen that first article you reference previously and validated all of that.

Regarding the second article — I don’t believe we have that issue either, as we also thought this could be an issue and removed all ODAC installations on the server, then installed the singular ODAC 64 bit components (64-bit ODAC 12.2c Release 1 (12.2.0.1.1) for Windows x64) for Windows component. One item you mentioned peaked my interest though, and that was:

  1. Make sure you have correct install the correspond provider driver .(both 32 bit and 64 bit ,and both user level and system level)

Is the driver not automatically installed where necessary by the ODAC installation? And why would I need the 32 bit driver since I’m using all 64 bit software and OS? And how do I install at a user vs. system level?

Finally, regarding your suggestion to post the related SSRS log, here is an excerpt that we get when we attempt to run the report from the SSRS Report Manager:

  • An error has occurred during report processing. (rsProcessingAborted)
    • Query execution failed for dataset ‘DataSet1’. (rsErrorExecutingCommand)
      • ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to ‘BLAH’ ORA-06550: line 1, column 7: PL/SQL: Statement ignored

And in the SSRS log file we get (sorry for the length :)):

processing!ReportServer_0-1!12d8!01/08/2019-16:35:34:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: , Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset ‘DataSet1’. —> System.Data.OracleClient.OracleException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to ‘BLAH’
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc)
at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals)
at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, ArrayList& resultParameterOrdinals)
at System.Data.OracleClient.OracleCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.OracleClient.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.ReportingServices.DataExtensions.OracleCommandWrapperExtension.ExecuteReader(CommandBehavior behavior)
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunEmbeddedQuery(Boolean& readerExtensionsSupported, Boolean& readerFieldProperties, List`1 queryParams, Object[] paramValues)
— End of inner exception stack trace —
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunEmbeddedQuery(Boolean& readerExtensionsSupported, Boolean& readerFieldProperties, List`1 queryParams, Object[] paramValues)
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunDataSetQueryAndProcessAsIRowConsumer(Boolean processAsIRowConsumer)
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.InitializeAndRunLiveQuery()
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeAtomicDataSet.InitializeRowSourceAndProcessRows()
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeAtomicDataSet.Process()
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeAtomicDataSet.ProcessConcurrent(Object threadSet)
processing!ReportServer_0-1!12d8!01/08/2019-16:35:34:: i INFO: DataPrefetch abort handler called for Report with Aborting data sources .
processing!ReportServer_0-1!12d8!01/08/2019-16:35:34:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: , Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. —> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset ‘DataSet1’. —> System.Data.OracleClient.OracleException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to ‘BLAH’
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc)
at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals)
at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, ArrayList& resultParameterOrdinals)
at System.Data.OracleClient.OracleCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.OracleClient.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.ReportingServices.DataExtensions.OracleCommandWrapperExtension.ExecuteReader(CommandBehavior behavior)
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunEmbeddedQuery(Boolean& readerExtensionsSupported, Boolean& readerFieldProperties, List`1 queryParams, Object[] paramValues)
— End of inner exception stack trace —
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunEmbeddedQuery(Boolean& readerExtensionsSupported, Boolean& readerFieldProperties, List`1 queryParams, Object[] paramValues)
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunDataSetQueryAndProcessAsIRowConsumer(Boolean processAsIRowConsumer)
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.InitializeAndRunLiveQuery()
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeAtomicDataSet.InitializeRowSourceAndProcessRows()
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeAtomicDataSet.Process()
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeAtomicDataSet.ProcessConcurrent(Object threadSet)
— End of inner exception stack trace —
at Microsoft.ReportingServices.OnDemandProcessing.OnDemandProcessingContext.AbortHelper.ThrowAbortException(String uniqueName)
at Microsoft.ReportingServices.OnDemandProcessing.RetrievalManager.FetchData()
at Microsoft.ReportingServices.OnDemandProcessing.RetrievalManager.PrefetchData(ReportInstance reportInstance, ParameterInfoCollection parameters, Boolean mergeTran)
at Microsoft.ReportingServices.OnDemandProcessing.Merge.FetchData(ReportInstance reportInstance, Boolean mergeTransaction)
at Microsoft.ReportingServices.ReportProcessing.Execution.ProcessReportOdpInitial.PreProcessSnapshot(OnDemandProcessingContext odpContext, Merge
webserver!ReportServer_0-1!12d8!01/08/2019-16:35:34:: e ERROR: Reporting Services error Microsoft.ReportingServices.Diagnostics.Utilities.RSException: An error has occurred during report processing. —> Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. —> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset ‘DataSet1’. —> System.Data.OracleClient.OracleException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to ‘BLAH’
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc)
at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals)
at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, ArrayList& resultParameterOrdinals)
at System.Data.OracleClient.OracleCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.OracleClient.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.ReportingServices.DataExtensions.OracleCommandWrapperExtension.ExecuteReader(CommandBehavior behavior)
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunEmbeddedQuery(Boolean& readerExtensionsSupported, Boolean& readerFieldProperties, List`1 queryParams, Object[] paramValues)
— End of inner exception stack trace —
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunEmbeddedQuery(Boolean& readerExtensionsSupported, Boolean& readerFieldProperties, List`1 queryParams, Object[] paramValues)
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunDataSetQueryAndProcessAsIRowConsumer(Boolean processAsIRowConsumer)
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.InitializeAndRunLiveQuery()
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeAtomicDataSet.InitializeRowSourceAndProcessRows()
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeAtomicDataSet.Process()
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeAtomicDataSet.ProcessConcurrent(Object threadSet)
— End of inner exception stack trace —
at Microsoft.ReportingServices.OnDemandProcessing.OnDemandProcessingContext.AbortHelper.ThrowAbortException(String uniqueName)
at Microsoft.ReportingServices.OnDemandProcessing.RetrievalManager.FetchData()
at Microsoft.ReportingServices.OnDemandProcessing.RetrievalManager.PrefetchData(ReportInstance reportInstance, ParameterInfoCollection parameters, Boolean mergeTran)
at Microsoft.ReportingServices.OnDemandProcessing.Merge.FetchData(ReportInstance reportInstance, Boolean mergeTransaction)
at Microsoft.ReportingServic

So, does any of the above give you any clues that might be wrong?

Источник

Troubleshooting

Problem

The «PLS-00201: identifier ‘DBMS_LOCK’ must be declared» error is seen in the SystemOut.log file with a newly created IBM Business Process Manager Version 7.5 profile or with a profile that is migrated from a previous version.

Symptom

The following exception is observed in the SystemOut.log file:

[7/26/11 13:52:09:695 CDT] 0000001c wle           E   CWLLG2229E: An exception occurred in an EJB call.  Error: ConnectionCallback; bad SQL grammar []; nested exception is java.sql.SQLException: ORA-06550: line 1, column 13:

PLS-00201: identifier ‘DBMS_LOCK’ must be declared

ORA-06550: line 1, column 7:

PL/SQL: Statement ignored

org.springframework.jdbc.BadSqlGrammarException: ConnectionCallback; bad SQL grammar []; nested exception is java.sql.SQLException: ORA-06550: line 1, column 13:

PLS-00201: identifier ‘DBMS_LOCK’ must be declared

ORA-06550: line 1, column 7:

PL/SQL: Statement ignored

 at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:111)

 at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322)

 at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:349)

 at com.lombardisoftware.server.tracking.loader.LockHolder.runLockQuery(LockHolder.java:170)

 at com.lombardisoftware.server.tracking.loader.LockHolder.runLockQuery(LockHolder.java:166)

 at com.lombardisoftware.server.tracking.loader.LockHolder.lockSystemTable(LockHolder.java:70)

 at com.lombardisoftware.server.tracking.transfer.DataTransferCore.transferData(DataTransferCore.java:82)

 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)

 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)

 at java.lang.reflect.Method.invoke(Method.java:611)

 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)

 at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)

 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)

 at com.lombardisoftware.utility.spring.TransactionInterceptor$1.call(TransactionInterceptor.java:52)

 at com.lombardisoftware.utility.spring.ProgrammaticTransactionSupport$1.doInTransaction(ProgrammaticTransactionSupport.java:317)

 at org.springframework.transaction.jta.WebSphereUowTransactionManager$UOWActionAdapter.run(WebSphereUowTransactionManager.java:306)

 at com.ibm.ws.uow.UOWManagerImpl.runUnderNewUOW(UOWManagerImpl.java:1067)

 at com.ibm.ws.uow.UOWManagerImpl.runUnderUOW(UOWManagerImpl.java:628)

Cause

The Oracle schema or user does not have access to the DBMS_LOCK package.

Environment

The issue is seen when you have a newly created or a migrated IBM Business Process Manager V7.5 profile with Oracle as the back-end database

Resolving The Problem

Grant Execute permission to the Oracle user or schema that is used for the performance database. Complete the following steps:

  1. Stop the application server.
  2. On the Oracle server, use the ‘SQL Plus Worksheet’ Oracle tool.
  3. Log into the database using administrative credentials.
  4. Run the following script:
    GRANT execute ON DBMS_LOCK TO <schema_name>;

    where <schema_name> is the userID that is used for the performance database.

5. Restart the server

Related Information

[{«Product»:{«code»:»SSFTDH»,»label»:»IBM Business Process Manager Standard»},»Business Unit»:{«code»:»BU053″,»label»:»Cloud & Data Platform»},»Component»:»Installation / Configuration»,»Platform»:[{«code»:»PF002″,»label»:»AIX»},{«code»:»PF016″,»label»:»Linux»},{«code»:»PF027″,»label»:»Solaris»},{«code»:»PF033″,»label»:»Windows»}],»Version»:»8.5;8.0;7.5″,»Edition»:»»,»Line of Business»:{«code»:»LOB45″,»label»:»Automation»}},{«Product»:{«code»:»SSFTN5″,»label»:»IBM Business Process Manager Advanced»},»Business Unit»:{«code»:»BU053″,»label»:»Cloud & Data Platform»},»Component»:»Installation / Configuration»,»Platform»:[{«code»:»PF002″,»label»:»AIX»},{«code»:»PF016″,»label»:»Linux»},{«code»:»PF027″,»label»:»Solaris»},{«code»:»PF033″,»label»:»Windows»}],»Version»:»8.0;7.5.1;7.5″,»Edition»:»»,»Line of Business»:{«code»:»LOB45″,»label»:»Automation»}}]

I executed a PL/SQL script that created the following table

TABLE_NAME VARCHAR2(30) := 'B2BOWNER.SSC_Page_Map';

I made an insert function for this table using arguments

CREATE OR REPLACE FUNCTION F_SSC_Page_Map_Insert(
         p_page_id   IN B2BOWNER.SSC_Page_Map.Page_ID_NBR%TYPE, 
         p_page_type IN B2BOWNER.SSC_Page_Map.Page_Type%TYPE, 
         p_page_dcpn IN B2BOWNER.SSC_Page_Map.Page_Dcpn%TYPE)

I was notified I had to declare B2BOWNER.SSC_Page_Map prior to it appearing as an argument to my function. Why am I getting this error?

EDIT: Actual error

Warning: compiled but with compilation errors
Errors for FUNCTION F_SSC_PAGE_MAP_INSERT

LINE/COL ERROR                                                            
-------- -----------------------------------------------------------------
2/48     PLS-00201: identifier 'SSC_PAGE_MAP.PAGE_ID_NBR' must be declared
0/0      PL/SQL: Compilation unit analysis terminated 

EDIT: Complete PL/SQL Function

RETURN INTEGER
IS
   TABLE_DOES_NOT_EXIST exception;  
   PRAGMA EXCEPTION_INIT(TABLE_DOES_NOT_EXIST, -942); -- ORA-00942

BEGIN

   INSERT INTO 
       B2BOWNER.SSC_Page_Map VALUES(
           p_page_id, 
           p_page_type, 
           p_page_dcpn);

   RETURN 0;

   EXCEPTION
       WHEN TABLE_DOES_NOT_EXIST THEN
           RETURN -1;
       WHEN DUP_VAL_ON_INDEX THEN
           RETURN -2;
       WHEN INVALID_NUMBER THEN
           RETURN -3;
       WHEN OTHERS THEN
           RETURN -4;
END;

SHOW ERRORS PROCEDURE F_SSC_Page_Map_Insert;

GRANT EXECUTE ON F_SSC_Page_Map_Insert TO B2B_USER_DBROLE; 
RETURN INTEGER

EDIT: I change the arguments and received a new error related to the insert command

CREATE OR REPLACE FUNCTION F_SSC_Page_Map_Insert(
                            p_page_id   IN INTEGER, 
                            p_page_type IN VARCHAR2, 
                            p_page_dcpn IN VARCHAR2)

RETURN INTEGER
IS

TABLE_DOES_NOT_EXIST exception;  
PRAGMA EXCEPTION_INIT(TABLE_DOES_NOT_EXIST, -942); -- ORA-00942

BEGIN

INSERT INTO 
    B2BOWNER.SSC_Page_Map VALUES(
        p_page_id, 
        p_page_type, 
        p_page_dcpn);

The error

Errors for FUNCTION F_SSC_PAGE_MAP_INSERT

LINE/COL ERROR                                                            
-------- -----------------------------------------------------------------
17/18    PL/SQL: ORA-00942: table or view does not exist                  
16/5     PL/SQL: SQL Statement ignored                                    

The tables has been verified within the correct schema and with the correct attribute names and types

EDIT: I executed the following command to check if I have access

DECLARE
    count_this INTEGER;

BEGIN

select count(*) into count_this 
from all_tables 
where owner = 'B2BOWNER' 
and table_name = 'SSC_PAGE_MAP';

DBMS_OUTPUT.PUT_LINE(count_this);

END;

The output I received is

1
PL/SQL procedure successfully completed.

I have access to the table.

EDIT:

So I finally conducted an insert into the table via the schema using PL/SQL and it worked fine. It appears I simply do not have authority to create functions but that is an assumption.

EDIT:

Actual table DDL statement

 v_create := 'CREATE TABLE ' ||  TABLE_NAME || ' (
                PAGE_ID_NBR   NUMERIC(10)   NOT NULL Check(Page_ID_NBR > 0),
                PAGE_TYPE     VARCHAR2(50)  NOT NULL, 
                PAGE_DCPN     VARCHAR2(100) NOT NULL,
                PRIMARY KEY(Page_ID_NBR, Page_Type))';

EXECUTE IMMEDIATE v_create; 

COMMIT WORK;

COMMIT COMMENT 'Create Table'; 

I have a PL/SQL Procedure code, which runs when it is / , but doesn’t runs when it’s executed. The error message I get is

SQL> EXECUTE MAXINUM;
BEGIN MAXINUM; END;

      *
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'MAXINUM' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

The code which I’m working on is :

DECLARE
    N NUMBER;
    M NUMBER;
    O NUMBER;
    P NUMBER;
    X NUMBER;
PROCEDURE MAXINUM(N IN NUMBER, M IN NUMBER, O IN NUMBER, P IN NUMBER, X OUT NUMBER) IS
    BEGIN
    IF N>M AND N>O AND N>P THEN
        X:=N;
    ELSIF M>N AND M>O AND M>P THEN
        X:=M;
    ELSIF O>N AND O>M AND O>P THEN
        X:=O;
    ELSIF P>N AND P>M AND P>O  THEN
        X:=P;
    END IF;
    END;

BEGIN
    N:=&NUMBER;    
    M:=&NUMBER;
    O:=&NUMBER;
    P:=&NUMBER;
    MAXINUM(N,M,O,P,X);
    DBMS_OUTPUT.PUT_LINE('HIGHEST NUMBER = '||X);
END;
/

When it gave the ‘identifier error’, I tried dropping this procedure I got the error:

SQL> DROP PROCEDURE MAXINUM;
DROP PROCEDURE MAXINUM
*
ERROR at line 1:
ORA-04043: object MAXINUM does not exist

I have so far read this, this, this solutions and other solutions some what related to this error.

I have a PL/SQL Procedure code, which runs when it is / , but doesn’t runs when it’s executed. The error message I get is

SQL> EXECUTE MAXINUM;
BEGIN MAXINUM; END;

      *
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'MAXINUM' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

The code which I’m working on is :

DECLARE
    N NUMBER;
    M NUMBER;
    O NUMBER;
    P NUMBER;
    X NUMBER;
PROCEDURE MAXINUM(N IN NUMBER, M IN NUMBER, O IN NUMBER, P IN NUMBER, X OUT NUMBER) IS
    BEGIN
    IF N>M AND N>O AND N>P THEN
        X:=N;
    ELSIF M>N AND M>O AND M>P THEN
        X:=M;
    ELSIF O>N AND O>M AND O>P THEN
        X:=O;
    ELSIF P>N AND P>M AND P>O  THEN
        X:=P;
    END IF;
    END;

BEGIN
    N:=&NUMBER;    
    M:=&NUMBER;
    O:=&NUMBER;
    P:=&NUMBER;
    MAXINUM(N,M,O,P,X);
    DBMS_OUTPUT.PUT_LINE('HIGHEST NUMBER = '||X);
END;
/

When it gave the ‘identifier error’, I tried dropping this procedure I got the error:

SQL> DROP PROCEDURE MAXINUM;
DROP PROCEDURE MAXINUM
*
ERROR at line 1:
ORA-04043: object MAXINUM does not exist

I have so far read this, this, this solutions and other solutions some what related to this error.

totn Oracle Error Messages


Learn the cause and how to resolve the ORA-06550 error message in Oracle.

Description

When you encounter an ORA-06550 error, the following error message will appear:

  • ORA-06550: line num, column num: str

Cause

You tried to execute an invalid block of PLSQL code (like a stored procedure or function), but a compilation error occurred.

Resolution

The option(s) to resolve this Oracle error are:

Option #1

Refer to the line and column numbers (in the error message) to find the compilation error and correct it. Then try recompiling your code.

Let’s look at an example of how to resolve an ORA-06550 error. For example, if you created a procedure called TestProc as follows:

SQL> CREATE OR REPLACE PROCEDURE TestProc
  2  AS
  3    vnum number;
  4  BEGIN
  5    vnum := vAnotherNum;
  6  END;
  7  /

Warning: Procedure created with compilation errors.

This procedure was created with compilation errors. So if we try to execute this procedure, we will get an ORA-06550 error as follows:

SQL> execute TestProc();
BEGIN TestProc(); END;

*
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00905: object EXAMPLE.TESTPROC is invalid
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

You can run the SHOW ERROR command to view the errors as follows:

SQL> show error procedure TestProc;
Errors for PROCEDURE TESTPROC:

LINE/COL ERROR
-------- -----------------------------------------------------------------
5/1	 PL/SQL: Statement ignored
5/9	 PLS-00201: identifier 'VANOTHERNUM' must be declared

As you can see, the error is caused by the variable called VANOTHERNUM not being declared. To resolve this error, we can modify our TestProc procedure to declare the variable as follows:

SQL> CREATE OR REPLACE PROCEDURE TestProc
  2  AS
  3    vnum number;
  4    vAnotherNumber number;
  5  BEGIN
  6    vAnotherNum := 999;
  7    vnum := vAnotherNum;
  8  END;
  9  /

Procedure created.

And now when we execute our TestProc procedure, the ORA-06550 error has been resolved.

SQL> execute TestProc();

PL/SQL procedure successfully completed.

Вопрос:

У меня две базы данных; один находится на локальном сервере;

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

Другой – виртуальная машина:

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

Все остальное об этих серверах одинаково. Я DBA для обоих серверов. Все таблицы и хранимые процедуры работают в обеих базах данных, но одна хранимая процедура не работает, когда Asp.net пытается подключиться к ней.

Когда я запускаю приложение Asp.net, которое подключается к базе данных VM, я получаю следующую ошибку, сообщающую мне, что хранимая процедура должна быть объявлена:

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

Я открываю свой SQL Developer и отлаживаю процедуру в базе данных VM, и получаю нужные значения. Это происходит только в приложении.Net, если я пытаюсь получить эту конкретную хранимую процедуру. Все остальное, будучи всеми остальными хранимыми процедурами, отлично работает.

Что я сделал, чтобы решить проблему;

  1. Изменено имя процедуры (не работает)
  2. Проверьте схему, чтобы убедиться, что все таблицы и хранимые процедуры принадлежат правильному пользователю (они принадлежат правильному пользователю)
  3. Я предоставил доступ к пользователю, даже если хранимая процедура создана этим пользователем.
  4. Я бросил и воссоздал хранимую процедуру
  5. Я использовал Myuser.storedprocedure имени Myuser.storedprocedure это не сработало

Я не понимаю, что тот же самый код работает в локальной сети, а также что я могу отлаживать хранимую процедуру через Oracle SQL Developer.

Я могу поделиться сохраненным продуктом здесь, но он действительно, очень длинный.

Как я могу это исправить?

Лучший ответ:

Проверьте строку подключения и убедитесь, что вы вызываете правильную базу данных и/или имя схемы из приложения С#.

Если все остальные хранимые процедуры работают нормально, и этот конкретный не работает нормально, когда вы отлаживаете приложение разработчика oracle sql; это должна быть проблема связи. Если он отлаживает и работает в обеих базах данных под учетной записью DBA, также не должно быть проблем с разрешениями.

Я думаю, что если вы сосредоточитесь на подключении, как сказал mmmmmpie в своем комментарии, вы должны найти проблему.

Ответ №1

Вы получаете эту ошибку из-за недостаточного разрешения на выполнение хранимой процедуры. Попробуйте предоставить разрешения на уровне пользователя (уровень пользователя означает, через какие учетные данные вы подключаетесь к базе данных. Проверьте свой файл конфигурации).

У меня такая же проблема. Я создал хранимую процедуру в Oracle DB. Я выполнил, он скомпилирован успешно. Но это было проблемой во время выполнения. После предоставления разрешений на уровне пользователя для хранимой процедуры, проблема полностью решена.

Исключение времени выполнения ORA-06550: строка 1, столбец 7:
PLS-00201: идентификатор “Package.StoredProcedure” должен быть объявлен
ORA-06550: строка 1, столбец 7: PL/SQL: выражение игнорируется

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Ошибка ora 06413 соединение не открыто
  • Ошибка ora 03113 end of file on communication channel