Farrukh hameed
Programmer
HI Experts !
I am not sure right area to put my question sorry !
I have multiple databases on different servers , the issue I am facing a downtime if principal server goes down the application cannot able to connect to mirror server ( when failover happens auto & mirror server comes to principal, synchronized ). Is there is a way the below two connection works on condition. suppose if the Main principal server database online then connect to that database else look for other connection string to connect other database(DB2).
<application id="Virtual_Machine">
<description>Virtual_Machine</description>
<database>
<driver>SQLSERVER</driver>
<sqlsyntax>SQLSERVER</sqlsyntax>
<connectString>Data Source=Computername1;Initial Catalog=DB1;User ID=sa;Password=*****;Application Name=testapp</connectString>
</database>
</application>
<application id="Virtual_Machine1">
<description>Virtual_Machine1</description>
<database>
<driver>SQLSERVER</driver>
<sqlsyntax>SQLSERVER</sqlsyntax>
<connectString>Data Source=Computername2;Initial Catalog=DB2;User ID=sa;Password=*****;Application Name=testapp</connectString>
</database>
</application>
I am not sure right area to put my question sorry !
I have multiple databases on different servers , the issue I am facing a downtime if principal server goes down the application cannot able to connect to mirror server ( when failover happens auto & mirror server comes to principal, synchronized ). Is there is a way the below two connection works on condition. suppose if the Main principal server database online then connect to that database else look for other connection string to connect other database(DB2).
<application id="Virtual_Machine">
<description>Virtual_Machine</description>
<database>
<driver>SQLSERVER</driver>
<sqlsyntax>SQLSERVER</sqlsyntax>
<connectString>Data Source=Computername1;Initial Catalog=DB1;User ID=sa;Password=*****;Application Name=testapp</connectString>
</database>
</application>
<application id="Virtual_Machine1">
<description>Virtual_Machine1</description>
<database>
<driver>SQLSERVER</driver>
<sqlsyntax>SQLSERVER</sqlsyntax>
<connectString>Data Source=Computername2;Initial Catalog=DB2;User ID=sa;Password=*****;Application Name=testapp</connectString>
</database>
</application>