Provisioning Services 5.1 Specify Database Mirror Failover Partner…Huh?

Share Button

This feature has been been added to Provisioning Services 5.6. Provisioning Services 5.1 has another new feature – the ability to specify a database mirror failover partner. Ok, but what are the requirements? How do you configure it? Do you use SQL mirroring, replication, or a combination of both?

Provisioning Services 5.1 has some nice new features. See my blog on it here – Have you upgraded to Provisioning Services 5.1 yet? Why Not?. There is another undocumented feature, the ability to specify a database mirror partner when joining the farm.

Provisioning Services 5.1 Specify Database Mirror Failover Partner...Huh?

I have looked at the documentation, release notes, technotes, etc…I have found nothing. Showing us this new feature but giving us nothing on configuring it is like giving a kid a Happy Meal but then saying you can’t have the toy after they have eaten all of their food. So one weekend I decided to take the red pill and see how far down the rabbit hole goes with this feature.

The Good

Citrix has continually added some nice features since they came out with Provisioning Server 4.5. With Provisioning Server 5.0 they introduced a central database with a farm structure and sites like XenApp has with zones. Provisioning Services 5.1 got even better with even more great new features. Hopefully this feature is a preview of what is to be fully configurable in an upcoming update or service pack for Provisioning Services 5.1. If not that hopefully some kind of technote on configuring it. 

The Bad

After trying all three SQL Server 2008 mirroring types I keep getting the error: Invalid Failover Server – The Farm must exist on the failover server.

Provisioning Services 5.1 Specify Database Mirror Failover Partner...Huh?

This is because the mirrored database isn’t online until you failover to it. So I thought what about SQL Server replication? Well can’t do that either since some of the tables in the database don’t have primary keys set on them. An important table, the farm table, doesn’t have a primary key set. So there’s the issue with replication.

The Ugly

So after trying mirroring and replication I thought what about failing over the mirror while going thru the wizard? This does allow you to get past the error about the farm not existing. So I tried that and failed back. This had undesirable results. The second server thought it was in the farm but the first server I created the farm with wouldn’t show the second server online.

So I thought to myself, what about manually doing it in the registry like you do for XenApp database mirroring in the mf20.dsn file? This doesn’t work either since the registry entries for the database under HKLMSoftwareCitrixProvisioningServicesDatabase are in some kind of hash format. I have tried just entering the SQL server name, but that doesn’t work either.

On my last attempt to figure this out I just did a plain old database restore on the secondary SQL server and this worked. The farm is up properly now but wait a minute, I will have to restore the database manually? This isn’t a good solution for a secondary SQL server or even a secondary data center where my XenApp database is automatically being mirrored/replicated.

So after my weekend of testing, I haven’t found a way to make this work. Maybe someone out there has. Hopefully Citrix comes out with some kind of update or technote for this. This is a very nice feature to add since you have already given us a farm structure and sites. Provisioning Services 5.1 is great product. Keep making it better.

If you have found this article interesting or if you have any other insights, please feel free to leave comments on this article.

Share Button
  1. Patrick CôtéPatrick Côté09-13-2010

    Hi Jarian,

    Nice article! Have you ever test that on PVS 5.6? I’m searching a way to implemant a disaster recovery site for a XenApp farm with PVS 5.6 and NetScaler GSLB. So I need a way to replicate the SQL PVS DB or create a new PVS farm on the failover site (not my first choice!!)…

    Also, you have some recommandation for the replication of the DB (SQL 2008 R2) for XA 5; miroring, transactional replication, etc!!

    Thanks and sorry for my bad english!!

  2. Pete DowningPete Downing09-10-2009

    Jarian,

    Appreciate your detailed and direct blog post here. As PM of Provisioning Services I enjoy posts like this because they provide “real” feedback. What you are seeing is unfortunately a bug and we are addressing. You will notice that we will release a SP1 in the next few weeks for PVS 5.1, however, you will notice this feature will be removed. We decided to do this because our DB caching feature is solving the use-case we set out to solve for the time being. We are not ditching this feature and will re-introduce it in the next release of PVS. We would like to re-introduce with solid best practices and documentation. Essentially this feature was to be a easter egg for some end-users to test and unfortunately got too exposed.

    Feel free to drop me an email where you feel very strongly about this topic. I’d love to discuss your view on mirroring versus replication.

    Thanks!
    Pete Downing
    Principal Product Manager, Provisioning Services & Xen Cloud Project
    Datacenter & Cloud Division
    Citrix Systems, Inc.

    • Jarian GibsonJarian Gibson09-11-2009

      Pete,

      Thanks for the information and comments! I can see use cases for both SQL replication and mirroring just like in XenApp. I will definitely email you. Thanks!

Leave a Reply to Jarian Gibson Click here to cancel reply.