Can classic ASP handle SQL Server mirroring failovers?

1k Views Asked by At

I have a couple of "classic" ASP apps that need to connect to a SQL Server database that is using database mirroring. Can ASP handle the failover in a similar way to ASP.NET? As in if I adjust the connection string to put the failover server details?

2

There are 2 best solutions below

5
On

Yes, as far as the ASP application is concerned, it is seen as a host. If you have automatic failover setup, SQL server will deal with everything. If you have manual failover, you may need to change the host in the connection string. Everything else will then work as normal.

1
On

Why not just let MSSQL do the job or you.

In your web.config set your connection string this way :

<connectionStrings>
  <add name="myConnection" connectionString="Data Source=myDBServerAddress;
             Failover Partner=myDBMirrorServerAddress;Initial Catalog=myDataBase;
             Integrated Security=True;"
       providerName="System.Data.SqlClient" />
</connectionStrings>