我正在尝试使用dbdeploy来管理Oracle架构更改。我可以从命令行成功运行它以使其生成我的更改脚本,但是当我尝试通过运行在TeamCity中的dbdeploy NAnt任务执行它时,我收到一个错误:
System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.
我确实安装了Oracle 10.2.0.2客户端软件。它是系统路径中的第一个条目,dbdeploy.exe应用程序能够成功协商Oracle连接。 dbdeploy代码动态加载System.Data.OracleClient程序集,该程序集又会尝试使用Oracle客户端位与数据库通信。这是我在NAnt环境中失败的原因。
我已经验证了以下几点:
这是错误期间堆栈跟踪的顶部:
at System.Data.OracleClient.OCI.DetermineClientVersion() at System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction (String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName) at System.Data.OracleClient.OracleInternalConnection..ctor( OracleConnectionString connectionOptions) at System.Data.OracleClient.OracleConnectionFactory.CreateConnection( DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection( DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) at System.Data.ProviderBase.DbConnectionPool.CreateObject( DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest( DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.GetConnection( DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection( DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection( DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.OracleClient.OracleConnection.Open() at Net.Sf.Dbdeploy.Database.DatabaseSchemaVersionManager. GetCurrentVersionFromDb()
我的主要问题是:我怎样才能发现这些运行环境的不同之处,看看为什么我的Oracle客户端软件无法加载?