Application redirection Failover partner

Proposed Answer Application redirection Failover partner

  • 15 decembrie 2008 11:15
     
      Are cod
    Hi..

    I am using Entity framework model .  so how I write to redirect my application failover partner to my Mirror server.

    This is my connetion String,

    <connectionStrings>
        <add name="VLTSLog" connectionString="Data Source=uldbtest;Initial Catalog=VTLSLogDB;Persist Security Info=True;User ID=usrvtls;Password=usr@#vtls"
    providerName="System.Data.SqlClient" />
        <add name="VTLSExceptionHandling" connectionString="Data Source=uldbtest;Initial Catalog=VTLSEXceptionDB;Persist Security Info=True;User ID=usrvtls;Password=usr@#vtls"
          providerName="System.Data.SqlClient" />
          <add name="CampaignEntities"  connectionString="metadata=res://*/CampaignModel.csdl|res://*/CampaignModel.ssdl|res://*/CampaignModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=uldbtest;Initial Catalog=dbvtls;Persist Security Info=True;User ID=usrvtls;Password=usr@#vtls;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
      </connectionStrings>




    Ismailhaider

Toate mesajele

  • 17 decembrie 2008 05:02
    Moderator
     
     Răspuns propus

    Hi Ismailhaider,

    You can use the "Failover Partner" connection string attribute.  For instance:

    "Data Source=uldbtest;Initial Catalog=VTLSLogDB;Persist Security Info=True;User ID=usrvtls;Password=usr@#vtls;
    providerName=System.Data.SqlClient;Failover Partner=MyMirrorServer"

    Does this help?


    Aaron Alton | thehobt.blogspot.com
    • Propus ca răspuns de slickj 25 octombrie 2012 20:33
    •  
  • 17 decembrie 2008 17:23
     
     
    "Data Source=uldbtest;Failover Partner=MyMirrorServe;Initial Catalog=VTLSLogDB;Persist Security Info=True;User ID=usrvtls;Password=usr@#vtls;
    providerName=System.Data.SqlClient"
     
     If i wirte Data Source=uldbtest;Failover Partner=MyMirrorServ   then its write


    When I start fail over,  My Event viewer on Mirror server ,when application wants to redirect on mirror, Its says Login fail for 'softechus\vtlsdb$'  

    Why, I have no user this type of in my server .


    Ismailhaider
  • 17 decembrie 2008 18:50
    Moderator
     
     
    Good question - I don't have any idea why you're receiving that error.  Might be a mixup in the sids, but I woudn't expect it to try to log in with the wrong ID.  Does the login (with the password that you've specified) exist on the mirror server?  Can you manually log in using that information?
    Aaron Alton | thehobt.blogspot.com
  • 17 decembrie 2008 18:59
     
     
    My principal datbase server name is 'VTLSDB'  , and and I failover the server, In Mirror server, application tries to coonect database on mirror

    Event viewer says, Login failed Softechus\vtlsdb$     Softechus is my domain name, and vtlsdb is my server name and also my database name of principal server, But I havent this type of login in Principal server,   My aplication  login Id sa and paassword=' I manually create this login and password on mirror with the same name and password,  I think my Instance dastabase vtlsdb$ want to access other server ,but I addes this on Mirror server Softechus\vtlsdb$ and have sysadmin rights, But Its didnt works and raise same time of error in Event viewer

    Ismailhaider
  • 14 ianuarie 2009 03:46
    Moderator
     
     
    Ismailhaider,

    Did you get your issue resolved?  I didn't see your response until now (the alerts are still a bit patchy).  Please let me know - if you still need help, I'll try to get a few others to look at your problem.
    Aaron Alton | thehobt.blogspot.com
  • 23 februarie 2011 10:20
     
     

    Hello,

    I have an application using Entity Framework 4.

    I was wondering if it was possible to use SQL Server 2008 R2 mirroring with Entity Framework 4 connection string.

     

    I Suppose i only need to add Failover Partner in the

    Provider Connection String property ? Am i right ?

     


    <connectionStrings>
        <add name="BDDContainer" connectionString="metadata=res://*/BDD.csdl|res://*/BDD.ssdl|res://*/BDD.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=COMPUTER\SQLEXPRESS;Initial Catalog=MyCatalog;Integrated Security=True;Pooling=False;MultipleActiveResultSets=True&quot;"
          providerName="System.Data.EntityClient" />

    </connectionStrings>

     

    would become

     


    <connectionStrings>
        <add name="BDDContainer" connectionString="metadata=res://*/BDD.csdl|res://*/BDD.ssdl|res://*/BDD.msl;provider=System.Data.SqlClient;provider connection string="Data Source=COMPUTER\SQLEXPRESS;Initial Catalog=MyCatalog;Integrated Security=True;Pooling=False;MultipleActiveResultSets=True;FAILOVER PARTNER=myFailOverPartner"
          providerName="System.Data.EntityClient" />

    </connectionStrings>
  • 23 februarie 2011 14:01
     
     

    Looks like SID issue, Did login created with same SID on both principle and mirror servers

  • 14 martie 2011 09:30
     
     
    Any updates please
  • 14 martie 2011 16:56
     
     
    Issue resolved
    Ismailhaider
  • 14 martie 2011 20:16
     
     

    Great Stuff

  • 30 ianuarie 2012 20:46
     
     

    Hi Ismail

    Can you please tell us how you resolved this issue? What changed you made?

     Thanks