Good Day,
When trying to connect to our SQL Database we get the following error:
System.Data.SqlClient.SqlException (0x80131904): 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
When we are local we don't have any issue, but when remote we cannot connect.
How can we troubleshoot this error? Is there a way to have the détails on how PVM tries to connect to the SQL Server.
Thanks
Helder
Here's the full trace:
LoadConnections [Microsoft SQL Server/SQL Azure : CCSO_Connexions]...
OfflineManager.GetDataSourceSettings : 1 ms
OfflineManager.LoadConnections...
Offline Security Info
>>>>>>>>>>>>>>>>>>>>>
> CanAdd: True
> CanAddCredentials: True
> CanAddDataEntries: True
> CanDelete: True
> CanDeleteCredentials: True
> CanDeleteDataEntries: True
> CanEdit: True
> CanEditCredentials: True
> CanEditDataEntries: True
> GroupInfos:
> be8a66e2-11b7-4886-8d47-889685cfc001
> e45c604d-4c60-4671-9232-74df456c82b4
> 4897892f-7387-42a3-a2b2-b14260ba4280
> cd5adf62-6afe-43a8-98df-b7593d508759
> 4209f867-11b2-4173-b4d7-bda07d6504da
> 4e6d79a8-6de6-422f-9470-b5e7914bbfc7
> 6fefe415-a94f-4626-a7d8-d37f6e4565a4
> 4b097bee-b8c6-4af3-bf2d-2f5604c2ed1e
> 3abcdec0-d196-4238-b5b1-980f8c1276e4
> 2f5bd3bc-0b4c-419d-988d-dabf6b9a8ba3
> IsAdministrator: False
> OfflineHash:
> OfflineUser:
> SecurityValues:
> UserInfoID: f6591350-342a-44a6-ab63-07b27b925191
> UserOverrideString:
>>>>>>>>>>>>>>>>>>>>>
LoadConnectionsFromOfflineFile...
DeserializeData : 0 ms
ReadFromOffline : 0 ms
LoadConnectionsFromOfflineFile : 3 ms
Preloaded: 0
Offline cache version: 0x0000000000000000
OfflineManager.LoadConnections : 16 ms
Offline Mode : ReadOnly
Caching Type : IntelligentCaching
Current cache version: 0x0000000000000000
LoadConnectionsFromDataSource...
LoadDataSourceSettingsFromDataSource...
IsDataSourceOnline...
IsDataSourceOnline : 0 ms
Silent: System.Data.SqlClient.SqlException (0x80131904): 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at Devolutions.RemoteDesktopManager.Business.DataSources.SQLServerConnectionDataSource.cb237041e20b5e69dd4663ff2ed975633(String c18973cea236a9feff75c32ca7d1697d5, String ceb81d1ee93f91e0bc57f34876c263863, String& ce1d94e27ad6e76e9e5fb7089d71c2bfa)
ClientConnectionId:00000000-0000-0000-0000-000000000000
Error Number:-1,State:0,Class:20
GetDataSourceSettings : 46113 ms
LoadDataSourceSettingsFromDataSource : 46118 ms
LoadConnectionsFromDataSource : 46121 ms
LoadConnections [Microsoft SQL Server/SQL Azure : CCSO_Connexions] : 46153 ms
TreeView.LoadConnectionList...
Tree view is loading 0 connections
BeginUpdate...
LoadConnectionList...
LoadConnectionList : 0 ms
ApplyGroupCustomImages : 0 ms
LoadConnectionInTreeNode : 0 ms
PreCreateGroups : 0 ms
BeginUpdate : 13 ms
TreeView.LoadConnectionList : 20 ms
LoadConnectionList...
LoadConnectionList : 0 ms