Page 1 of 1

Failoverpartner

Posted: Fri 21 Aug 2009 13:54
by Freerk
Hello,

We are trying to get failover partner to work using SQL server 2008 and sql native client.
We have tried anything, but SDac doesn't reconnect correctly when it fails over to the other server.
It keeps trying to connect the "old" sqlserver
Any tips?


Regards,
Freerk Jelsma
SchoolMaster BV

Posted: Tue 25 Aug 2009 14:44
by Dimon
Please, try to compose a small sample to demonstrate the problem and send it to dmitryg*devart*com.

Posted: Mon 12 Oct 2009 15:01
by rwright
Dimon wrote:Please, try to compose a small sample to demonstrate the problem and send it to dmitryg*devart*com.
Did you get an example? What was the resolution?

Thanks!

Posted: Fri 16 Oct 2009 10:50
by Challenger
We did not recieve your sample. Please send it to support * devart * com once more.

Re: Failoverpartner

Posted: Fri 09 Dec 2011 15:45
by rwright
I am having this issue, any resolution?

More information:

We created a small app that loops and adds a row to a table.

dmCore.MSSQL.SQL.Clear;
dmCore.MSSQL.SQL.Add('INSERT INTO tblXX ' +
' (TranID) ' +
' VALUES ' +
' (7002100 + ' + IntToStr(i) )');
try
dmCore.MSSQL.Execute;
except
dmCore.MSConnection.Disconnect;
dmCore.MSConnection.Connected := False;
dmCore.MSConnection.Close;
dmCore.MSConnection.Connected := True;

dmCore.MSSQL.Execute;
end;

SQL Server 2008
SDAC vcl ver. 6.1.3.0
Provider: SQLNCLI.1

A: Principle
B: Mirror (Failover Partner)

When A goes down, we receive exceptions (Login failed for user 'sa' and Named Pipes Provider: Could not open a connection to SQL Server[2]).

However, user 'sa' is never used. This seems to indicate that the user/pass is not passed to the partner. For Named Pipes, we have it turned off at the server.

If we close the app and restart while A is still down, the app connects to B without an issue. If A is brought back up while app is connected to B we switch over to A without issue.

We've tried to disconnect, Connected=false, Close, then connected=True within the loop before each insert to emulate closing the app and restarting and the same behavior exists.

A->B fails
B->A works

Thanks!

Posted: Tue 13 Dec 2011 15:49
by AndreyZ
This error can occur if SQL Server Authentication is used and the user name and password are blank. In this case SDAC uses the 'sa' user to connect to a server. To avoid this problem, you should set the user name and password if SQL Server Authentication is used, or use Windows Authentication instead.

Failoverpartner

Posted: Tue 13 Dec 2011 16:13
by rwright
AndreyZ wrote:This error can occur if SQL Server Authentication is used and the user name and password are blank. In this case SDAC uses the 'sa' user to connect to a server. To avoid this problem, you should set the user name and password if SQL Server Authentication is used, or use Windows Authentication instead.
User name and password are present in the ConnectString

Posted: Wed 14 Dec 2011 11:49
by AndreyZ
Please try reproducing this problem using the standard ADO components. It seems that you configured the B server incorrectly. The correct way to configure database mirroring is described at http://msdn.microsoft.com/en-us/library/ms188712.aspx