Not in correct state to become principal

I am using asynchronous mirroring. When I try to failover on the mirror server using “alter database xxx set partner force_service_allow_data_loss” (having disconnected the primary server from the network) it sometimes fails to failover (it reports that the database is not in the correct state to failover). I can re-connect the primary server, get them sync’d again, then unplug the primary and it will failover ok.

Any ideas... or is this just an issue that will be fixed in the next SP



Answer this question

Not in correct state to become principal

  • Rulli76

    Hi Mark.

    Thanks for the reply. Sorry I didn't respond sooner.

    1. I am just testing, but this is for production asap. I want to use High Performance in production so what option do I have other than force_service_allow_data_loss As far as I can make out this is the only way to recover in the High Performance mode.

    2. What is RTM

    2c. Why I tried this and it didn't seem to cause any problems. Is there a sequence of events I need to avoid

    I have been informed that this is a known issue which will be fixed in SP1, so I will wait until then.

    Thanks

    Will


  • Reymarx Gereda

    Hi Sanjay

    Thanks for the reply.

    The force_service_allow_data_loss works intermittently. I have tried shutting down and stopping and they both work 75% of the time. That leaves 25% of the time that it doesn't work doing exactly the same thing. I can't see why something can work, then suddenly fails to work.

    Will


  • chinafax

    Hi,

    Several things:

    1. I hope that you use force_service_allow_data_loss sparingly in production, and now you are just testing it.  ;)

    2. Force service in RTM had some restrictions on it.

    a. The partners had to be synchronized at least once since the last role change.

    b. I believe that you had to have safety OFF for Force Service to work.

    c. If one or both of the Mirror or Witness were restarted since last contact with the Princpal, you could not force service.

    3. In SP1, there are far fewer restrictions on using force service. Basically, the Mirror has to be discontected from the Principal. Also, right after becoming the Mirror, it (the new Mirror) basically performs a "physical UNDO;"  you cannot force service if the new Mirror is in this "physical UNDO."

    Thanks,

    Mark



  • pilchieMS

    Have you tried

    1) shutting down the principal server

    2) stopping the principal instance

    Does the force_service_allow_data_loss work OK in these two case


  • Not in correct state to become principal