【发布时间】:2013-03-07 03:33:32
【问题描述】:
我想首先使用 PowerTools 对代码进行逆向工程。当我从本地 MS-SQL 数据库而不是 Oracle DB 进行逆向工程时,它可以工作。我在输出控制台中收到以下错误:
System.Data.ProviderIncompatibleException: The provider did not return a ProviderManifestToken string. ---> Oracle.DataAccess.Client.OracleException: ORA-1005: null password given; logon denied
at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)
at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src)
at Oracle.DataAccess.Client.OracleConnection.Open()
at Oracle.DataAccess.Client.EFOracleProviderServices.GetDbProviderManifestToken(DbConnection connection)
at System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection)
--- End of inner exception stack trace ---
at System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection)
at System.Data.Entity.Design.EntityStoreSchemaGenerator.GetProviderSchemaMetadataWorkspace(DbProviderServices providerServices, DbConnection providerConnection, Version targetEntityFrameworkVersion)
at System.Data.Entity.Design.EntityStoreSchemaGenerator.CreateStoreSchemaConnection(String providerInvariantName, String connectionString, Version targetEntityFrameworkVersion)
at System.Data.Entity.Design.SsdlGenerator.EntityStoreSchemaGeneratorDatabaseSchemaLoader.CreateStoreSchemaConnection(String providerInvariantName, String connectionString, Version& storeSchemaModelVersion)
at System.Data.Entity.Design.EntityStoreSchemaGenerator..ctor(String providerInvariantName, String connectionString, String namespaceName)
at Microsoft.DbContextPackage.Handlers.ReverseEngineerCodeFirstHandler.ReverseEngineerCodeFirst(Project project)
我可以通过右键单击项目 > 添加 > ADO.NET 实体数据模型 > 选择“从现有数据库”并按照向导的其余部分来正常生成 EF 文件。不过,我更喜欢 powertools,原因有几个(主要是映射为 .cs 文件)。为什么我在使用 Oracle 时不能进行逆向工程? TIA
【问题讨论】:
-
ORA-1005: 密码为空;登录被拒绝。好像缺少密码。
-
我在向导中选择“使用特定的用户名和密码”并填写两个字段。我也可以单击“测试连接”并返回成功消息。
-
不,我还没有生成上下文。还是谢谢
标签: oracle entity-framework ef-power-tools