locked
Failover connection String not working RRS feed

  • Question

  • Hi,

    We recently deployed mirroring on our sql server 2008R2 system. We made below changes to connection string on application

    <add name="SampleContainer" connectionString="metadata=res://*/SampleModel.csdl|res://*/SampleModel.ssdl|res://*/SampleModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=PrimaryDB1;Failover Partner=SecondaryDB2;Initial Catalog=SampleDatabase;User ID=SCOTT;Password=*****;pooling=False;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient"/>

    When our primary crashed, and was shutdown, databases failed over to secondary, but application was still trying to connect to primary, it never connected to secondary(now primary). When primary was backup up again now as mirror secondary, the applications started flowing to secondary(current primary due to earlier failover).

    So it required failing primary to be available to transfer connections to secondary(current primary). I don't think it should work like this.  Please let me know if there is any problem with connection string.

    Regards,

    Sid

    Tuesday, July 22, 2014 2:26 PM

All replies

  • Hello,

    What mode is your mirroring setup to run in? Synchronous, asynchronous, is there a witness?


    Sean Gallardy | Blog | Microsoft Certified Master

    • Proposed as answer by Sofiya Li Wednesday, July 23, 2014 9:14 AM
    Tuesday, July 22, 2014 3:05 PM
    Answerer