MicroStrategy ONE

Merge Projects with the Project Merge Wizard

The Project Merge Wizard allows you to specify rules and settings for a project merge. For details about all settings available when running the wizard, see the Help. For information about the rules for resolving conflicts, see Resolve Conflicts when Merging Projects.

After going through the steps in the wizard, you can either execute the merge right away or save the rules and settings in a Project Merge XML file. You can use this file to run Project Merge from the Windows command prompt (see Running Project Merge from the Command Line) or to schedule a merge (see Scheduling a Project Merge).

Before you use Project Merge in a server (three-tier) environment, check the project source time out setting. In Developer, right-click on the project source and select Modify Project Source to open the Project Source Manager. On the Connection tab, either disable the Connection times out after setting by clearing its check box, or else enter a sufficient number of minutes for when the connection should time out, considering how long the merge processes may take based on the size of the projects. If you are unsure about a setting and have noticed other processes taking a long time, it is recommended you disable the time out setting.

The following scenario runs through the Project Merge Wizard several times, each time fine-tuning the rules, and the final time actually performing the merge.

To Safely Perform a Project Merge

Both the source and the destination project must be loaded for the project merge to complete. For more information on loading projects, see Setting the Status of a Project.

  1. Go to Start > All Programs > MicroStrategy Tools > Project Merge Wizard.
  2. Follow the steps in the wizard to set your options and conflict resolution rules.

    For details about all settings available when running the wizard, see the Help (press F1 from within the Project Merge Wizard). For information about the rules for resolving conflicts, see Resolve Conflicts when Merging Projects.

  3. Near the end of the wizard, when you are prompted to perform the merge or generate a log file only, select Generate log file only. Also, choose to Save Project Merge XML. At the end of the wizard, click Finish. Because you selected to generate a log file only, this serves as a trial merge.
  4. After the trial merge is finished, you can read through the log files to see what would have been copied (or not copied) if the merge had actually been performed.
  5. Based on what you learn from the log files, you may want to change some of the conflict resolution rules you set when going through the wizard. To do this, run the wizard again and, at the beginning of the wizard, choose to Load Project Merge XML that you created in the previous run. As you proceed through the wizard, you can fine-tune the settings you specified earlier. At the end of the wizard, choose to Generate the log file only (thereby performing another trial) and choose Save Project Merge XML. Repeat this step as many times as necessary until the log file indicates that objects are copied or skipped as you desire.
  6. When you are satisfied that no more rule changes are needed, run the wizard a final time. At the beginning of the wizard, load the Project Merge XML as you did before. At the end of the wizard, when prompted to perform the merge or generate a log file only, select Perform merge and generate log file.

Running Project Merge from the Command Line

A Project Merge can be launched from the Windows command line. You can also run several sessions of the Project Merge Wizard with the same source project, using the command prompt. For information on running multiple sessions, see Multiple Project Merges from the Same Project.

The settings for this routine must be saved in an XML file which can easily be created using the Project Merge Wizard. Once created, the XML file serves as the input parameter to the command.

The syntax for the projectmerge.exe command is shown below. The syntax for the command is simplified.

projectmerge -f[ ] -sp[ ] -dp[ ] -smp[ ] -dmp[ ] -sup[ ] -MD -SU -lto -h

All command line parameters are described in the table below.

Parameter

Description and use

-f[ ]

Specifies the path and file name (without spaces) of the XML file to use. (You must have already created the file using the Project Merge Wizard.) Example: -fc:\files\merge.xml

-sp[ ]

Password for SOURCE Project Source. (The login ID to be used is stored in the XML file.) Example: -sphello

-dp[ ]

Password for DESTINATION Project Source. (The login ID to be used is stored in the XML file.) Example: -dphello

-smp[ ]

Password for SOURCE metadata. (The login ID to be used is stored in the XML file.) Example: -smphello

-dmp[ ]

Password for DESTINATION metadata. (The login ID to be used is stored in the XML file.) Example: -dmphello

-sup

Suppress progress window. This is useful for running a project merge in the background, and the window displaying status of the merge does not appear.

-MD

Forces metadata update of DESTINATION metadata if it is older than the SOURCE metadata. Project Merge will not execute unless DESTINATION metadata is the same version as or more recent than SOURCE metadata.

-SU

Updates the schema of the DESTINATION project after the Project Merge is completed. This update is required when you make any changes to schema objects (facts, attributes, or hierarchies).

Do not use this switch if the Project Merge configuration XML contains an instruction to update the schema.

-lto

Take ownership of any metadata locks that exist on the source or destination projects. For more information about metadata locking, see Lock Projects.

-h

Displays help and explanations for all of the above parameters.

A sample command using this syntax is provided below. The command assumes that "hello" is the password for all the project source and database connections. The login IDs used with these passwords are stored in the XML file created by the Project Merge Wizard.

projectmerge -fc:\temp\merge.xml -sphello -dphello -smphello -dmphello -lto -MD -SU

If the XML file contains a space in the name or the path, you must enclose the name in double quotes, such as:

projectmerge -f "c:program files (x86)\xml\
merge.xml" -sphello -dphello -smphello -dmphello -MD -SU

Multiple Project Merges from the Same Project

The Project Merge Wizard can perform multiple simultaneous merges from the same project source. This can be useful when you want to propagate a change to several projects simultaneously.

During a multiple merge, the Project Merge Wizard is prevented from locking the projects. This is so that multiple sessions of the wizard can access the source projects. You will need to manually lock the source project before beginning the merge. You will also need to manually lock the destination projects at the configuration level before beginning the merge. Failing to do this may result in errors in project creation due to objects being changed in the middle of a merge. For information on locking and unlocking projects, see Lock Projects.

To do this, you must modify the Project Merge XML file, and then make a copy of it for each session that you want to run.

To Execute Multiple Simultaneous Merges from One Project

  1. In a text editor, open the Project Merge Wizard XML file.
  2. In the OMOnOffSettings section of the file, add the following node: <Option><ID>OMOnOffSettings</ID><SkipProjectMergeSourceLockingSkipProjectMergeDestConfigLocking/></Option>.
  3. Make one copy of the XML file for each session of the Project Merge Wizard you want to run.
  4. In each XML file, make the following changes:
    • Correct the name of the destination project.
    • Ensure that each file uses a different Project Merge log file name.
  5. Manually lock the source project.
  6. Manually lock the destination projects at the configuration level.
  7. For each XML file, run one instance of the Project Merge Wizard from the command line.

Scheduling a Project Merge

To schedule a delayed or recurring Project Merge, use the AT command, which is part of the Microsoft Windows operating system. For instructions on how to use the AT command, refer to the Microsoft Windows help. The sample AT command below schedules Project Merge to run at 6:00 PM (18:00) every Friday (/every:F).

at 18:00 /every:F projectmerge -fc:\temp\merge.xml -sphello -dphello -smphello -dmphello -MD -SU

For a list of the syntax options for this command, see Running Project Merge from the Command Line.

To Schedule a Project Merge Using the Windows Command Prompt

  1. From the Microsoft Windows machine where Project Merge is installed, from the Start menu, select Programs, then choose Command Prompt.
  2. Change the drive to the one on which the Project Merge utility is installed. The default installation location is the C: drive (the prompt appears as: C:\>)
  3. Type an AT command that calls the projectmerge command. For a list of the syntax options for this command, see Running Project Merge from the Command Line.