How to configure the Content Manager synchronization services to handle multiple Ad Manager databases
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 (run as administrator).
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 instance name should be short, a single word or a pair of word separated with a dash, all lower case, no spaces, no punctuation, and should clearly identify which database it refers to; e.g. client1
, client2-region1
, client2-region2
.
Open a command prompt window (run as administrator).
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:
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:
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;
- rename the configuration (Configuration -> Rename) to match the name of the service instance;
- save the changes (File -> Save).
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.
Before uninstalling
When uninstalling Dot2Dot Ad Manager CM Synchronization Services, 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 the software.
Open a command prompt window (run as administrator).
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 call regsvc
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