ORA-12154: TNS:could not resolve the connect identifier happened to 64 bit BizTalk Host

Last Friday, Xiao Dong, Bryan and Wei worked out one interesting Biztalk issue, which got resolved by workaround one Oracle client software limitation.

ORA-12154: TNS:could not resolve the connect identifier specified when calling System.Data.OracleClient.OracleConnection.Open() in an orchestration which is hosted by a 64 bit BizTalk host



When calling System.Data.OracleClient.OracleConnection.Open() to connect to an Oracle database in an orchestration which is hosted by a 64 bit BizTalk host, the following error event would be reported:

Event Type: Error

Event Source: XLANG/s

Event ID: 10034


Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'OracleClientTest.BizTalk_Orchestration1(6eee080c-3c6b-0872-70ae-810bae277ba7)'.

The service instance will remain suspended until administratively resumed or terminated.

If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.

InstanceId: 752f35c4-8e23-4711-bc84-82706d9b4fe5

Shape name: Expression_1

ShapeId: a2cef36c-1459-4e66-a290-df307db4e4b3

Exception thrown from: segment 2, progress 6

Inner exception: ORA-12154: TNS:could not resolve the connect identifier specified

Exception type: OracleException

Source: System.Data.OracleClient

Target Site: Void Check(System.Data.OracleClient.OciErrorHandle, Int32)

The following is a stack trace that identifies the location where the exception occurred

at System.Data.OracleClient.OracleException.Check(OciErrorHandle errorHandle, Int32 rc)

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 OracleClientTest.BizTalk_Orchestration1.segment2(StopConditions stopOn)

at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)



Tested the same code using a console application and it worked fine. But if put the test console application to the same folder as the BTSNTSvc64.exe, the same Oracle exception will be throw. This problem occurs because some versions of the Oracle client software cannot handle the parenthesis in the full path of the execute file.



To work around this problem, follow these steps:

1. Click Start , click Run , type regedit , and then press ENTER.

2. In Registry Editor, locate the ImagePath registry entry in the following registry key:


3. Change the value of the registry entry as follows to avoid using parenthesis in the path.


C:\Program Files (x86)\Microsoft BizTalk Server 2006\BTSNTSvc64.exe" -group "BizTalk Group" -name " <Your64bitBizTalkHostname>" -btsapp "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}”


C:\Progra~2\Microsoft BizTalk Server 2006\BTSNTSvc64.exe" -group "BizTalk Group" -name " <Your64bitBizTalkHostname>" -btsapp "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}”

4. Exit Registry Editor.

5. Restart the host instance of <Your64bitBizTalkHostname>.


Xiao Dong Zhu