Thursday, June 21, 2012

SharePoint 2010 - Move Nintex Workflow Databases between SharePoint farms

Some months ago my project manager came to me and asked if it is possible to move a content database from production farm to development farm. Our developers needed real content to test different extensions. I answered YES, with a big smile. BUT the I recognized, that we use Nintex Workflows. If I would only copy the SharePoint content database, all Nintex workflows would be in a inconsistent state and not functioning on development/integration farm. So I stopped smiling and started searching for a solution.

First of all: Nintex published some whitepapers about this issue.

http://connect.nintex.com/files/folders/tutorials_and_how_tos_nw2010/entry20197.aspx
 http://connect.nintex.com/files/folders/technical_and_white_papers_nw2010/entry17226.aspx

Based on this inputs I created a approch to move our content and Nintex Workflow databases:

Production:
  1. Backup SharePoint Content Database
  2. Backup Nintex Database
  3. Both have to be in Sync. No Workflow changes while Backup

Development/Integration:
  1. Restore SharePoint Content Database
  2. Delete existing Nintex Database
  3. Restore Nintex Database
  4. Mount SharePoint Database
  5. Perform IIS Reset
  6. Change license key to development key
 
HINT: I automated the database backup/restore process for repeating actions with MS SQL SSIS. It allows you to prepare a package with all parameters and actions required for the movement.

At the end you get a "click once" Nintex database deployment between farms! Quite nice..

8 comments:

  1. I am trying to migrate some site collections to another server, but we want the change to be gradual, what would your focus be on that case? do you know if you can backup a specific site collection from Nintex database?

    ReplyDelete
  2. To give you a proper advice, we need to clarify the following points:

    Are you trying this on SharePoint 2010? Can you please also tell me the exact Nintex product version, which you can find in central admin.

    How do you try to migrate the site collection? As I assume, you have a content database with multiple site collections and you want to export a site collection to a new content database. Or do you use any 3rd Party tool?

    The minor issue here is to understand, that Nintex saves some data of the running Workflows in the content database, but all configuration settings are stored in the Nintex configuration database. The tricky point here is to Keep them in sync while backup, restore and attach to target SharePoint.

    Please give me some more Information and we ll find a way to solve the issue...

    ReplyDelete
    Replies
    1. Thanks for your prompt response. Yes, it's SharePoint 2010, and it's Nintex Workflow 2010. We use the method of the backup and restoring database, directly on SQL Server, and then attaching it to the new site collection.

      Delete
  3. normally Content databases are attached to web applications. so in this Case you Need to do a full backup and restore of the Content database and nintx workflow database as describe in the above article. After attach to the new web application you can go ahead and delete all unused site collections from your migrated content database. this ll be reflected in nintex configuration database also and deleted objects ll be deleted there also.

    ReplyDelete
    Replies
    1. then you can delete the migrated site collections from old system and you have splitted your content databases and site collections successfully.

      Delete
    2. It would work if we were to make the complete migration at once but the problem is that they want some sites now and some sites later but if they keep working on the old sites I don't think we can update the changes in the workflows, that's my question, if it is possible to make it in two parts.
      Also, what happens to the ongoing workflows? will they keep working just fine after the restore?

      Delete
    3. To make in in two steps Ll require some more engineering, but it's possible. My recommended way would be to migrate at once. the other possible solution ll result in much effort. After successful migration of content database and nintex at the same time, Workflows keep their state.

      Delete
  4. I will try and use this approach. Thanks for your recommendation and for your time!

    ReplyDelete