Server Service

The Server Service runs on a central server that all mobile clients can connect to. It uses a single TCP connection (with no authentication enabled). The Server Service looks after all central file staging and synchronisation logic. Typically there will only be one installation of the Server Service.

Installation

The Server Service is installed as a Windows service by a standard Windows Installer package. The Server Service will need access to an SQL database. In addition to the installation, the following steps are also required :

  1. .NET 4.5
  2. Service Configuration (an XML file in the Pitram global "machine folder".)
  3. Connection to an SQL Database with FILESTREAM support enabled.
  4. This is NOT enabled by default, so the installer will need to go through the numbered steps as outlined below.

  5. Creation of the File Distribution Database and tables
  6. The host of a WCF TCP port (default 830)

WCF Activation

The server machine must have TCP Activation enabled.

This is enabled via the "Turn Windows features on and off" dialog as shown below:

The above is on a machine with .NET 4.6. This may be labelled differently on another machine.

SQL Server Configuration

The File distribution server uses SQL Server FILESTREAM support to manage the staging of synchronised files.

This requires SQL server 2008 or greater.

There are two places where FILESTREAM support must be enabled:

  1. SQL Server Database Services
  2. SQL Server Instance

1. SQL Server Database Services

    • Firstly, ensure that FILESTREAM is enabled at the Windows Service level.
    • This is an SQL Server Windows service (MSSQLPATH>\MSSQL\Binn\sqlservr.exe.)
    • Enable using the SQL Configuration Manager.

    This step can be performed during the SQL Server 2008 setup process, or any time after SQL Server 2008 is installed using the SQL Server Configuration Manager (click the Start menu and choose All Programs > Microsoft SQL Server 2008 > Configuration Tools > SQL Server Configuration Manager).

    Alternatively, in SQL Management Studio, select View | Registered Servers and right click on the server group:

    And then ...

    FILESTREAM access levels can be set on the FILESTREAM tab of the SQL Server (MSSQLSERVER) Properties dialog:

2. SQL Server Instance

A FILESTREAM access level must also be set on the Advanced tab of the Server Properties dialog in SQL Server Management Studio (SSMS):

  1. Click the Start menu and choose:
  2. All Apps > Microsoft SQL Server 2008 > SQL ServerManagementStudio).

  3. Right-click on the Server name and select Properties.
  4. The Advanced page of the Properties dialog box has a FILESTREAM group, from which a FILESTREAM access level can be chosen:

    SQL Server may need to be restarted (right-click on the Server Name and select Restart from the right click menu).

    Security settings which are typically set by a Windows system administrator on the one hand, and a Database administrator on the other, need to match. The same access level that is set for the Windows Service must also be set for the SQL Server instance.

    Extra information about the different SQL services can be found here.

File Distribution Database and Tables

Once FILESTREAM support has been enabled and before the installation is run, a script must be run to create the Pitram File Distribution database. The script: DeployFileDistributionDatabase.sql is supplied with the installer and the @databasepath variable in it should be set to the folder for the database files. (The installation will verify it can connect to the database).

Server Configuration

The installation creates and configures the following file:

  • File: PFDSConfiguration.xml
  • Location <appdata>Micromine\PITRAM\Configuration\Machine
Field Name Example Value Description
DatabaseName PitramFileDistribution Name of the SQL database
DatabaseServer localhost Server address for the database. Most of this can be left as default, except perhaps the database UserId and Password. 
UserId PitramFileDistribution SQL login for the database
Password pfds SQL login password
IntegratedSecuity false Whether of not to use integrated security for the SQL login
ConfigConnectionStringName   Not currently used
MobileUploadPeriodSeconds 300 Setting use by the client connectors - how often to check for uploads
Port 830 WCF/TCP port to use to connect to the server
TraceLevel Warning Tracing level
Culture en-AU Culture to use for strings

The port is for the server TCP connection.

File Distribution Service