our test-mirroring-system is allready and successfull running and now i have to test different scenarios for initiating a failover, before running in productive area. Is there something i have to consider for testing it? Can u give me some tips for that? I found this http://dcx.sybase.com/1101/en/dbadmin_en11/da-highavailability-s-4980336.html but i don't think this is the only possibility to test the mirror...
Another question: I found this in the documentation of HA (http://dcx.sap.com/index.html#1200/en/dbadmin/database-mirroring-overview.html): "... Any clients that were connected to the original primary server are disconnected, and any uncommitted transactions are lost. Clients must then reconnect to the database on the new primary server to continue accessing the database. When the original primary server becomes available again, it assumes the role of mirror server. "
What does it mean? Can the application use the same databasename at any time or must it be changed in the client application if the connection switched to the mirror server? Our target is, that the arbiter can unnoticed switch to the mirror server, so that the clients can continue working without disconnect and without login again with a different server name.
Thanks in advance and regards from germany Sabrina
Just a few hints:
To clarify: The arbiter does not "switch", it is only required to allow the partner to take the quorum, i.e. to help to find out if the partner is "left alone" or not.
answered 26 Mar '15, 05:50
Volker's comment on your question is excellent. In addition:
If you want to do more complete testing, you could optionally consider the following scenarios:
FYI an example of a connection string that will connect to which ever partner is the primary is:
in http://dcx.sap.com/index.html#1200/en/dbadmin/da-highavailability-s-4980336.html If you want your application to be able to connect to the primary after a failover, all of your client connections should be of this form (use primary alternate server name and host addresses for both partners).
answered 26 Mar '15, 08:53
Short answer: See High Availability Demo, Revised
Long answer: You test an HA setup by randomly killing the primary, secondary and/or arbiter servers and watching what happens with the databases and the client applications. If you stop one server, the client applications should continue (or be able to reconnect depending on which one server was killed). If you stop two servers then everything dies; there is no quorum so no primary can exist.
You can use dbstop or Windows taskkill to stop the servers.
Client applications that need to continue operating after a failover should (a) be able to gracefully handle a disconnection and do a reconnect, (b) use a connection string that will find the primary server on whatever computer it now resides on and (c) keep trying (b) if it fails so it reconnects as soon as a primary becomes available. The dbisql utility is an example of a client application that does just than, and you can see how that process works in this article: High Availability Demo, Revised
answered 26 Mar '15, 08:54