- 3,715,501 Users
- 2,242,777 Discussions
- 7,845,371 Comments
Forum Stats
Discussions
Categories
- 15 Data
- 362.2K Big Data Appliance
- 6 Data Science
- 1.5K Databases
- 461 General Database Discussions
- 3.7K Java and JavaScript in the Database
- 22 Multilingual Engine
- 487 MySQL Community Space
- 3 NoSQL Database
- 7.6K Oracle Database Express Edition (XE)
- 2.8K ORDS, SODA & JSON in the Database
- 416 SQLcl
- 42 SQL Developer Data Modeler
- 184.8K SQL & PL/SQL
- 21K SQL Developer
- 1.8K Development
- 3 Developer Projects
- 32 Programming Languages
- 135.1K Development Tools
- 8 DevOps
- 3K QA/Testing
- 246 Java
- 5 Java Learning Subscription
- 10 Database Connectivity
- 66 Java Community Process
- 1 Java 25
- 9 Java APIs
- 141.1K Java Development Tools
- 6 Java EE (Java Enterprise Edition)
- 153K Java Essentials
- 135 Java 8 Questions
- 86.2K Java Programming
- 270 Java Lambda MOOC
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 10 Java SE
- 13.8K Java Security
- 3 Java User Groups
- 22 JavaScript - Nashorn
- 18 Programs
- 124 LiveLabs
- 30 Workshops
- 9 Software
- 3 Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 3 Deutsche Oracle Community
- 10 Español
- 1.9K Japanese
- 2 Portuguese
Unexpected Packet received in Oracle.ManagedDataAccessCore (2.19.80)
Envrioment
- Platform: .NET Core 3.1 Console Application
- Oracle Nuget: Oracle.ManagedDataAccessCore (2.19.80)
Steps
- Create a table with a DateTime column named "CreateDate".
- Execute the following query:
select( CASE WHEN 1 = 0 THEN a."CreateDate" ELSE NULL END ) as C0from "YourTableName" a
Exception
System.Exception: 'TTCExecuteSql:ReceiveExecuteResponse - Unexpected Packet received.'This exception was originally thrown at this call stack: OracleInternal.TTC.TTCExecuteSql.ReceiveExecuteResponse(ref OracleInternal.TTC.Accessors.Accessor[], OracleInternal.TTC.Accessors.Accessor[], bool, ref OracleInternal.Common.SQLMetaData, OracleInternal.Common.SqlStatementType, long, int, out int, ref long, int, long, long[], bool, int, ref OracleInternal.ServiceObjects.DataUnmarshaller, ref OracleInternal.TTC.TTCExecuteSql.MarshalBindParameterValueHelper, out long[], bool, ref bool, ref System.Collections.Generic.List<OracleInternal.TTC.Accessors.TTCResultSet>, bool) OracleInternal.ServiceObjects.OracleDataReaderImpl.FetchMoreRows(int, bool, bool) Oracle.ManagedDataAccess.Client.OracleDataReader.Read() System.Data.Common.DataAdapter.FillLoadDataRow(System.Data.ProviderBase.SchemaMapping) System.Data.Common.DataAdapter.FillFromReader(System.Data.DataSet, System.Data.DataTable, string, System.Data.ProviderBase.DataReaderContainer, int, int, System.Data.DataColumn, object) System.Data.Common.DataAdapter.Fill(System.Data.DataTable[], System.Data.IDataReader, int, int) Oracle.ManagedDataAccess.Client.OracleDataAdapter.Fill(System.Data.DataTable[], int, int, System.Data.IDbCommand, System.Data.CommandBehavior) System.Data.Common.DbDataAdapter.Fill(System.Data.DataTable) OracleTest.Program.Main(string[]) in Program.cs
Example
class Program { static void Main(string[] args) { var connectionStr = @YOUR CONNECTION STRING; var oracleConnection = new OracleConnection(connectionStr); oracleConnection.Open(); var sql = $"select(CASE WHEN 1 = 0 THEN a.\"Date\" ELSE NULL END) as C0 from \"YOUR TABLE NAME\" a "; using (var command = oracleConnection.CreateCommand()) { command.CommandText = sql; DataTable dataTable = new DataTable(); using (var adapter = new OracleDataAdapter()) { adapter.SelectCommand = command; adapter.Fill(dataTable); } } } }
Best Answer
-
The bug has been fixed in our main code line. My expectation is that the fix will be in the ODP.NET Core 19.10 release.
Answers
-
I tried your C# app with a table using a DATE column and TIMESTAMP column. In both cases with either ODP.NET Core 2.19.80 or 2.19.70, I didn't hit an error. I used DB 19c. Which DB version did you use?
-
I found out that there must be at least one record in the table. For example:
Table Design:
Name Type Size ID Number 0 Date DATE 7 Time TIMESTAMP 0 Time2 INTERVAL DAY TO SECOND 0 Table Data:
ID Date Time Time2 1 (Null) (Null) (Null) Then replace the [column] in the sql below:
var sql = $"select(CASE WHEN 1 = 0 THEN a.\"[column]\" ELSE NULL END) as C0 from \"YOUR TABLE NAME\" a ";
[Date]: reproduced
[Time]: can't reproduce
[Time2]: reproduced
DB version: 11/12/18/19c
-
I added the interval column and added one row of data, but still can't reproduce the problem with the 2.19.80 version against the data or interval column. Do you want to send us your trace? Just add these two lines and run your app.
OracleConfiguration.TraceFileLocation = @D:\traces;
OracleConfiguration.TraceLevel = 7;
You can send the trace file to dotnet_us (at) oracle.com.
-
Thank you. The email has been sent. I hope it's useful to you.
-
This bug appears to be the same as Bug 26123054.
-
Will this problem be fixed recently?
-
The bug hasn't been fixed yet. We're still evaluating the root cause.
-
The bug has been fixed in our main code line. My expectation is that the fix will be in the ODP.NET Core 19.10 release.