3

I searched a lot but none of the links helped me in resolving this issue. I am getting

ORA-21500: internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s] when using OracleDataAdapter.

I am using 11.2.0 Oracle client and the oracle dataset is 11.1.0.7.0. Can anyone please help me in why I am getting this error? Some of the links that I searched say it is due to incompatible oracle client and database. This error is intermittent and debugging the issue didn't give much clue.

Result StackTrace:

at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)
at Oracle.DataAccess.Client.OracleDataReader.Read()
at System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping)
at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DataAdapter.Fill(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
at Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
0

2 Answers 2

2

Thanks for the comment. I just found that this problem is due to the fetch size that I am setting on the Oracle command object from which I am creating Oracle Data Adaptor. As soon as I stopped setting the command fetch size, it started working fine without any issues.

1

From here:

Cause

The cause of the error is an internal Oracle error which neither ArcGIS nor ArcSDE can control. The error is encountered when the application generates a SQL statement using an asterisk in the SELECT list (SELECT * FROM...).

For further information on the Oracle error please see Oracle's Metalink Note:49375.1.

Workaround

There are two possible workarounds for this issue. Ensure there is a spatial index present for the feature class and/or add an additional attribute after the ST_Geometry attribute.

To verify if a spatial index is present, using ArcCatalog, connect to the ArcSDE instance as the feature class owner. Select the feature class. Open the properties dialog box. Select the indexes tab and verify that the spatial index is present.

To add a new attribute to a feature class in ArcCatalog, open the feature class properties. Select the fields tab and add the new attribute.

Once the ST_Geometry attribute is no longer in the last position of the SELECT * list, the internal ORA-21500 error is no longer encountered.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.