2

我正在尝试为 BizTalk 2013 R2 中的 WCF 自定义 Oracle 发送端口设置操作系统身份验证。我可以使用 SQL Developer 中的 OS Auth 连接到 Oracle db(以我的 BizTalk 服务帐户登录时),Visual Studio 也可以使用 OS auth,因此我知道该帐户处于活动状态并且在 Oracle Db 中具有正确的权限。不幸的是,当我尝试查询数据库时,BizTalk 适配器会引发以下异常:

The adapter failed to transmit message going to send port "MySendPort" with URL "oracledb://MyTnsName". It will be retransmitted after the retry interval specified for this Send Port. Details:"Microsoft.ServiceModel.Channels.Common.ConnectionException: ORA-01017: invalid username/password; logon denied ---> Oracle.DataAccess.Client.OracleException: ORA-01017: invalid username/password; logon denied
   at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck, Int32 isRecoverable)
   at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src)
   at Oracle.DataAccess.Client.OracleConnection.Open()
   at Microsoft.Adapters.OracleCommon.OracleCommonConnectionWrapper..ctor(String connectionString, OracleCommonExecutionHelper executionHelper)
   at Microsoft.Adapters.OracleDB.OracleDBConnection.Microsoft.ServiceModel.Channels.Common.IConnection.Open(TimeSpan timeout)
   --- End of inner exception stack trace ---

Server stack trace: 
   at Microsoft.Adapters.OracleDB.OracleDBConnection.Microsoft.ServiceModel.Channels.Common.IConnection.Open(TimeSpan timeout)
   at Microsoft.ServiceModel.Channels.Common.Design.ConnectionPool.GetConnection(Guid clientId, TimeSpan timeout)
   at Microsoft.ServiceModel.Channels.Common.Design.ConnectionPool.GetConnectionHandler[TConnectionHandler](Guid clientId, TimeSpan timeout, MetadataLookup metadataLookup, String& connectionId)
   at Microsoft.ServiceModel.Channels.Common.Channels.AdapterRequestChannel.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at System.ServiceModel.ICommunicationObject.Open()
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.GetChannel[TChannel](IBaseMessage bizTalkMessage, ChannelFactory`1& cachedFactory)
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendMessage(IBaseMessage bizTalkMessage)".

如果我将用户名从“/”更改为本地 Oracle 帐户和密码,BizTalk 可以很好地查询数据库。

我同时安装了 ODAC 2.121.2.0 的 32 位和 64 位 oracle 12c 客户端。Oracle env 变量首先位于系统 PATH 变量中,并且我已将绑定重定向添加到 BizTalk 中的 Microsoft.Adapters.OracleDB.config 文件以引用较新的 ODAC 版本。

任何帮助,将不胜感激。

4

0 回答 0