Usually a pl sql compilation error

Hi there, I'm comming crazy guys. I need help. I am making a call to a DB Procedure (which exists; its correct written) from a block properties, so when I execute the query from the application, it ...

Hi there,

I’m comming crazy guys. I need help. I am making a call to a DB Procedure (which exists; its correct written) from a block properties, so when I execute the query from the application, it returns the data from a cursor into the form. That should be it, but an ORA-6550 pops-up with no data return at the Execute Query Trigger, at Form Level. This is it:

BLOCK’S PROPERTIES:
— The block is a DB block.
— Query Data Source Type: Procedure
— Query Data Source Name: PackageName.ID_QUERY
— Query Data Source Columns: 9 columns, put in the same order than as called from the DB Procedure (which has a cursor on it as I will show); I declare the Type of each column with its length as at the DB Table is. NO SPACES after the name of each Column Name!!! After the last columns, I have checked there wasn’t spaces either in the next place to put another Column.
— Query Data Source Arguments: 2 argument names: a cursor (type: RefCursor, Type Name: PackageName.B_CURSOR, Mode: in out) and the parameter the user inserts to make the query (Type: Number, Mode: In; Value: :block.itemName). At the place of the third argument, nothing, no spaces.

DB Procedure:

PROCEDURE ID_QUERY (CUR IN OUT B_CURSOR, PARAM IN NUMBER) IS
BEGIN

OPEN CUR FOR
SELECT A.NUM_RET,
B.NOM_NOM, B.NOM_APE1, B.NOM_APE2,
A.COD_DES,
A.COD_ULT,
C.TIP_NIV,
A.NUM_TIME
FROM AP_1 A, AP_2 B, AP_3 C
WHERE A.COD_AFE = B.COD_PER
AND A.COD_ULT = C.COD_SIT
AND A.NUM_RET = PARAM;

EXCEPTION
WHEN OTHERS THEN
OPEN CUR FOR
SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
FROM AP_RET A
WHERE A.NUM_RET = PARAM;

END ID_QUERY;

I have tryed the Query. It works!!!

The thing is SYMPLE!!! But i have the error ORA-6550, and… I don’t get it!!!

I need some help. Somedy please tell me something to try.

What I’ve tried until now is:
— To change the Procedure’s name, at DB and at Block’s Properties Query Data Source Name.
— To create a new Block, with all this stuff again.
— To erase possible spaces left at the Column Names.
— To put the same order the DB Cursor Query Columns has at Block’s Query Data Source Columns.
— I have checked all the Columns Types, and All the Columns Lengths types.

Please, tell me something to try. I’ve been 3h now with this error…

Thank you!!!

Are you getting the ORA-06550 error when running an SQL statement? Learn the cause of this error and the solution in this article.

Demonstration of the Error

To demonstrate this error, I can run this code that creates a stored procedure:

CREATE OR REPLACE PROCEDURE testProcedure AS
  textValue VARCHAR2(3);
BEGIN
  textValue := someOtherValue;
END;

If I compile this procedure, I get this message:

Procedure TESTPROCEDURE compiled
Errors: check compiler log

Now, I can run this procedure:

EXEC testProcedure;
Error starting at line : 8 in command -
EXEC testProcedure
Error report -
ORA-06550: line 1, column 7:
PLS-00905: object INTRO_USER.TESTPROCEDURE is invalid
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
06550. 00000 -  "line %s, column %s:n%s"
*Cause:    Usually a PL/SQL compilation error.
*Action:

As you can see, I get the error code ORA-06550: line X column X.

What caused this error?

ORA-06550 Cause

ORA-06550 is caused by a PL/SQL compilation error – an error in your PL/SQL code.

The cause of the error is actually dependent on the error it is linked to.

It’s a bit of a decoy. It says “Hey, I’ve found an error, but your actual error is over there!”

As you might notice, when you get an ORA-06550 error, it is accompanied by a second error message just below it.

You should be able to see this if you’re running SQL Developer or Toad (or many other IDEs).

Go to View > Log, and a Log window should appear.

ORA-06550 line N column N Solution

If not, you can run the SHOW ERRORS command.

SHOW ERRORS;
Errors for PROCEDURE INTRO_USER.TESTPROCEDURE:
LINE/COL ERROR
-------- -------------------------------------------------------
4/3      PL/SQL: Statement ignored
4/16     PLS-00201: identifier 'SOMEOTHERVALUE' must be declared

This will show the error message that causes this error to appear, which could be one of many errors.

To resolve the ORA-06550 error, first fix the error that comes with it.

The error that comes with it is also more descriptive of the actual issue.

For example, in our example above, I also got a PLS-00201 error.

This was because I had mentioned a variable called someOtherValue but this was not declared anywhere.

To fix this, I would need to declare the variable, correct a typo if I spelt it wrong, or use another value.

Once you have fixed the error, recompile the code.

For example:

CREATE OR REPLACE PROCEDURE testProcedure AS
  textValue VARCHAR2(3);
BEGIN
  textValue := 'ABC';
END;
Procedure TESTPROCEDURE compiled
EXEC testProcedure;
PL/SQL procedure successfully completed.

Hopefully this article has helped you resolve the ORA-06550 error message.

Содержание

  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?

Источник

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

Reference: http://docs.oracle.com/cd/B19306_01/server.102/b14219/e4100.htm

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:

SQL> create or replace procedure myproc
  2  as
  3  begin
  4     for c in (select * from scott.emp)
  5     loop
  6             dbms_output.put_line(c.empno || ' ' || c.ename || ' ' || sal);
  7     end loop;
  8  end;
  9  /
Warning: Procedure created with compilation errors.

SQL> exec myproc
BEGIN myproc; END;
      *
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00905: object MYUSER.MYPROC is invalid
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

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:

SQL> show error procedure myproc
Errors for PROCEDURE MYPROC:

LINE/COL ERROR
-------- -----------------------------------------------------------------
6/3      PL/SQL: Statement ignored
6/60     PLS-00201: identifier 'SAL' must be declared

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

SQL> create or replace procedure myproc
  2  as
  3  begin
  4     for c in (select * from scott.emp)
  5     loop
  6             dbms_output.put_line(c.empno || ' ' || c.ename || ' ' || c.sal);
  7     end loop;
  8  end;
  9  /
Procedure created.

SQL> set serveroutput on

SQL> exec myproc
7369 SMITH 800
7499 ALLEN 1600
7521 WARD 1250
7566 JONES 2975
7654 MARTIN 1250
7698 BLAKE 2850
7782 CLARK 2450
7788 SCOTT 3000
7839 KING 5000
7844 TURNER 1500
7876 ADAMS 1100
7900 JAMES 950
7902 FORD 3000
7934 MILLER 1300
PL/SQL procedure successfully completed.

Related Posts:
— ORA-00936 missing expression
— ORA-00911: invalid character
— ORA-01722: invalid number
— ORA-00904: invalid identifier
— ORA-06502: PL/SQL: numeric or value errorstring

Oracle 11g Error Codes and Solution Suggestions from ORA-06500 to ORA-06600

ORA-06500: PL/SQL: storage error
Cause: PL/SQL was unable to allocate additional storage. This message normally appears with an ORA-4030 or ORA-4031 error which gives additional information. Sometimes this error can be caused by runaway programs.
Action: 1) Ensure there are no issues or bugs in your PL/SQL program which are causing excessive amounts of memory to be used. 2) Programmatically cause unused objects to be freed (e.g. by setting them to NULL). 3) Increase the amount of shared or process memory (as appropriate) available to you.
ORA-06501: PL/SQL: program error
Cause: This is an internal error message. An error has been detected in a PL/SQL program.
Action: Contact Oracle Support Services.
ORA-06502: PL/SQL: numeric or value errorstring
Cause: An arithmetic, numeric, string, conversion, or constraint error occurred. For example, this error occurs if an attempt is made to assign the value NULL to a variable declared NOT NULL, or if an attempt is made to assign an integer larger than 99 to a variable declared NUMBER(2).
Action: Change the data, how it is manipulated, or how it is declared so that values do not violate constraints.
ORA-06503: PL/SQL: Function returned without value
Cause: A call to PL/SQL function completed, but no RETURN statement was executed.
Action: Rewrite PL/SQL function, making sure that it always returns a value of a proper type.
ORA-06504: PL/SQL: Return types of Result Set variables or query do not match
Cause: Number and/or types of columns in a query does not match declared return type of a result set variable, or declared types of two Result Set variables do not match.
Action: Change the program statement or declaration. Verify what query the variable actually refers to during execution.
ORA-06505: PL/SQL: variable requires more than 32767 bytes of contiguous memory
Cause: A PL/SQL variable was declared with a constraint which required more than 32767 bytes of memory. PL/SQL does not currently support allocations of contiguous memory greater than 32767 bytes.
Action: Consider reducing the constraint in the variable declaration. If that is not possible, try changing the database or national character set to such, that requires less memory for the same constraint. Note: changing the character set will impact execution of all PL/SQL code.
ORA-06510: PL/SQL: unhandled user-defined exception
Cause: A user-defined exception was raised by PL/SQL code, but not handled.
Action: Fix the problem causing the exception or write an exception handler for this condition. Or you may need to contact your application administrator or DBA.
ORA-06511: PL/SQL: cursor already open
Cause: An attempt was made to open a cursor that was already open.
Action: Close cursor first before reopening.
ORA-06512: at stringline string
Cause: Backtrace message as the stack is unwound by unhandled exceptions.
Action: Fix the problem causing the exception or write an exception handler for this condition. Or you may need to contact your application administrator or DBA.
ORA-06513: PL/SQL: index for PL/SQL table out of range for host language array
Cause: An attempt is being made to copy a PL/SQL table to a host language array. But an index in the table is either less than one or greater than the maximum size of the host language array. When copying PL/SQL tables to host language arrays, the table entry at index 1 is placed in the first element of the array, the entry at index 2 is placed in the second element of the array, etc. If an table entry has not been assigned then the corresponding element in the host language array is set to null.
Action: Increase size of host language array, or decrease size of PL/SQL table. Also make sure that you don’t use index values less than 1.
ORA-06514: PL/SQL: The remote call cannot be handled by the server
Cause: The remote call has parameters that are cursor variables or lob variables. This cannot be handled by stored procedures on your server.
Action: Avoid using cursor variables or lob variables as parameters for stored procedures on this server or upgrade your server to a version that supports this.
ORA-06515: PL/SQL: unhandled exception string
Cause: An exception was raised by PL/SQL code, but not handled. The exception number is outside the legal range of Oracle errors.
Action: Fix the problem causing the exception or write an exception handler for this condition. Or you may need to contact your application administrator or DBA.
ORA-06516: PL/SQL: the Probe packages do not exist or are invalid
Cause: A Probe operation, probably an attempt to initialize the ORACLE server to debug PL/SQL, could not be completed because the Probe packages were not loaded or have become invalid.
Action: DBA should load the Probe packages. This can be done by running the pbload.sql script supplied with the RDBMS.
ORA-06517: PL/SQL: Probe error – string
Cause: An error occurred while passing a Probe operation to the server for execution.
Action: Refer to the entry for the embedded error message.
ORA-06518: PL/SQL: Probe version string incompatible with version string
Cause: The current version of Probe is incompatible with the version on the ORACLE server.
Action: Refer to the documentation to ensure that this degree of compatibility is supported.
ORA-06519: active autonomous transaction detected and rolled back
Cause: Before returning from an autonomous PL/SQL block, all autonomous transactions started within the block must be completed (either committed or rolled back). If not, the active autonomous transaction is implicitly rolled back and this error is raised.
Action: Ensure that before returning from an autonomous PL/SQL block, any active autonomous transactions are explicitly committed or rolled back. ———————————————————————– 06520 through 06529 reserved for Foreign function errors
ORA-06520: PL/SQL: Error loading external library
Cause: An error was detected by PL/SQL trying to load the external library dynamically.
Action: Check the stacked error (if any) for more details.
ORA-06521: PL/SQL: Error mapping function
Cause: An error was detected by PL/SQL trying to map the mentioned function dynamically.
Action: Check the stacked error (if any) for more details.
ORA-06522: string
Cause: ORA-06520 or ORA-065211 could stack this error with a system specific error string.
Action: This error string should give the cause for errors ORA-06520 or ORA-065211
ORA-06523: Maximum number of arguments exceeded
Cause: There is an upper limit on the number of arguments that one can pass to the external function.
Action: Check the port specific documentation on how to calculate the upper limit.
ORA-06524: Unsupported option : string
Cause: The option specified is an unsupported feature for external procedures.
Action: Correct the syntax in the external specification
ORA-06525: Length Mismatch for CHAR or RAW data
Cause: The length specified in the length variable has an illegal value. This can happen if you have requested requested a PL/SQL INOUT, OUT or RETURN raw variable to be passed as a RAW with no corresponding length variable. This error can also happen if there is a mismatch in the length value set in the length variable and the length in the orlvstr or orlraw.
Action: Correct the external procedure code and set the length variable correctly.
ORA-06526: Unable to load PL/SQL library
Cause: PL/SQL was unable to instantiate the library referenced by this referenced in the EXTERNAL syntax. This is a serious error and should normally not happen.
Action: Report this problem to customer support.
ORA-06527: External procedure SQLLIB error: string
Cause: An error occurred in sqllib during execution of a Pro* external procedure.
Action: The message text indicates the actual SQLLIB error that occurred. Consult the Oracle Error Messages and Codes manual for a complete description of the error message and follow the appropriate action.
ORA-06528: Error executing PL/SQL profiler
Cause: An error occurred in during execution of a PL/SQL profiler procedure.
Action: Check the stacked errors for more details.
ORA-06529: Version mismatch – PL/SQL profiler
Cause: The PL/SQL profiler package (dbmspb.sql, prvtpbp.plb) does not match the version of the code in the server implementing the profiler.
Action: Run the package profload.sql in $ORACLE_HOME/rdbms/admin to load the correct version of the PL/SQL profiler packages
ORA-06530: Reference to uninitialized composite
Cause: An object, LOB, or other composite was referenced as a left hand side without having been initialized.
Action: Initialize the composite with an appropriate constructor or whole-object assignment.
ORA-06531: Reference to uninitialized collection
Cause: An element or member function of a nested table or varray was referenced (where an initialized collection is needed) without the collection having been initialized.
Action: Initialize the collection with an appropriate constructor or whole-object assignment.
ORA-06532: Subscript outside of limit
Cause: A subscript was greater than the limit of a varray or non-positive for a varray or nested table.
Action: Check the program logic and increase the varray limit if necessary.
ORA-06533: Subscript beyond count
Cause: An in-limit subscript was greater than the count of a varray or too large for a nested table.
Action: Check the program logic and explicitly extend if necessary.
ORA-06534: Cannot access Serially Reusable package string
Cause: The program attempted to access a Serially Reusable package in PL/SQL called from SQL context (trigger or otherwise). Such an access is currently unsupported.
Action: Check the program logic and remove any references to Serially Reusable packages (procedure, function or variable references) which might happen in PL/SQL called from sql context (trigger or otherwise).
ORA-06535: statement string in string is NULL or 0 length
Cause: The program attempted to use a dynamic statement string that was either NULL or 0 length.
Action: Check the program logic and ensure that the dynamic statement string is properly initialized.
ORA-06536: IN bind variable bound to an OUT position
Cause: The program attempted to bind an IN bind variable to a statement that was expecting an OUT bind variable at that position.
Action: Make sure that an OUT or IN OUT bind mode is specified for the bind argument.
ORA-06537: OUT bind variable bound to an IN position
Cause: The program attempted to bind an OUT bind variable to a statement that was expecting an IN bind variable at that position.
Action: Make sure that an IN or IN OUT bind mode is specified for the bind argument.
ORA-06538: statement violates string RESTRICT_REFERENCES pragma
Cause: The program attempted to execute a dynamic statement which does not meet the purity level specified (in the pragma RESTRICT_REFERENCES directive) for the module executing the statement.
Action: Ensure that the dynamic statement meets the purity level specified for the module executing the statement.
ORA-06539: target of OPEN must be a query
Cause: The program attempted to perform an OPEN cursor operation on a dynamic statement that was not a query.
Action: Ensure that the OPEN cursor operation is done on a dynamic query statement. ——————————————————– 06540 through 06549 reserved for pl/sql error handling
ORA-06540: PL/SQL: compilation error
Cause: A pl/sql compilation error occurred. However, the user generally will not see this error message. Instead, there will be accompanying PLS-nnnnn error messages.
Action: See accompanying PLS-nnnnn error messages.
ORA-06541: PL/SQL: compilation error – compilation aborted
Cause: A pl/sql compilation error occurred and the compilation was aborted; but the compilation unit was written out to the backing store. However, unlike ora-06545, the user generally will not see this error message. Instead, there will be accompanying PLS-nnnnn error messages.
Action: See accompanying PLS-nnnnn error messages.
ORA-06544: PL/SQL: internal error, arguments: [string], [string], [string], [string], [string], [string], [string], [string]
Cause: A pl/sql internal error occurred.
Action: Report as a bug; the first argument is the internal error nuber.
ORA-06545: PL/SQL: compilation error – compilation aborted
Cause: A pl/sql compilation error occurred and the compilation was aborted completely without the compilation unit being written out to the backing store. Unlike ora-06541, the user will always see this error along with the accompaning PLS-nnnnn error messages.
Action: See accompanying PLS-nnnnn error messages.
ORA-06546: DDL statement is executed in an illegal context
Cause: DDL statement is executed dynamically in illegal PL/SQL context.
– Dynamic OPEN cursor for a DDL in PL/SQL
– Bind variable’s used in USING clause to EXECUTE IMMEDIATE a DDL
– Define variable’s used in INTO clause to EXECUTE IMMEDIATE a DDL
Action: Use EXECUTE IMMEDIATE without USING and INTO clauses to execute the DDL statement.
ORA-06547: RETURNING clause must be used with INSERT, UPDATE, or DELETE statements
Cause: EXECUTE IMMEDIATE with a RETURNING clause is used to execute dynamic UPDATE, INSERT, or DELETE statements only.
Action: use RETURNING clause in EXECUTE IMMEDIATE for INSERT, UPDATE, or DELETE statements only. For other statements, use USING clause instead.
ORA-06548: no more rows needed
Cause: The caller of a pipelined function did not need more rows to be produced by the pipelined function.
Action: Do not catch the NO_DATA_NEEDED exception in an exception handling block.
ORA-06549: PL/SQL: failed to dynamically open shared object (DLL): string:string
Cause: One possible cause might be there are too many DLLs open at the same time.
Action: ——————————————————–
ORA-06550: line string, column stringstring
Cause: Usually a PL/SQL compilation error.
Action: None
ORA-06554: package DBMS_STANDARD must be created before using PL/SQL
Cause: The DBMS specific extensions to PL/SQL’s package “STANDARD” are in package “DBMS_STANDARD”. This package must be created before using PL/SQL.
Action: Create package “DBMS_STANDARD”. The source for this PL/SQL stored package is provided with the distribution.
ORA-06555: this name is currently reserved for use by user SYS
Cause: You tried to create a package named “STANDARD”, “DBMS_STANDARD” or “DEBUG_IO”. These are currently reserved for use by user SYS.
Action: Choose another name for your package.
ORA-06556: the pipe is empty, cannot fulfill the unpack_message request
Cause: There are no more items in the pipe.
Action: Check that the sender and receiver agree on the number and types of items placed on the pipe.
ORA-06557: null values are not allowed for any parameters to pipe icd’s
Cause: Internal error from the dbms_pipe package.
Action: None
ORA-06558: buffer in dbms_pipe package is full. No more items allowed
Cause: The pipe buffer size has been exceeded.
Action: None
ORA-06559: wrong datatype requested, string, actual datatype is string
Cause: The sender put different datatype on the pipe than that being requested (package ‘dbms_pipe’). The numbers are: 6 – number, 9 – char, 12 – date.
Action: Check that the sender and receiver agree on the number and types of items placed on the pipe.
ORA-06560: pos, string, is negative or larger than the buffer size, string
Cause: Internal error from the dbms_pipe package.
Action: None
ORA-06561: given statement is not supported by package DBMS_SQL
Cause: Attempting to parse an unsupported statement using procedure PARSE provided by package DBMS_SQL.
Action: Only statements which begin with SELECT, DELETE, INSERT, UPDATE, LOCK, BEGIN, DECLARE or << (PL/SQL label delimiter) are supported.
ORA-06562: type of out argument must match type of column or bind variable
Cause: Attempting to get the value of a column or a bind variable by calling procedure COLUMN_VALUE or VARIABLE_VALUE of package DBMS_SQL but the type of the given out argument where to place the value is different from the type of the column or bind variable that was previously defined by calling procedure DEFINE_COLUMN (for defining a column) or BIND_VARIABLE (for binding a bind variable) of package DBMS_SQL.
Action: Pass in an out argument of the correct type when calling procedure COLUMN_VALUE or VARIABLE_VALUE. The right type is the type that was provided when defining the column or binding the bind variable.
ORA-06563: name has too many parts
Cause: The name to be resolved was specified as one of the following:
– With three parts (A.B.C) but the A.B parts resolved to an object that did not expose visible nested procedures; the C part could not be resolved.
– With two parts (A.B) and the A part resolved to an object that did not expose visible nested procedures; the B part could not be resolved.
Action: Specify the valid name of an object or of a packaged procedure or function without specifying any additional trailing parts.
ORA-06564: object string does not exist
Cause: The named object could not be found. Either it does not exist or you do not have permission to access it.
Action: Create the object or get permission to access it.
ORA-06565: cannot execute string from within stored procedure
Cause: The named procedure cannot be executed from within a stored procedure, function or package. This function can only be used from pl/sql anonymous blocks.
Action: Remove the procedure from the calling stored procedure.
ORA-06566: invalid number of rows specified
Cause: An invalid number of rows was specified in a call to the procedure DEFINE_COLUMN in the package DBMS_SQL. For a given parsed statement in a given cursor, all columns must be defined to have the same number of rows, so all the calls to DEFINE_COLUMN must specify the same number of rows.
Action: Specify a number that matches that for previously defined columns.
ORA-06567: invalid number of values specified
Cause: An invalid number of values to be bound was specified in a call to the procedure BIND_VARIABLE in the package DBMS_SQL. In order to execute a given parsed statement in a given cursor, the same number of values must have been bound for all bind variables, so when EXECUTE is called, the latest calls to BIND_VARIABLE must must have specified the same number of values to be bound for all bind variables.
Action: Make sure that the same number of values have been bound for all of the bind variables.
ORA-06568: obsolete ICD procedure called
Cause: An obsolete ICD procedure was called by a PL/SQL program. The PL/SQL program was probably written for an eralier release of RDBMS.
Action: Make sure that all PL/SQL programs have been upgraded to the latest release of the RDBMS. This can be accomplished by following upgrade instructions in the README file, or by running the catproc.sql script supplied with the RDBMS.
ORA-06569: Collection bound by bind_array contains no elements
Cause: A collection with zero elements was bound to a bind variable in a call to procedure BIND_ARRAY in the package DBMS_SQL. In order to execute a bind of a collection, the collection must contain at least one element. If no elements are present then at execute time there will be no value for this bind and the statement is meaningless.
Action: Fill the collection with the elements you want to bind and try the bind call again.
ORA-06570: shared pool object does not exist, cannot be pinned/purged
Cause: The specified shared pool shared cursor could not be found, therefore it cannot be pinned/purged.
Action: Remove the procedure from the calling stored procedure.
ORA-06571: Function string does not guarantee not to update database
Cause: There are two possible causes for this message:
* A SQL statement references a packaged, PL/SQL function that does not contain a pragma that prevents the database from being updated.
* A SQL statement references a stand-alone, PL/SQL function that contains an instruction to update the database.
Action: If the referenced function is a packaged, PL/SQL function: Recreate the PL/SQL function with the required pragma; be certain to include the ‘Write No Database State’ (WNDS) argument in the argument list of the pragma. If the referenced function is a stand-alone, PL/SQL function: Do not use the function.
ORA-06572: Function string has out arguments
Cause: A SQL statement references either a packaged, or a stand-alone, PL/SQL function that contains an OUT parameter in its argument list. PL/SQL functions referenced by SQL statements must not contain the OUT parameter.
Action: Recreate the PL/SQL function without the OUT parameter in the argument list.
ORA-06573: Function string modifies package state, cannot be used here
Cause: There are two possible causes for this message:
* A SQL statement references a packaged, PL/SQL function that does not contain a pragma containing the ‘Write no Package State’ (WNPS).
* A SQL statement references a stand-alone, PL/SQL function that modifies a package state. A stand-alone, PL/SQL function referenced by a SQL statement cannot modify a package state.
Action: If the function is a packaged, PL/SQL function: Recreate the function and include a pragma containing the ‘Write no Package State’ (WNPS). If the function is a stand-alone, PL/SQL function: Delete the function from the SQL statement.
ORA-06574: Function string references package state, cannot execute remotely
Cause: There are two possible causes for this message:
* A remote, packaged function or a remote-mapped, local, packaged function that does not contain a pragma with the ‘Write no Package State’ (WNPS) and ‘Read no Package State’ (RNPS) arguments references a package state.
* A remote, stand-alone function or a remote-mapped, local, stand-alone function contains a reference to a package state (reads or writes a package variable). Only local functions that are referenced in a SELECT list, VALUES clause of an INSERT statement, or SET clause of an UPDATE statement can modify a package state.
Action: If the function is a packaged function: Recreate the function and include a pragma containing the ‘Write no Package State’ (WNPS) and ‘Read no Package State’ (RNPS) arguments. If the function is a stand-alone function: Do not call the function.
ORA-06575: Package or function string is in an invalid state
Cause: A SQL statement references a PL/SQL function that is in an invalid state. Oracle attempted to compile the function, but detected errors.
Action: Check the SQL statement and the PL/SQL function for syntax errors or incorrectly assigned, or missing, privileges for a referenced object.
ORA-06576: not a valid function or procedure name
Cause: Could not find a function (if an INTO clause was present) or a procedure (if the statement did not have an INTO clause) to call.
Action: Change the statement to invoke a function or procedure
ORA-06577: output parameter not a bind variable
Cause: The argument corresponding to an IN/OUT or OUT parameter for a function or a procedure or a function return value in a CALL statement must be a bind variable.
Action: Change the argument to a bind variable
ORA-06578: output parameter cannot be a duplicate bind
Cause: The bind variable corresponding to an IN/OUT or OUT parameter for a function or a procedure or a function return value in a CALL statement cannot be a duplicate bind variable.
Action: Change the bind variable to be unique
ORA-06579: Bind variable not big enough to hold the output value
Cause: The bind variable specified by the user is not large enough to hold the output returned by the function or a procedure.
Action: Specify a bind variable of larger size.
ORA-06580: Hash Join ran out of memory while keeping large rows in memory
Cause: Hash Join reserves 3 slots (each slot size = DB_BLOCK_SIZE * HASH_JOIN_MULTIBLOCK_IO_COUNT) for a row. If a row is larger than that, this error will be raised.
Action: Increase HASH_JOIN_MULTIBLOCK_IO_COUNT so that each joined row fits in a slot. HASH_AREA_SIZE may also need to be increaed.
ORA-06592: CASE not found while executing CASE statement
Cause: A CASE statement must either list all possible cases or have an else clause.
Action: Add all missing cases or an else clause.
ORA-06593: string is not supported with natively compiled PL/SQL modules
Cause: Specified feature is not yet supported for natively compiled PL/SQL modules yet.
Action: Recompile the relevant PL/SQL modules in non-native mode by setting the parameter plsql_compiler_flags to INTERPRETED.
ORA-06595: REF CURSOR parameters are not supported in forwarded RPC calls
Cause: An attempt was made to make a forwarded RPC call with a REF CURSOR parameter.
Action: Either call the remote function directly (i.e., not by way of forwarding), or move the remote function to a database where it can be called directly.
ORA-06596: object cannot be purged, object is permanently kept in shared pool
Cause: The specified object was permanently kept, therefore, cannot be purged.
Action: Use DBMS_SHARED_POOL.UNKEEP procedure to unkeep the object and then purge it.
ORA-06597: Failed to increase the session’s call stack memory to string bytes at a depth of string calls. (The current maximum is string bytes.)
Cause: PL/SQL program execution used more call stack memory than permitted.
Action: * Ask your DBA to increase the maximum allowed call stack memory.
* Decrease the amount of call stack used by the program. This may be accomplished by using fewer, smaller local variables, or by limiting the depth of function call nesting.
ORA-06600: LU6.2 Driver: SNA software is not loaded
Cause: The SNA software is not running.
Action: Start the SNA software and try again.

The PLS-00302: component must be declared error occurs when the component of an object is used in the PL/SQL code but not declared in the oracle database object. The data base objects such as type, package, table, cursor may contain member components. If the components are not declared in the respective database objects but referenced in the oracle PL/SQL code, the error PLS-00302: component must be declared will be thrown.

The oracle data base package contains components such as functions, procedures, triggers, variables. The package components are referenced by the name of the type or package. If the package components are not declared either in package declaration or package body but used in the PL/SQL code, the error PLS-00302: component must be declared will be thrown.

Exception

The stack trace for the exception would look like this. The exception would be thrown if the component is not declared in the database object. When the component reference is used in Oracle PL/SQL language, an error would be thrown.

Error report -
ORA-06550: line 4, column 17:
PLS-00302: component 'PUT_LINE1' must be declared
ORA-06550: line 4, column 5:
PL/SQL: Statement ignored
06550. 00000 -  "line %s, column %s:n%s"
*Cause:    Usually a PL/SQL compilation error.
*Action:

Cause

The database objects such as type, package, table, cursor can contain multiple components. The database container objects are used to identify these member elements. If you refer to a member component that isn’t declared inside the object but you attempt to call it, an exception would be thrown. The member component is not available. As a result, the database object was unable to provide the member component.

Solution 1

The component is not declared, which is why this exception is thrown. If an error happens when trying to call some system functions. This is most likely due to a misspelled function, procedure, or trigger name. This error would be fixed if the spelling in the code is corrected.

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

Exception

Error report -
ORA-06550: line 4, column 17:
PLS-00302: component 'PUT_LINE1' 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 2

If you call a member component that isn’t specified in the database type, the type object won’t know what to do with the member variable’s value. The member variable is not declared in the code or the member variable name is misspelled. If a member variable isn’t declared, it can’t be used. declare the variable as a type variable. If the variable name is misspelled, make the appropriate changes.

create or replace type student is object
(
name varchar2(100)
);

set serveroutput on
declare
 st student;
begin
    st := student(1,'Yawin');
    dbms_output.put_line(st.id);
end;

Exception

Error report -
ORA-06550: line 4, column 11:
PLS-00306: wrong number or types of arguments in call to 'STUDENT'
ORA-06550: line 4, column 5:
PL/SQL: Statement ignored
ORA-06550: line 5, column 29:
PLS-00302: component 'ID' must be declared
ORA-06550: line 5, column 5:
PL/SQL: Statement ignored
06550. 00000 -  "line %s, column %s:n%s"

Solution

create or replace type student is object
(
id numeric(5),
name varchar2(100)
);

set serveroutput on
declare
 st student;
begin
    st := student(1,'Yawin');
    dbms_output.put_line(st.id);
end;

Output

1
PL/SQL procedure successfully completed.

Solution 3

If package members such as function, procedure, and triggers are not declared and used in PL/SQL code, an exception would be thrown. Add a member function, procedure, or trigger definition if it is absent or the declaration isn’t available. If the spelling of a member’s name is incorrect, change it.

CREATE PACKAGE MYPACKAGE AS 
   PROCEDURE PRINTNAME; 
END MYPACKAGE;

CREATE OR REPLACE PACKAGE BODY MYPACKAGE AS  
   PROCEDURE PRINTNAME IS     
   BEGIN 
      dbms_output.put_line('Yawin'); 
   END PRINTNAME; 
END MYPACKAGE; 

DECLARE  
BEGIN 
   MYPACKAGE.PRINTNAME1; 
END; 

Exception

Error report -
ORA-06550: line 3, column 14:
PLS-00302: component 'PRINTNAME1' must be declared
ORA-06550: line 3, column 4:
PL/SQL: Statement ignored
06550. 00000 -  "line %s, column %s:n%s"
*Cause:    Usually a PL/SQL compilation error.

Solution

DECLARE  
BEGIN 
   MYPACKAGE.PRINTNAME; 
END; 

Output

Yawin
PL/SQL procedure successfully completed.

Solution 4

If the variable is declared as an array or list, the elements of the array or list should be invoked. If the array variable is used as a single object variable, the exception will be thrown. The index can be used to refer to the value in the array variable. The error may be fixed by indexing the variable.

create or replace type student is object
(
id numeric(5),
name varchar2(100)
);
declare
 TYPE studentarr IS TABLE OF student INDEX BY PLS_INTEGER;
 st studentarr;
begin
    st := student(1,'Yawin');
   dbms_output.put_line(st.id);
end;

Exception

Error report -
ORA-06550: line 5, column 11:
PLS-00382: expression is of wrong type
ORA-06550: line 5, column 5:
PL/SQL: Statement ignored
ORA-06550: line 6, column 28:
PLS-00302: component 'ID' must be declared
ORA-06550: line 6, column 4:
PL/SQL: Statement ignored

Solution

set serveroutput on
declare
 TYPE studentarr IS TABLE OF student INDEX BY PLS_INTEGER;
 st studentarr;
begin
    st(1) := student(1,'Yawin');
   dbms_output.put_line(st(1).id);
end;

Output

1
PL/SQL procedure successfully completed.

Solution 5

There’s a chance you don’t have enough permission to execute the objects. If the permission isn’t available, you’ll have to give it to the objects. You may need to contact the database administrator to get this permission. You can access the components if you have the database object permission.

grant execute on MYPACKAGE.PRINTNAME to yawin;

A reader asked me to investigate why he was getting the error being discussed whenever he tried to execute the following PL/SQL block:

declare
type WARRAY is varray(324) OF varchar2(200);
LLISTA WARRAY;
VALS WARRAY;
number pls_integer := 1;
begin
--VALS := WARRAY(null, null);
--LLISTA := WARRAY(null);
--LLISTA := VALS;
dbms_output.put_line(number);
loop
exit when LLISTA(number)%NOTFOUND;
LLISTA(number) := VALS(number);
Number:= Number + 1;
end loop;
end;

Error report:
ORA-06550: line 0, column 0:
PLS-00707: unsupported construct or internal error [2704]
ORA-06550: line 12, column 2:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:

There are several things worth noting in this tiny PL/SQL snippet, but let’s start off with the main issue.
PLS-00707 is raised because Oracle doesn’t support the %NOTFOUND construct with collections as it is meant to be used with cursors. I must guess that the user got confused with the EXISTS method that allows to check for the presence of non-initiatilized elements in collections (not to be confused with null elements!).

declare
type WARRAY is varray(324) OF varchar2(200);
LLISTA WARRAY;
VALS WARRAY;
number pls_integer := 1;
begin
VALS := WARRAY('a', 'b');
LLISTA := WARRAY('c', 'd');
--LLISTA := VALS;
loop
--exit when LLISTA(number)%NOTFOUND;
exit when not LLISTA.EXISTS(number);
LLISTA(number) := VALS(number);
number:= number + 1;
end loop;
dbms_output.put_line(number);
dbms_output.put_line(LLISTA(number - 1));
end;

If the intention of this procedure was to copy the elements of collection VALS into LLISTA, then it must be noted that if both varrays are exactly of the same type and dimension, then we could get rid of the loop altogether:


declare
type WARRAY is varray(324) OF varchar2(200);
LLISTA WARRAY;
VALS WARRAY;
number pls_integer := 1;
begin
VALS := WARRAY('a', 'b');
LLISTA := WARRAY('c', 'd', 'e');
LLISTA := VALS;
number := LLISTA.COUNT;
dbms_output.put_line(number);
dbms_output.put_line(LLISTA(number));
end;

Entire collections can be copied as if they were simple variables when the aforementioned conditions are met.
Note also that the third element of LLISTA (‘e’) has disappeared after the copy, so, don’t expect that Oracle copies only the subset of the collection containing the initialized elements, you’ll need to do it yourself (see later on).
Let’s see what happens when the type looks equal but is not, as in the following example where i duplicated they custom type WARRAY:

declare
type WARRAY is varray(324) OF varchar2(200);
type WARRAY2 is varray(324) OF varchar2(200);
LLISTA WARRAY;
VALS WARRAY2;
number pls_integer := 1;
begin
VALS := WARRAY2('a', 'b');
LLISTA := WARRAY('c', 'd');
LLISTA := VALS;
number := LLISTA.COUNT;
dbms_output.put_line(number);
dbms_output.put_line(LLISTA(number));
end;

Error report:
ORA-06550: line 10, column 12:
PLS-00382: expression is of wrong type
ORA-06550: line 10, column 2:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:

The collection assignment doesn’t work anymore because even if WARRAY and WARRAY2 appear to be perfectly equivalent, they are not the same type, strictly speaking.

Finally, let’s go back to the previous step, the working one, and assume that we want to copy only a subset of the elements of VALS. I guess that for some reason VALS contains either updated or saved values that at a certain point we want to restore in LLISTA, but without erasing the elements of LLISTA that have no corresponding subscript in VALS:

declare
LLISTA string_table_type;
VALS string_table_type;
BKP string_table_type;
n pls_integer := 1;
begin
VALS := string_table_type('a','b');
LLISTA := string_table_type('c','d','e','f');
BKP := LLISTA;
n := VALS.count;
select c
bulk collect into LLISTA
from (
select column_value as c
from table(VALS)
union all
select c
from (select rownum r, column_value as c
from table(BKP))
where r > n
);
dbms_output.put_line(LLISTA.count);
for i in LLISTA.first .. LLISTA.last
loop
dbms_output.put_line(LLISTA(i));
end loop;
end;

4
a
b
e
f

Again, some remarks: first of all i had to use an externally defined collection type (string_table_type), not a locally defined collection type because PL/SQL doesn’t allow me to use local collections in SQL statements:

create or replace TYPE "STRING_TABLE_TYPE"                                                                                                                                                                                                                                                                                                     as table
of varchar2(200)

Secondly, i had to create a third collection named BKP where i staged the data of LLISTA because otherwise i’d get an empty subset. Oracle is implicitly erasing LLISTA before performing BULK COLLECT so i cannot access its elements while performing the query.

Is this memory wasting approach faster than manually copying each and every element from VALS to LLISTA?

declare
type WARRAY is varray(324) OF varchar2(200);
LLISTA WARRAY;
VALS WARRAY;
n pls_integer := 1;
begin
VALS := WARRAY('a', 'b');
LLISTA := WARRAY('c', 'd', 'e', 'f');
loop
exit when not VALS.EXISTS(n);
LLISTA(n) := VALS(n);
n:= n + 1;
end loop;

dbms_output.put_line(LLISTA.count);
for i in LLISTA.first .. LLISTA.last
loop
dbms_output.put_line(LLISTA(i));
end loop;
end;

4
a
b
e
f

The performance comparison test is left to the reader as exercise, as some professors say when they are running late for lunch… ;-)

See message translations for PLS-00707 and search additional resources.

Понравилась статья? Поделить с друзьями:
  • Ussd error что это означает
  • Ussd error что это значит мегафон
  • Ussd error мегафон при быстром наборе
  • Ussd error мегафон на новой симке
  • Ussd error yota