| Author |
Application Server to Point to Mirror Server
|
|
| Gary Lou 2006-12-05, 12:12 am |
| Hi All,
I have tested database mirroring for a few days. The application server
is using a connection string in the registry to point to SQL server.
When failover happens, how can I tell the app server to failover and
run against the mirrored server and mirrored database?
Please advice. Thanks.
-Gary
| |
| Dave Patrick 2006-12-05, 12:12 am |
| You must use SQL Native Client driver. This gives you the option to specify
the fail-over mirror server name. Then you must also use a witness server
for the fail-over to be automatic.
See books online;
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/a62d9dd7-3667-4751-a294-a61fc9caae7c.htm
--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"Gary Lou" wrote:
> Hi All,
>
> I have tested database mirroring for a few days. The application server
> is using a connection string in the registry to point to SQL server.
> When failover happens, how can I tell the app server to failover and
> run against the mirrored server and mirrored database?
>
> Please advice. Thanks.
>
> -Gary
>
| |
| Roger Wolter[MSFT] 2006-12-05, 12:12 am |
| The other thing to keep in mind is that when the primary fails over the
connection closes with an error and the application server will have to
reopen the connection to get to the new primary. This may require some code
changes unless your application already handles this.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Dave Patrick" <DSPatrick@nospam.gmail.com> wrote in message
news:382B1DEB-E7EB-4A6F-8AA8- C865A9215D05@microso
ft.com...
> You must use SQL Native Client driver. This gives you the option to
> specify the fail-over mirror server name. Then you must also use a witness
> server for the fail-over to be automatic.
>
> See books online;
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/a62d9dd7-3667-4751-a294-a61fc9caae7c.htm
>
>
> --
>
> Regards,
>
> Dave Patrick ....Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
>
> "Gary Lou" wrote:
>
| |
| Gary Lou 2006-12-05, 5:16 am |
| Thank you for both of your response.
My application server is running on Windows 2000 sp4. I have SQL Native
Client enable in the SQL 2005 server.
Question:
1) I got a "Login timeout expired" error when tried to set up the
connection under ODBC. Do I need to install sqlncli.msi in the app
server to make it work?
2) The connection string in the registry is as below. What needs to be
changed to make the failover to work?
Provider=SQLOLEDB. 1;Password=p8ssw0rd;
Persist Security Info=True;User
ID=DB_USER1;Initial Catalog=MagicDB;Data
Source=MagicSQL2000;
Network
Library=DBMSSOCN
Many thanks.
Roger Wolter[MSFT] wrote:[color=darkred
]
> The other thing to keep in mind is that when the primary fails over the
> connection closes with an error and the application server will have to
> reopen the connection to get to the new primary. This may require some code
> changes unless your application already handles this.
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
>
> "Dave Patrick" <DSPatrick@nospam.gmail.com> wrote in message
> news:382B1DEB-E7EB-4A6F-8AA8- C865A9215D05@microso
ft.com...
| |
| Roger Wolter[MSFT] 2006-12-05, 7:12 pm |
| You need either SQLNCLI or the .Net 2.0 SQL Client to use the failover
feature so you will have to install the appropriate software on your clients
I'm not a connection string expert. Obviously you will need to change the
provider to SQLNCLI and specify the secondary server. There's a good
explanation here:
http://msdn2.microsoft.com/de-de/library/ms366348.aspx
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Gary Lou" <garylou@gmail.com> wrote in message
news:1165301726.681691.33270@l12g2000cwl.googlegroups.com...
> Thank you for both of your response.
>
> My application server is running on Windows 2000 sp4. I have SQL Native
> Client enable in the SQL 2005 server.
>
> Question:
> 1) I got a "Login timeout expired" error when tried to set up the
> connection under ODBC. Do I need to install sqlncli.msi in the app
> server to make it work?
>
> 2) The connection string in the registry is as below. What needs to be
> changed to make the failover to work?
> Provider=SQLOLEDB. 1;Password=p8ssw0rd;
Persist Security Info=True;User
> ID=DB_USER1;Initial Catalog=MagicDB;Data
Source=MagicSQL2000;
Network
> Library=DBMSSOCN
>
>
> Many thanks.
>
>
>
> Roger Wolter[MSFT] wrote:
>
| |
| Gary Lou 2006-12-05, 7:12 pm |
| Thank you Roger and Dave. It's working all together.
Roger Wolter[MSFT] wrote:[color=darkred
]
> You need either SQLNCLI or the .Net 2.0 SQL Client to use the failover
> feature so you will have to install the appropriate software on your clients
>
> I'm not a connection string expert. Obviously you will need to change the
> provider to SQLNCLI and specify the secondary server. There's a good
> explanation here:
> http://msdn2.microsoft.com/de-de/library/ms366348.aspx
>
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
>
> "Gary Lou" <garylou@gmail.com> wrote in message
> news:1165301726.681691.33270@l12g2000cwl.googlegroups.com...
|
|
|
|