Added a server to the Failover Partner property in the connection breaks the connection completely.
I am using Azure SQL databases. I want automatic database fail over if the primary database is not available. I have configured Geo-Replication for the database. I have added the Failover Partner property to the connection string but if I add the secondary servers host name to the property the entire connection string fails and Unbraco cannot connect to the primary data and gives the database is configure but cannot connect error. If I leave the Failover Partner blank the connection string works.
So, is there a way to handle automatic database fail over with the connection string and Azure Geo-Replicated databases or can this only be handle in code or manually? There is a fail over website, I was hoping to add an extra layer of protection if only the database failed. I have never set a site up this way so I am not sure if what I wanting is exactly possible, any help would be appreciated. Thx.
A me, too reaction here, but also with some extra information: the error thrown is "Unexpected routing information received" (which I can't seem to find anything on Google for):
In my case it turned out to be something stupid: I was trying to use an Azure SQL database and thought it was necessary to include a Failover Partner, but that just doesn't work - it isn't necessary because failover happens automatically.
So I guess maybe the connection string is just wrong (as it was in my case) - does it work in other environments?
Added a server to the Failover Partner property in the connection breaks the connection completely.
I am using Azure SQL databases. I want automatic database fail over if the primary database is not available. I have configured Geo-Replication for the database. I have added the Failover Partner property to the connection string but if I add the secondary servers host name to the property the entire connection string fails and Unbraco cannot connect to the primary data and gives the database is configure but cannot connect error. If I leave the Failover Partner blank the connection string works.
So, is there a way to handle automatic database fail over with the connection string and Azure Geo-Replicated databases or can this only be handle in code or manually? There is a fail over website, I was hoping to add an extra layer of protection if only the database failed. I have never set a site up this way so I am not sure if what I wanting is exactly possible, any help would be appreciated. Thx.
A me, too reaction here, but also with some extra information: the error thrown is "Unexpected routing information received" (which I can't seem to find anything on Google for):
[SqlException (0x80131904): Unexpected routing information received.] System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling) +970 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +802 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) +38 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +682 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +89 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +426 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource
1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +78 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource
1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +191 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) +154 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource
1 retry, DbConnectionOptions userOptions) +21 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1 retry) +141 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource
1 retry) +362 System.Data.SqlClient.SqlConnection.Open() +96 ASP.Pageconnections_cshtml.Execute() in d:\home\site\wwwroot\connections.cshtml:10 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +196 System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +68 System.Web.WebPages.WebPage.ExecutePageHierarchy() +151 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +76 System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContext context) +243Did you figure this one out. I'm keen to try it out. Do you mind sharing your insights or even a bit of code to get it working?
Thanks!
Hi Sam,
In my case it turned out to be something stupid: I was trying to use an Azure SQL database and thought it was necessary to include a Failover Partner, but that just doesn't work - it isn't necessary because failover happens automatically.
So I guess maybe the connection string is just wrong (as it was in my case) - does it work in other environments?
is working on a reply...