SQL Server Failover

Using RAD Studio 2007, SQL Server 2005 on two different servers.

My current application is running fine on the first server.  I have
successfully setup a Mirror of the database with a Witness Server watching.
I tried using the following connection UDL file but it would not failover to
the second server.  Can the mirrored server be used without failing the
primary server?  In my testing, I removed access to the primary from my
workstation to see if my program still ran.

UDL File:
[oledb]
; Everything after this line is an OLE DB initstring
Provider=SQLOLEDB.1;Password=xxxxxxx;Persist Security Info=True;User
ID=sa;Initial Catalog=ProParts;Data Source=BONDO;FailoverPartner=CRM

Any tips for using Delpi, ADO and mirrored servers is appreciated.

Thanks

John
0
John
10/30/2008 9:23:08 PM
embarcadero.delphi.ado 597 articles. 1 followers. Follow

2 Replies
631 Views

Similar Articles

[PageSpeed] 13

> {quote:title=John Friel III wrote:}{quote}
> Using RAD Studio 2007, SQL Server 2005 on two different servers.
> 
> My current application is running fine on the first server.  I have
> successfully setup a Mirror of the database with a Witness Server watching.
> I tried using the following connection UDL file but it would not failover to
> the second server.  Can the mirrored server be used without failing the
> primary server?  In my testing, I removed access to the primary from my
> workstation to see if my program still ran.
> 
> UDL File:
> [oledb]
> ; Everything after this line is an OLE DB initstring
> Provider=SQLOLEDB.1;Password=xxxxxxx;Persist Security Info=True;User
> ID=sa;Initial Catalog=ProParts;Data Source=BONDO;FailoverPartner=CRM
> 
> Any tips for using Delpi, ADO and mirrored servers is appreciated.
> 
> Thanks
> 
> John

I have not tried this but I believe that you should use SQLNCLI driver instead of SQLOLEDB in your connection string.
http://msdn.microsoft.com/en-us/data/aa937733.aspx

/Micke
0
Mikael
10/30/2008 9:54:09 PM
I was able to switch to using the SQLNCLI driver and indeed it had the 
failover partner setting for the UDL.  However, when the server actually 
failed over in testing, my program also failed.  (can't find the note where 
I wrote down the exact msg).  It looks like ADO cannot take advantage of the 
condition automatically.

Anybody trapping for this condition?  And what do you do in a try/except to 
keep your programs happy?




<Mikael Eriksson> wrote in message news:36590@forums.codegear.com...
>> {quote:title=John Friel III wrote:}{quote}
>> Using RAD Studio 2007, SQL Server 2005 on two different servers.
>>
>> My current application is running fine on the first server.  I have
>> successfully setup a Mirror of the database with a Witness Server 
>> watching.
>> I tried using the following connection UDL file but it would not failover 
>> to
>> the second server.  Can the mirrored server be used without failing the
>> primary server?  In my testing, I removed access to the primary from my
>> workstation to see if my program still ran.
>>
>> UDL File:
>> [oledb]
>> ; Everything after this line is an OLE DB initstring
>> Provider=SQLOLEDB.1;Password=xxxxxxx;Persist Security Info=True;User
>> ID=sa;Initial Catalog=ProParts;Data Source=BONDO;FailoverPartner=CRM
>>
>> Any tips for using Delpi, ADO and mirrored servers is appreciated.
>>
>> Thanks
>>
>> John
>
> I have not tried this but I believe that you should use SQLNCLI driver 
> instead of SQLOLEDB in your connection string.
> http://msdn.microsoft.com/en-us/data/aa937733.aspx
>
> /Micke
0
John
11/3/2008 9:48:32 PM
Reply: