New Posts New Posts RSS Feed: Does DevForce work with SQL mirrroring?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Does DevForce work with SQL mirrroring?

 Post Reply Post Reply
Author
Customer View Drop Down
Senior Member
Senior Member
Avatar
User Submitted Questions to Support

Joined: 30-May-2007
Location: United States
Posts: 260
Post Options Post Options   Quote Customer Quote  Post ReplyReply Direct Link To This Post Topic: Does DevForce work with SQL mirrroring?
    Posted: 12-Jul-2007 at 4:04pm
We are going to be using SQL2005 mirroring with automatic failover. Does the IdeaBlade connection object support a failover event? How would detect and implement if it doesn't.

We saw some reference documentation to a sqlconnectionstringbuilder object that includes a property for the failover server and context. Here is the MSDN help reference:

ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEVFX.v20.en/cpref4/html/T_System_Data_SqlClient_SqlConnectionStringBuilder.htm

Back to Top
IdeaBlade View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 30-May-2007
Location: United States
Posts: 353
Post Options Post Options   Quote IdeaBlade Quote  Post ReplyReply Direct Link To This Post Posted: 12-Jul-2007 at 4:05pm

This is an interesting question.  After some research, we believe DevForce should work with this new SQL2005 mirroring with automatic failover feature.

Related web link: http://www.microsoft.com/technet/prodtechnol/sql/2005/dbmirror.mspx

See the Client-side Redirect section of this page:

Client-side Redirect

In SQL Server 2005, if you connect to a database that is being mirrored with ADO.NET or the SQL Native Client, your application can take advantage of the drivers' ability to automatically redirect connections when a database mirroring failover occurs. You must specify the initial principal server and database in the connection string, and optionally the failover partner server.

There are many ways to write the connection string, but here is one example, specifying server A as the principal, server B as the mirror, and AdventureWorks as the database name:

"Data Source=A;Failover Partner=B;Initial Catalog=AdventureWorks;Integrated Security=True;"

The failover partner in the connection string is used as an alternate server name if the connection to the initial principal server fails. If the connection to the initial principal server succeeds, then the failover partner name will not be used, but the driver will store the failover partner name that it retrieves from the principal server on the client-side cache.

Assume a client is successfully connected to the principal, and a database mirroring failover (automatic, manual, or forced) occurs. The next time the application attempts to use the connection, the ADO.NET or SQL Native Client driver will detect that the connection to the old principal has failed, and will automatically retry connecting to the new principal as specified in the failover partner name. If successful, and there is a new mirror server specified for the database mirroring session by the new principal, the driver will retrieve the new partner failover server name and place it in its client cache. If the client cannot connect to the alternate server, the driver will try each server alternately until the login timeout period is reached.

The great advantage of using the database mirroring support built into ADO.NET and the SQL Native Client driver is that you do not need to recode the application, or place special code in the application, to handle a database mirroring failover.

If you do not use the ADO.NET or SQL Native Client automatic redirection, you can use other techniques that will enable your application to fail over. For example, you could use Network Load Balancing to manually redirect connections from one server to another, while the client just connects to a virtual server name. You might also write your own redirection code and retry logic.

However, all these techniques for coordinating client redirection with a database mirroring have an important limitation. Database mirroring occurs only at the database level, not the server level. Be careful if your application relies on querying several databases on a server, or uses multi-part object names to query across several databases. When several databases reside on one server, and they are mirrored to a standby server, it is possible that one of several databases might fail over to the standby but the others remain on the original server. In that case, you might need one connection per database that you are querying, so that you do not attempt cross-database queries on a standby server where only one database is a principal and the remaining are mirrors.

 As DevForce is using ADO.NET completely to access its data source, we believe you need ONLY to update the <rdbKey> to specify “Failover Partner=XXXXX;” in the connection string of the IdeaBlade.ibconfig file.  It doesn’t seem that we need to recode DevForce to support this feature.

.
Back to Top
johnkym View Drop Down
Newbie
Newbie
Avatar

Joined: 25-Jun-2007
Location: Australia
Posts: 4
Post Options Post Options   Quote johnkym Quote  Post ReplyReply Direct Link To This Post Posted: 31-Dec-2007 at 9:44pm
when running SQL Mirroring and Ideablade the only thing you should remember is to manually remove the Automaticly added Collum that SQL mirroring adds in to the table.  egg normally called rowguid. i have now had this running for quite some time and can assure you there is no problem at all in fact it works brilliantly this way. as you can set your own DNS record pointing to your SQL server and there after you are set.
eg..
SQLServer = 192.16.0.11
 
change host file
192.168.2.12 SQL
 
i can have the same program running under multiple diferant network systems and orginizations and all i have to do is ad a DNS entry all servers being called diferant names but the Ideablade Model program all point to SQLServer. this also means i can work on the program on my laptop and not have an internet connection as i drive around Australia.... when i get back to the office the changes are replicated to the main server..
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down