How to manage hosts in Enterprise Manager

This article explains how to use the Hosts screen of the Enterprise Manager application.

Manage Hosts

Manage Hosts

Click on the Hosts tab to display the host management screen.

Default Host

Default Host

When the Mandalay CS database is first installed a host entry is created for the computer that is hosting the instance of SQL Server. This host will be set as the publisher and be linked to the central Site.

Adding a new Host Computer

Adding a new Host Computer

Blank Record

Click on the New Record button to create a new host entry from scratch. Computers setup this way will need all their configuration details setup.

Copied Record

In some cases it may be possible to make a copy of an existing host and use that for the new one. This method will allow all the host specific settings for the existing computer to be transferred to the new computer. This method is recommended when swapping out a damaged host computer.

Once the host has been created setup the details as explained below.

Host Details

Host Details

Host Name: The name of the computer that is hosting the database.

SQL Instance: The name of the instance of SQL that is hosting the database. The default instance has no name so only the name of the computer needs to be added. By default SQLExpress instances will be HOST_NAME\SQLExpress.

DB Name: The name of the database created on the computer. The Mandalay default DB name if MT_Store.

Integrated Security: If this option is selected then the credentials that the Mandalay CS service that is hosting Enterprise Manager will be used to connect to the host SQL Server instance. It is recommended that this not be used unless security policy restrictions make it necessary.

User Name: The SQL Login name that is used to connect to the SQL host. To be able to use SQL Login, mixed mode authentication needs to be configured on the instance of SQL.

Password: Password for the SQL Login used to connect to the server. This field is encrypted in the database.

Site Offset: Each host setup in a Mandalay enterprise solution needs its own unique range of primary key ranges to ensure there are no conflicts. This value if the starting point for this computers key range and should not overlap with any other hosts. The system will validate these when saving the record to the database.

Site Limit: This is the end value for the key range. Once the keys reach this value a new key range will need to be provided. (Mandalay recommends at  least a range of 10 million)

Snapshot Location: If the replication is going to be setup as PULL mode then this will need to be a location on the host computer of where the database snapshot will be located. A directory called ReplData is recommended.

Inactive: Once a host computer records is not longer needed then check this box to de-activate it.

Once the details have been entered click on the Save Record button. Use the Cancel button to reload the data from the database, this will override all the host details.

 

Host Sites

Host Sites

Each host needs to be linked to at least on site. In this section each site is checked. If more that one site is selected that any users running Ticketing or Configuration Manager will be asked to select the site they are connected.

The multiple site option is generally configured for devices that can be shared across multiple devices, either as a back device or because opening hours allow it.

Subscriber Host Jobs

Subscriber Host Jobs

For a subscriber host there a number of server jobs that can be run. These jobs are used to manage the database on the host computer.

Finalise: This job will ensure that the database is at the most recent revision. It does not affect the database schema but will fix any meta data, stored procedures or views.

Validate Replication: This task will check if the replication currently setup for this host is valid and will try to rectify if necessary.

Drop Subscription: This job will remove the replication subscription for the host. An option is provided to Force Drop, and should only be used if the subscription is not dropped when the job runs.

Set Ticket Number: This job will allow the next ticket number to be configured for this site. When a new site is created the ticket number starts as the first number in the Site Offset key range. However it may be necessary to force the ticket number to start from another value. This is useful if a site computer is being swapped out and ticket numbering needs to stay the same on the new computer.

Create Dynamic Snapshot: This job will make the central server create a new dynamic snap shot job for this host.

Run Dynamic Snapshot: This job will run the SQL Server job created for the host.

Create Subscription: When this job is run the central server will attempt to create a new subscription on the host and initialise it to the snapshot. The subscription can either be Pull or Push, refer to this article for more details on what options should be used.

Create Subscriber Database: If the host does not yet have an MT_Store database then this option can be used to create one.

 

Adding a new subscriber to replication (using the pull method)

To create a new subscriber in the SQL Replication environment with the Pull method do the following steps once the host entry is created. The Pull method is best used for mobile devices and un reliable WAN connections, it also requires that the subscribing computer can resolve the central computer by domain name.

  1. Ensure that a versions of SQL Server is available on the subscribing computer
  2. If no database is installed on the subscribing computer then run the Create Subscriber Database first.
  3. After the database is established on the subscriber computer run the Create Dynamic Snapshot job. If there is already a valid snapshot then this may not run completely and you can move to the next steps.
  4. Now run the Run Dynamic Snapshot job and allow to complete.
  5. Go to the folder where the snapshot was created. (Refer to the job activity for the location)
  6. Zip up the folder created for this subscribing computer and copy to the computer.
  7. Unzip the contents to the folder specified in the hosts Snapshot Location property. Make sure you are copying files and folders not just one folder with the name of the computer.
  8. Once un zipped run the Create Subscription job with the initialise option on and the Pull method selected. Allow the job to complete.
  9. The computer should now be replicating and you can test by running the Administration program on the computer just setup. All the data on the central database should be visible in the administration program.

If any error occur during this process refer to this article for trouble shooting assistance.

It is important that these steps be followed as described any deviation could cause problems with the replication to this device and may not be covered by your support agreement.

Adding a new subscriber to replication (using the push method)

To create a new subscriber in the SQL Replication environment with the Push method do the following steps once the host entry is created. The Push method is best used for computers on reliable WAN and/or LAN connections, it also requires that the central computer can resolve the subscribing computer by domain name.

  1. Ensure that a versions of SQL Server is available on the subscribing computer
  2. If no database is installed on the subscribing computer then run the Create Subscriber Database first.
  3. After the database is established on the subscriber computer run the Create Dynamic Snapshot job. If there is already a valid snapshot then this may not run completely and you can move to the next steps.
  4. Now run the Create Subscription job with the initialise option on and the Push method selected. Allow the job to complete.
  5. The computer should now be replicating and you can test by running the Administration program on the computer just setup. All the data on the central database should be visible in the administration program.

If any error occur during this process refer to this article for trouble shooting assistance.

It is important that these steps be followed as described any deviation could cause problems with the replication to this device and may not be covered by your support agreement.

Job Activity

Job Activity

When a job is run an entry will be made in the Job Activity section and a log ot tasks will be displayed. Any errors will appear in this with basic details and more information can be obtained from the Mandalay CS Service log file.

If a job fails then the icon at the top left will not be a ticket but a red X indicating that the job was unsuccessful.

Host Details for Publisher Host

Host Details for Publisher Host

See the Host Details section near the beginning of this article for information on the common details.

Asset Database: No longer needed as Asset capture is no longer managed in the database.

Meta Database: Name of the database used for storing the web portals meta data.

Replication Expiry Days: The number of days a transaction will appear on a hosts computer after this time the transaction will only be available on the central database.

Asset Replication Expiry Days: No longer used.

Create Mandalay User: This ensures that the default mandalay SQL Login user is created against the database. This can then be used by PULL subscribers to connect to the database.

Snapshot Location: This is the folder where the dynamic snapshot files are created. This can be UNC path to a network folder.

Subscriber Username: This is the SQL Login user name that the subscribers should use when connecting to the publisher database. The default Mandalay user if 'lf_application'.

Subscriber Password: This is the password for the user name set for the Subscriber. The Mandalay default is 'mtech'.

Publisher: Indicates that this is the publisher host for the replication.

Publisher Host Jobs

Publisher Host Jobs

For a publisher a different set of job are available.These jobs are used to manage the database on the host computer and the publication used for replication.

Finalise: This job will ensure that the database is at the most recent revision. It does not affect the database schema but will fix any meta data, stored procedures or views.

Validate Replication: This task will check if the replication currently setup for this host is valid and will try to rectify if necessary.

Set Ticket Number: This job will allow the next ticket number to be configured for this site. When a new site is created the ticket number starts as the first number in the Site Offset key range. However it may be necessary to force the ticket number to start from another value. This is useful if a site computer is being swapped out and ticket numbering needs to stay the same on the new computer.

Run Default Snapshot: This job will make the create the default snapshot for the central server and will need to be run before any host dynamic snapshots can be created.

Create Publication: The publication for the replication will be created on the server. This needs to be done before any subscribers can be added.

Drop Publication: If the publication needs to be dropped then use this job. This is necessary in any major upgrades to the Mandalay system schema.