Difference between revisions of "How to configure the Content Manager synchronization services to handle multiple Ad Manager databases"

From Dot2DotCommunications
Jump to: navigation, search
(Automating Frequent Tasks)
(Automating frequent tasks)
Line 143: Line 143:
  
 
  @echo off
 
  @echo off
  call start-foo
+
c:
  call start-bar
+
cd "\Program Files (x86)\Dot2Dot\Ad Manager CM Sync Services"
 +
  call startsvc foo
 +
  call startsvc bar
  
 
=== Stop all services ===
 
=== Stop all services ===
Line 151: Line 153:
  
 
  @echo off
 
  @echo off
  call stop-foo
+
c:
  call stop-bar
+
cd "\Program Files (x86)\Dot2Dot\Ad Manager CM Sync Services"
 +
  call stopsvc foo
 +
  call stopsvc bar
  
 
=== Remove all services (before uninstalling) ===
 
=== Remove all services (before uninstalling) ===

Revision as of 09:37, 15 May 2015

Contents

Overview

Each instance of the Dot2Dot Ad Manager CM Publishing Service and the Dot2Dot Ad Manager CM Playback Count Service can be configured to synchronize a single Ad Manager database with one or more Content Manager instances.

If you need to handle more than one Ad Manager databases and you have a powerful server with lots of CPU and memory capacity, you can configure multiple named instances of the synchronization services, each one dedicated to synchronizing a particular Ad Manager database.

Steps

Run the synchronization services installer

Run the installer AmCmSync.msi.

Remove the default (anonymous) instances of the synchronization services

The synchronization service installer creates the default instances of the publishing service and the playback count retrieval service which would be used if you're handling a single Ad Manager database. If you're going to handle multiple Ad Manager databases, it's best to only use named instances of the services - this way it'll be easier to identify them.

Open a command prompt window.

Navigate to the Ad Manager CM Sync Services program folder; for example:

cd "\Program Files (x86)\Dot2Dot\Ad Manager CM Sync Services"

Run the following command:

unregsvc

Create one or more named instances of the synchronization services

Choose names for the service instances: one for each Ad Manager database you want to handle. The names should be short, single words, all lower case, no punctuation, except maybe a dash, no spaces, and should clearly identify which database they refer to: the name of the client and/or region the database belongs to.

Open a command prompt window.

Navigate to the Ad Manager CM Sync Services program folder; for example:

cd "\Program Files (x86)\Dot2Dot\Ad Manager CM Sync Services"

For each named instance you want to create, run the following command:

regsvc instancename

where instancename is a placeholder for the actual instance name you've chosen.

You'll be prompted to provide the user credentials (user id and password) for the service login:

Cpdm2cmsvc-setsvclogin.png

This will create instances of each service where the instance name is appended as a suffix to the service name and the service display name; the instance name is also passed as a command line argument to the service executable. You can use the Services management console to verify that the service instances were created correctly:

Cpdm2cmsvc-namedsvcs.png

Cpdm2cmsvc-namedsvcprops.png

Edit the synchronization service configurations

Run the synchronization services configuration utility (Start -> All Programs -> Dot2Dot Ad Manager CM Synchronization Services -> Configure).

For each one of your named service instances:

  • create a new configuration (Configuration -> New);
  • edit the configuration properties - Ad Manager connection, etc. - and click OK;

Cpdm2cmsvc-config-edit.png

  • rename the configuration (Configuration -> Rename) to match the name of the service instance;
  • save the changes (File -> Save).

Cpdm2cmsvc-config.png

Starting and stopping the services

You can use the Services management console to start and stop individual service instances.

You can use the services management console to configure the services to start automatically when Windows starts.

You can start and stop individual services from the command line:

net start CpDm2CmPub-foo
net start CpDm2CmPbc-foo
net start CpDm2CmPub-bar
net start CpDm2CmPbc-bar
net stop CpDm2CmPub-foo
net stop CpDm2CmPbc-foo
net stop CpDm2CmPub-bar
net stop CpDm2CmPbc-bar

You can start or stop a pair of services (publishing and playback count retrieval) from the command line using the startsvc and stopsvc utility batch files:

cd "\Program Files (x86)\Dot2Dot\Ad Manager CM Sync Services"
startsvc foo
stopsvc foo

Monitoring the service logs

You can find the log files in the log folder used by the synchronization services: Start -> All Programs -> Dot2Dot Ad Manager CM Synchronization Services -> Logs.

Each service instance writes into a separate daily log file; the instance name is included as a part of the log file name.

Cpdm2cmsvc-logs.png

Before uninstalling

When uninstalling the software, the installer will remove the anonymous service instances, if they are present, but it will not be aware of any named instances you may have created, so it cannot remove those. It is your responsibility to remove the named service instances before uninstalling Dot2Dot Ad Manager CM Synchronization Services.

Open a command prompt window.

Navigate to the Ad Manager CM Sync Services program folder; for example:

cd "\Program Files (x86)\Dot2Dot\Ad Manager CM Sync Services"

For each named instance you want to remove, run the following command:

unregsvc instancename

where instancename is a placeholder for the actual instance name you're removing.

You can use the Services management console to verify that you've removed all named service instances.

Automating frequent tasks

It may be a good idea to create batch files that automate tasks you need to perform frequently, especially if you're handling more than two Ad Manager databases on the server. Below are a few examples.

Start an individual pair of services

start-foo.bat:

@echo off
c:
cd "\Program Files (x86)\Dot2Dot\Ad Manager CM Sync Services"
call startsvc foo

Stop an individual pair of services

stop-foo.bat:

@echo off
c:
cd "\Program Files (x86)\Dot2Dot\Ad Manager CM Sync Services"
call stopsvc foo

Start all services

start.bat:

@echo off
c:
cd "\Program Files (x86)\Dot2Dot\Ad Manager CM Sync Services"
call startsvc foo
call startsvc bar

Stop all services

stop.bat:

@echo off
c:
cd "\Program Files (x86)\Dot2Dot\Ad Manager CM Sync Services"
call stopsvc foo
call stopsvc bar

Remove all services (before uninstalling)

remove.bat:

@echo off
c:
cd "\Program Files (x86)\Dot2Dot\Ad Manager CM Sync Services"
call unregsvc foo
call unregsvc bar

Create all services (after upgrading)

create.bat:

@echo off
c:
cd "\Program Files (x86)\Dot2Dot\Ad Manager CM Sync Services"
call unregsvc
call regsvc foo
call regsvc bar