Documentation Center

Synchronizing the Content Manager database with Metrics storage

In order to use the Metrics feature, you must perform an initial synchronization of the Content Manager database with Metrics storage. Depending on your installation or upgrade scenario, you may need to perform the synchronization yourself, by running a script called SynchronizeMetrics.ps1.

Before you begin

To perform this task, you must have set up ISHRemote 8.1.0 or later. For more information, refer to https://github.com/RWS/ISHRemote.

About this task

You must run a synchronization script if any of the following is true:
  • You are performing a fresh installation of Tridion Docs with the Demo database.
  • You are upgrading from a release older than Tridion Docs 15.1

You do not need to run a synchronization script if you are performing a fresh installation of Tridion Docs with an empty database.

Procedure

  1. Open a PowerShell prompt.
  2. On your installation media, go to the folder Common\DatabaseIndependent\Examples\Metrics\.
  3. Use the ISHRemote New-IshSessioncommand to create a new session. For more information about this command, enter Get-Help New-IshSession -Full.
  4. Run the synchronization script by executing the following command:
    SynchronizeMetrics.ps1 -ishSession SESSION -Transcript -TranscriptFilePath FILEPATH

    where SESSION is the name of the variable (for example, $ishSession) in which you stored the return value of your New-IshSession.

    The following parameters in the command are optional:
    Transcript
    This parameter causes the script to log its activities to a separate text file. If you omit this switch, no text file is created.
    TranscriptFilePath
    Use this parameter only if you also use the Transcript parameter. TranscriptFilePath specifies a path and filename for the logfile in FILEPATH. For example, -TranscriptPath "c:\temp\mylog.txt"
    If you omit this parameter, the log file is called SynchronizeMetrics.ps1.log, and it is saved in the location from which you are executing the script.
    The script goes through the entire repository and creates background tasks to synchronize the Content Manager repository with Metrics storage.

What to do next

Note the following:
  • If you run into any trouble running the script, you can rerun the script with the -filePath parameter. Use this parameter to specify a specific node folder in your repository. This folder, including any of its subfolders, is then synchronized. For example, your command might be SynchronizeMetrics.ps1 -ishSession $ishSession -folderPath "General\MyFolder"​
  • To see a list of the folders that the script intends to synchronize, without actually creating the backgrounds to do so, add a -WhatIf parameter to your command.