你好,
嗨,从这个文档中,
我们可以看到 Oracle.EntityFrameworkCore 支持的数据库引擎从 Oracle DB 11.2 开始。
如果答案是正确的,请点击“接受答案”并点赞。 如果您对此答案还有其他疑问,请点击“评论”。 注意:如果您想接收相关电子邮件,请按照我们的文档中的步骤启用电子邮件通知 此线程的通知。
我正在尝试使用 Scaffold-DbContext 从我的数据库 Oracle(10g) 创建一个模型。
Scaffold-DbContext "DATA SOURCE=XPERTISE.world;PASSWORD=XXX;USER ID=SCHEDULE" Oracle.EntityFrameworkCore -OutputDir Models -Tables MEETINGS -Force.
我收到此错误。我在 12C 和 19C 中创建了数据库,并且能够毫无问题地添加相同的表。
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, IEnumerable1 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)
Note:此问题总结整理于:Entity Framework Core 5 doesnt support Oracle 10G?