• Solved: Moving SharePoint 2010 Designer Workflows between Sites

    In man occasions you would be faced by the need to move workflows you developed using SharePoint designer from one site to another. This might be the case if for example you developed and tested the workflow on a testing environment and now wants to move to the production environment without the need to re-develop the workflow.

    The steps to perform this is rather simple:

    1. Export the workflow to Visio.
    2. Edit the VWI archive and delete the configuration file.
    3. Import the workflow back to your destination site.

    So open the SharePoint designer and open the source site. click on the workflows link on the left and then the workflow you want to move. Click on the ribbon on export to Visio button.

    image

    Now rename the file exported (VWI file) to be a ZIP file and open it with Windows Explorer. You will find a file named “workflow.xoml.wfconfig.xml”

    image

    Just delete this file. Now rename the archive back to be a VWI file.

    Now open the destination site and click the import from Visio and browse to the edited VWI file. This will allow you to re-associate your workflow as if it was created or exported from Visio rather than the designer while preserving any development made in the workflow it self.

  • Creating an Active/Active SQL Cluster using Hyper-V: Part3 the Active/Active Configuration

    In part 1 of this series I showed you how to configure the virtual storage required for the cluster. In part 2 of this series I showed you how to configure two SQL instances on the created windows cluster. In this part I will show you how to configure these two SQL instances into an Active/Active configuration.

    Introduction

    In this series of posts I will walk you through the processes of creating an Active/Active SQL server cluster using Hyper-V and Microsoft iSCSI target software for virtualized SAN. The target is to create first a storage server hosted on a normal Windows 2008 R2 server. Then connect to this server using two other machines as iSCSI initiators. Then I will create the windows cluster along with the DTC clustered service. A clustered SQL server instance will then be created. Finally another clustered SQL server instance will be created and Active/Active configuration of both instances will be applied.

    Solution Architecture

    The solution is fairly simple as per the below configuration.

    clip_image002

    Setting Active-Active Configuration

    Since we need to configure an Active/Active configuration for this cluster and we do not want any instance to depend on other components from the other instance we will have to add another DTC clustered service to the windows cluster. This is to allow the separation of the DTC service between both instances. I will also show you how to configure the SQL service to depend on its relating DTC service instance so that it moves it along with the SQL instance.

    Prepare the second DTC cluster

    1-      Go to the iSCSI target and create or add another shared disk to be used by the second SQL cluster
    clip_image003

    2-      Go to one of the nodes and then open the iSCSI initiator and then click again on auto configure of the volumes and devices.
    clip_image004

    3-      Now open the disk management utility and create the active partition on this disk and format it using NTFS.

    4-      Open the windows cluster management and add this disk to the cluster.
    clip_image005

    5-      Right click on the service and applications and click to create a new one
    clip_image006

    6-      Choose DTC
    clip_image008

    7-      Give it a name and a unique IP
    clip_image010

    8-      Select the available storage
    clip_image012

    9-      The second DTC clustered instance is created
    clip_image014

    Move each SQL instance and its associated DTC service to its preferred node

    1-      Move one SQL instance and one DTC to the server UK-LIT-DB1

    2-      The other SQL instance and the other DTC make sure they are moved to the other server UK-LIT-DB2

    clip_image015

    clip_image017

    clip_image019

    Add each DTC service as a resource to the associated SQL service

    1-      Right click on the first SQL instance and click add resource
    clip_image020

    2-      Select the available DTC (with GUID) service
    clip_image022

    3-      Click next and finish
    clip_image024

    4-      Bring the new resource online
    clip_image025

    5-      Create a dependency between the SQL server service and the newly added DTC resource
    clip_image026
    clip_image027

    6-      Create a dependency between the newly created DTC service and the SQL server cluster name and disk to make sure it is moved with it.
    clip_image028
    clip_image029

    7-      Right click on the second SQL instance and click add resource
    clip_image020[1]

    8-      Select the available DTC (with GUID) service
    clip_image031

    9-      Click next and finish
    clip_image033

    10-   Bring the new resource online
    clip_image034

    11-   Create a dependency between the SQL server service and the newly added DTC resource
    clip_image026[1]
    clip_image035

    12-   Create a dependency between the newly created DTC service and the SQL server cluster name and disk to make sure it is moved with it.
    clip_image028[1]
    clip_image036

    The dependency report for one of the SQL server clusters should look something like the below diagram.

    clip_image002[4]

     

    Setup the Preferred owners for both the SQL instances and associated DTC services

    Now you will need to make sure that the preferred owner is one of the nodes for each couple of the SQL instances and the DTC instances.

    -          Services that has UK-LIT-DB-01 as the preferred owner

    clip_image039

    clip_image040

    -          Services that has UK-LIT-DB-02 as the preferred owner

    clip_image041

    clip_image042

    This makes the two nodes working together as an Active/Active SQL cluster with the appropriate services running on both. So if you open the first node you will find a SQL server clustered instance running and a clustered DTC running. On the second node you will find the other clustered SQL server instance running and the associated clustered DTC.

    Happy clustering clip_image043

     

  • Creating an Active/Active SQL Cluster using Hyper-V: Part2 the Clustered Instances

    In part 1 of this series I showed you how to configure the virtual storage required for the cluster. In this part I will show you how to create the SQL cluster as an Active/Passive cluster and in the next part I will show how to convert it to an Active/Active cluster.

    Introduction

    In this series of posts I will walk you through the processes of creating an Active/Active SQL server cluster using Hyper-V and Microsoft iSCSI target software for virtualized SAN. The target is to create first a storage server hosted on a normal Windows 2008 R2 server. Then connect to this server using two other machines as iSCSI initiators. Then I will create the windows cluster along with the DTC clustered service. A clustered SQL server instance will then be created. Finally another clustered SQL server instance will be created and Active/Active configuration of both instances will be applied.

    Solution Architecture

    The solution is fairly simple as per the below configuration.

    clip_image002

    Windows Cluster Configuration Steps

    Now that we have configured the storage we can start the windows failover cluster configuration.

    1-      Install the windows failover clustering feature to both nodes from the add feature wizard.
    clip_image004

    2-      Bring all shared storage online to the current node.

    3-      Open the cluster management console and click create cluster. Note that it would be preferable to disable all disks at this stage from the iSCSI target but the disk that will be used as the Quorum.
    clip_image006

    4-      In the select servers page click browse and select the two nodes
    clip_image008
    clip_image010

    5-      Perform the cluster validation using the selection to run the cluster validation wizard
    clip_image012

    6-      Select all tests
    clip_image014

    7-      Review the validation and make sure there are no validation errors
    clip_image016

    8-      Back to the create cluster wizard. Give the new cluster a name and an unused IP
    clip_image018

    9-      The cluster is created and the first disk assigned to the first LUN is treated as the Quorum disk of the cluster
    clip_image020

    10-   If you disabled all disks from the iSCSI target but the Quorum disk then you will need to add them as a new storage to the cluster once they are needed. It is advisable to add every disk you will use once you need it.

    11-   Go and enable the first disk that will be used for the first cluster DTC.
    clip_image021

    12-   In the cluster management add the new storage.
    clip_image023

    13-   Go to the Services and applications node and click Configure a new service or application and select the DTC service and then click next.
    clip_image025

    14-   You can change the resource name if you want but you have to give it an unused IP
    clip_image027

    15-   Select the disk
    clip_image029

    16-   Click finish to the confirmation screen
    clip_image031

    17-   Now the windows cluster is prepared and ready for SQL server installation with an instance of DTC.
    clip_image033

    SQL Server First Cluster Instance

    1-      Go to the iSCSI target and create or add the shared disk to be used by the SQL cluster
    clip_image034

    2-      Open the SQL server setup and click on new SQL server cluster
    clip_image036

    3-      Go through the normal setup process
    clip_image038

    4-     
    clip_image040

    5-      Enter the SQL cluster name and leave as the default instance (or name this instance if you require)
    clip_image042

    Please note that if you are using any virtualization technology other than Hyper-V and installed the guest additions, then you will need to uninstall these additions and restart the servers or the above step will fail and report that it cannot validate the above settings.

    clip_image044

    6-     
    clip_image046

    7-     
    clip_image048

    8-     
    clip_image050

    9-     
    clip_image052

    10-  
    clip_image054

    11-  
    clip_image056

    12-  
    clip_image058

    13-   This completes the installation of the first SQL cluster on the first node
    clip_image060

    14-   Logon to the second SQL node and start the SQL setup and choose to add a new node to a failover cluster
    clip_image062

    15-  
    clip_image064

    16-  
    clip_image066

    17-  
    clip_image068

    18-  
    clip_image070

    19-   Now that completes setting up the second node for this SQL cluster
    clip_image072

    SQL Server Second Cluster Instance

    Now we will go through the installation of a second clustered SQL instance to be prepared as another active instance on the passive node later.

    1-      Go to the iSCSI target and create or add another shared disk to be used by the second SQL cluster
    clip_image034[1]

    2-      Go to one of the nodes and then open the iSCSI initiator and then click again on auto configure of the volumes and devices.
    clip_image073

    3-      Now open the disk management utility and create the active partition on this disk and format it using NTFS.

    4-      Open the windows cluster management and add this disk to the cluster.
    clip_image075

    5-      Open the SQL server setup and click on new SQL server cluster
    clip_image076

    6-      Go through the normal setup process
    clip_image077

    7-     
    clip_image078

    8-      Enter the SQL cluster name and the instance name as BCInst
    clip_image080

    Please note that if you are using any virtualization technology other than Hyper-V and installed the guest additions, then you will need to uninstall these additions and restart the servers or the above step will fail and report that it cannot validate the above settings.

    clip_image081

    9-     
    clip_image083

    10-   Choose the already added disk
    clip_image085

    11-   Choose a unique IP for his cluster
    clip_image087

    12-  
    clip_image052[1]

    13-  
    clip_image088

    14-  
    clip_image089

    15-  
    clip_image091

    16-   This completes the installation of the second SQL cluster on the first node
    clip_image092

    17-   Logon to the second SQL node and start the SQL setup and choose to add a new node to a failover cluster
    clip_image093

    18-  
    clip_image064[1]

    19-   Choose the new cluster BCInst
    clip_image095

    20-  
    clip_image096

    21-  
    clip_image097

    22-   Now that completes setting up the second node for this SQL cluster
    clip_image098

     

    In the next part I will show you how to configure the two created SQL instances in an Active/Active SQL configuration.

     

  • Creating an Active/Active SQL Cluster using Hyper-V: Part1 Virtualized Storage

    Introduction

    In this series of posts I will walk you through the processes of creating an Active/Active SQL server cluster using Hyper-V and Microsoft iSCSI target software for virtualized SAN. The target is to create first a storage server hosted on a normal Windows 2008 R2 server. Then connect to this server using two other machines as iSCSI initiators. Then I will create the windows cluster along with the DTC clustered service. A clustered SQL server instance will then be created. Finally another clustered SQL server instance will be created and Active/Active configuration of both instances will be applied.

    Solution Architecture

    The solution is fairly simple as per the below configuration.

    clip_image002

    Preparation

    You need to create three virtual machines as illustrated above. One as the AD and storage server and another two as the SQL server nodes that will act as Active/Active nodes.

    These are all windows 2008 R2 servers and we have created the domain and joined all servers to this domain. You need also to setup two network cards in each machine to function as normal LAN connection and another one for the cluster heartbeat. It would be advisable also to separate the storage usage to another network if you have heavy usage. The configuration given here is all static with normal local IPs assigned on all network cards.

    Virtualized SAN Steps

    In this section we will go through the needed steps to create the virtual storage server based SAN.

    Configuring the iSCSI Target

    1-      Download the required iSCSI target software from http://www.microsoft.com/download/en/details.aspx?id=19867.

    2-      Copy the software to the storage server UK-LIT-AD in this case.

    3-      Double click the file to start the installation.

    4-      After it completes it will take you to a web page
    clip_image003

    5-      Scroll down and click as below
    clip_image004

    6-     
    clip_image005

    7-     
    clip_image006

    8-      Click install
    clip_image007

    9-     
    clip_image008

    10-   Now open server manager and you will find a new tree as below
    clip_image009

    11-  
    clip_image011

    12-   Give the new target a name (Just any name)
    clip_image012

    13-   In the initiator list just click advanced and enter all the domain names of the servers that will have access to this target. In our case this is UK-LIT-DB1 and UK-LIT-DB2.
    clip_image013
    clip_image014

    14-   If it displays a warning about the multiple initiators just accept it.
    clip_image015

    15-   Click finish. And now you have completed the creation of your iSCSI target and what remains is to add the required virtual disks to it.

    16-  
    clip_image017

    17-   Place the new VHD and give it a name.
    clip_image018

    18-   Choose the disk size
    clip_image019

    19-   Click finish and this would create the fixed size disk.

    20-   You will need to create the following disks so just follow the same approach

    Disk

    Purpose

    Quorum

    Cluster Quorum

    DTC1

    DTC cluster 1 log disk

    DTC2

    DTC cluster 2 log disk

    SQL1

    SQL cluster 1 shared disk

    SQL2

    SQL cluster 2 shared disk

    Configuring the iSCSI Initiators

    Now we will configure the two SQL nodes to be able to access these disks.

    1-      Log on to the first node UK-LIT-SQL1

    2-      Open the iSCSI initiator
    clip_image020

    3-      Change the initiator name to match the machine name
    clip_image021

    4-      In the discovery tab add a new discovery portal using the IP of the storage server.

    5-      Click on the targets tab and click refresh to show the available targets
    clip_image022

    6-      Click connect then OK.
    clip_image023

    7-      Go to the volumes and devices tab and click auto configure
    clip_image024

    8-      Do the same steps on UK-LIT-SQL2 starting at step 1 above but change the initiator name to match the machine name as below
    clip_image026

    9-      Go to any node of the two and open the server manager and then the disk management.

    10-   Bring all disks online to this node and then prepare them with primary partitions and format those using NTFS.

    In the next parts I will show you how to configure the Active/Active SQL cluster.

  • System Center 2012 Orchestrator – Link Conditions

    Here is the part 4 of System Center 2012 Orchestrator Runbook concept series.

    In this blog post we’ll start to cover designing basic and complex runbooks.

    Previous parts:

    Part1 - System Center Orchestrator 2012 – Test & Start RunBooks

    Part2 - System Center 2012 Orchestrator–RunBook Activities

    Part3 - System Center 2012 Orchestrator–RunBook Basics

    Orchestrator lets you to configure conditions with Smart Links. Smart Links connect individual activities in a runbook and support precedence between two activities.

    Also as soon as previous activity finishes, these links invoke next activity. Best part is you can set link conditions to determine the direction of workflow.

    For example you can monitor a folder and trigger next activity for each changed and deleted files within that folder. At this situation, you can split in two your workflow to configure separated activities for changed and deleted triggers. For example;

    If monitor file activity notices a change event, then smart link will redirect entire workflow through upside activities.

    If monitor file activity notices a delete event, then smart link will redirect flow through downside activities.

    Look at the simple design;

    image

    For such a scenario, here are the basic configuration steps;

    Monitor File activity monitors C:\Test folder for

    image

    Changed and Deleted items.

    image

    If you click first link;

    image

    you’ll notice that link will invoke next activity (Append Line) if Monitor File activity returns Success value. Please note that this is the default value for each Smart Link.

    Include tab specifies conditions that enable data to flow to the next activity.

    image

    Exclude tab specifies the conditions that cause data to be excluded from the next activity. By default if an activity fails, link will not invoke next activity.

    image

    Also on Options tab you can configure link width and color. This is important for especially complex runbooks to highlight failover scenarios.

    Trigger Delay sets the number of seconds that you want the smart link to wait before invoking the next step in the runbook.

    image

    In this runbook example, Append Line activity is not a mandatory, you can carry changed and deleted values from monitor activity to the links directly. But i just used it to show up triggered events.

    It appends a line to the C:\Status.txt file with a value of Change Type from Monitor File activity.

    Publishing data is also covered in my following article:

    http://blogs.technet.com/b/meamcs/archive/2012/03/09/system-center-2012-orchestrator-runbook-activities.aspx

    image

    Now here is the magic starts. Click to Smart link to set a custom condition.

    I want to set a condition as Status.txt from Append Line activity has a line of “Changed”. This provides that link will invoke next activity (Send Event Log Message) if specified condition is true.

    image

    Same condition for other smart link. This provides that link will invoke next activity (Send Email) if specified condition is true.

     

    image

    So if I change any file within C:\Test folder, smart link condition will redirect flow through the upper link and send an event log.

    image

    Let’s test with RunBook Tester.

    Monitor file checks for changed and deleted files in C:\Test

    image

    I changed a file within C:\Test folder and saved it.

    image

    Orchestrator triggers the change and hops to the next activity.

    image

    Append Line activity appends “Changed” string to the status.txt file.

    image

    Now only matched link condition will continue on its way.

    As you see below, Send Event Log Message is invoked by the upper smart link.

    image

    image

    Here is the log file created by Orchestrator.

    image

    Because filtering in smart links is based on published datas from previous activities, you can also use smart link conditions with PowerShell based runbooks.

    Here is an another example. It simply reads a text file to get required links. Then it checks for links with Select-String cmdlet and directs flow to the related side. Rest of workflow is about copying files to the remote servers and deleting source downloaded files.

    image

    Read Line activity just reads two lines.

    image

    Links.txt file includes two different URL to download filea or fileb from Internet.

    image

    To find out which link (FileA or FileB) is provided within txt file, I wrote a little custom PowerShell script.

    It scans text file and search for DownloadfileA or DownloadFileB strings. If there is a line that includes one of those strings, (not null), StatusA or StatusB variables get filea or fileb values.

    image

    To pass these variable values to the next activity and links, simply configure them as Published Data.

    image

    Now I can tell to my smart links that to filter only for StatusA and StatusB static values.

    image

    image

    Finally, if there is a URL in Links.txt file that has a string “downloadfilea”, smart link will redirect flow through upper activities. For links that includes downloadfilea string will flow through below activities.

    Before finishing blog post, final important activity is Junction. It allows you to wait for multiple branches in a runbook to complete before continuing past the junction.

    image

    Junction activity can also publish data again from any branch so that downstream activities past the Junction activity can consume the data. Data from different branches than the one you selected will not be available

    Anıl ERDURAN