Failoverpartner
Failoverpartner
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
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
-
Challenger
- Devart Team
- Posts: 925
- Joined: Thu 17 Nov 2005 10:53
Re: Failoverpartner
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!
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!
-
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
User name and password are present in the ConnectStringAndreyZ 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.
-
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