Skip to main content


 

Symptoms

 


Error "Could not open a connection to SQL Server" when attempting to register Salesforce Service Instance
 

 

Diagnoses

 


As the next step for me in validating the K2 ver. 4.6.9 upgrade, I am registering the Salesforce Broker using the Salesforce Instance Generator. But it is giving me an Unhandled Exception (Could not open a connection to SQL Server). The K2 DB should be accessible to this Blackpearl/Smartform server as I just ran the analysis.

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
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.SqlClient.SqlConnection.Open()
at SourceCode.Data.ConnectionScope.GetConnection(String connectionString, ImpersonateOption impersonateOption)
at SourceCode.SmartObjects.ServiceBrokerStore.Store.GetServiceType(Guid ServiceTypeGUID)
at BrokerManagement.ServiceInstanceMeta.GetServiceType()
at BrokerManagement.ServiceInstanceMeta.ServiceInstanceMeta_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Messageand m)
at System.Windows.Forms.Control.WndProc(Messageand m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Messageand m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
 

 

Resolution

In K2 Blackpearl version 4.6.9, a BrokerManagement.exe.config file was introduced (C:Program Files (x86)K2 blackpearlServiceBroker), in which the "Data Source" for the connection string was incorrectly populated. This issue has been logged as a bug to be resolved in a future update.

<add name="SmartBrokerDB" connectionString="Data Source=PANDD-SP2013;Initial Catalog=K2;integrated security=sspi;Pooling=True" providerName="K2BLACKPEARL" />

To resolve the issue, update the "Data Source" and "Initial Catalog" with the appropriate value from your environment:

Data Source: SQL connection name
Initial Catalog: K2 (consolidated) or K2SmartBroker (14 dbs)

 

 



 
Be the first to reply!

Reply