473,404 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

ADO.NET - Transparent Client Redirect (not working?)

I have a database setup using SQL Server Mirroring. My database
servers are running SQL Server 2005 SP1, Enterprise Edition.

I have created a windows application that will insert a record into my
mirrored database by clicking a button. (connection string below)

If I run my test application I can successfully insert a record into
the database as expected. However, if I take down the principal (the
mirror becomes the principal) and if I try to insert another record it
does not succeed. I get a SQL timeout exception. If I close the
application and restart it I can successfully insert a new record
(where the old mirror is now principal). What do I need to do to be
able to not close the application to take advantage of the "transparent
client redirect" that ADO.NET boasts about?

SqlConnection.ConnectionString:
Server=sql1; Failover Partner=sql2; Database=TestMirror;
Network=dbmssocn; uid=sa; pwd=mypass

Thanks,
- Ian

Jun 1 '06 #1
1 4666
I found the answer to my own question.

See this KB article:
http://support.microsoft.com/kb/912151

If you don't obtain the hotfix and wait for the service pack you can
switch your code to use use System.Data.OleDb instead of
System.Data.SqlClient.

Make sure your connection string looks similar to this:
"Provider=SQLNCLI;Server=sql1; Failover Partner=sql2;
Database=TestMirror; Network=dbmssocn; uid=sa; pwd=mypass"

Hope this helps!

Thanks,
Ian

Ian Jenkins, MCSD wrote:
I have a database setup using SQL Server Mirroring. My database
servers are running SQL Server 2005 SP1, Enterprise Edition.

I have created a windows application that will insert a record into my
mirrored database by clicking a button. (connection string below)

If I run my test application I can successfully insert a record into
the database as expected. However, if I take down the principal (the
mirror becomes the principal) and if I try to insert another record it
does not succeed. I get a SQL timeout exception. If I close the
application and restart it I can successfully insert a new record
(where the old mirror is now principal). What do I need to do to be
able to not close the application to take advantage of the "transparent
client redirect" that ADO.NET boasts about?

SqlConnection.ConnectionString:
Server=sql1; Failover Partner=sql2; Database=TestMirror;
Network=dbmssocn; uid=sa; pwd=mypass

Thanks,
- Ian


Jun 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: paul koelle | last post by:
Hi list, My ultimate goal is to have a small HTTP proxy which is able to show a message specific to clients name/ip/status then handle the original request normally either by redirecting the...
0
by: mazda_88 | last post by:
I working on a project where there is a lot of legacy asp code and it is uses encryption and server redirect to hide the url from the end user. Since server.transfer does not allow query strings,...
4
by: Sharon | last post by:
Hi all, Can any one explain the relationship between real & transparent proxy? I couldn't fully understand it from the explanation at MSDN. Thanks, Sharon.
8
by: MikeB | last post by:
Hi, I created a picturebox with a map as an image. I want to make certain areas on the map clickable hotspots and the way I'm trying to do this is to create a transparent label with a different...
4
by: Dale | last post by:
I am creating GIF images with transparent backgrounds on-the-fly for a web app and rendering them by using System.Drawing.Image.Save(Response.OutputStream, ImageType.GIF). I am confident that...
0
by: Martin | last post by:
In server-side code of Page1.aspx, in the click eventhandler for an imagebutton, I branch to another page: Response.Redirect("Page2.aspx") But the client-side javascript on Page2.aspx is...
7
by: Electric Co. | last post by:
Hello, note: This is for a Faculty web site that is undergoing a migration to an open source solution so my motives are legit. I need to build a relay from IIS handling URL_A to a PHP server...
2
by: Hannibal | last post by:
Hi All, The below code use to work on my Win2K3 IIS6. for for some unknown reason it`s no longer working. here the code. Session("LOGIN_USER_ID") = UserID ' Update the cookie if the login...
33
by: rvj | last post by:
if you redirect on an IIS , must the client url address bar always be updated with the new address. what options are? Q1 if a user requests http://old.com , is there a method of ASP...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.