2

I'm trying to create a Model from my database Oracle(10g) using Scaffold-DbContext.

Scaffold-DbContext "DATA SOURCE=XPERTISE.world;PASSWORD=XXX;USER ID=SCHEDULE" Oracle.EntityFrameworkCore -OutputDir Models -Tables MEETINGS -Force.

Im getting this error. I created the database in 12C and 19C and was able to add the same table without problems.

2021-02-27 05:44:36.250848 ThreadID:1 (ERROR) OracleDatabaseModelFactory.Create() : Oracle.ManagedDataAccess.Client.OracleException (0x80004005): ORA-00904: "DEFAULT_COLLATION": invalid identifier
at OracleInternal.ServiceObjects.OracleConnectionImpl.VerifyExecution(Int32& cursorId, Boolean bThrowArrayBindRelatedErrors, SqlStatementType sqlStatementType, Int32 arrayBindCount, OracleException& exceptionForArrayBindDML, Boolean& hasMoreRowsInDB, Boolean bFirstIterationDone)
at OracleInternal.ServiceObjects.OracleCommandImpl.VerifyExecution(OracleConnectionImpl connectionImpl, Int32& cursorId, Boolean bThrowArrayBindRelatedErrors, OracleException& exceptionForArrayBindDML, Boolean& hasMoreRowsInDB, Boolean bFirstIterationDone)
at OracleInternal.ServiceObjects.OracleCommandImpl.ExecuteReader(String commandText, OracleParameterCollection paramColl, CommandType commandType, OracleConnectionImpl connectionImpl, OracleDataReaderImpl& rdrImpl, Int32 longFetchSize, Int64 clientInitialLOBFS, OracleDependencyImpl orclDependencyImpl, Int64[] scnForExecution, Int64[]& scnFromExecution, OracleParameterCollection& bindByPositionParamColl, Boolean& bBindParamPresent, Int64& internalInitialLOBFS, Int64 internalInitialJSONFS, OracleException& exceptionForArrayBindDML, OracleConnection connection, OracleLogicalTransaction& oracleLogicalTransaction, IEnumerable`1 adrianParsedStmt, Boolean isDescribeOnly, Boolean isFromEF)
at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior)
at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteReader()
at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteScalar()
at Oracle.EntityFrameworkCore.Scaffolding.Internal.OracleDatabaseModelFactory.<Create>g__GetCollation|9_0(DbConnection connection, String schema)
at Oracle.EntityFrameworkCore.Scaffolding.Internal.OracleDatabaseModelFactory.Create(DbConnection connection, IEnumerable`1 tables, IEnumerable`1 schemas)
Luke Woodward
  • 63,336
  • 16
  • 89
  • 104
  • What is version 10G? Version 10.1 or 10.2? Oracle Data Provider for .NET, Managed Driver requires Oracle Database 10g Release 2 or later. – Wernfried Domscheit Feb 27 '21 at 14:35
  • See [Entity Framework Core - Take(1), Single(), First()… Not Working with Oracle Provider (ORA-00933: SQL command not properly ended)](https://stackoverflow.com/questions/56341445/entity-framework-core-take1-single-first-not-working-with-oracle-pr/56343155#56343155). The supported compatibility values are "11" and "12", so I guess that means the minimum supported Oracle version is 11. – Ivan Stoev Feb 27 '21 at 15:04
  • The Database versión is 10.2. Thanks alot guys.! – Oscar Rodriguez Urbina Feb 27 '21 at 15:14
  • The error message is quit simple: `"DEFAULT_COLLATION": invalid identifier` Check your statement, it uses a wrong column name. – Wernfried Domscheit Feb 27 '21 at 15:54

0 Answers0