Setting Up the FileService Server

Sql Replication Io

Setting Up the FileService Server

 

If you with to be able to perform "bulk load" operations when new tables are created, or need to be reloaded for some reason, then you will need to install the FileService server on the Windows SQL Server system.

 

FileService is a Windows service that hosts an ASP.NET Web API 2 RESTful web service. This web service can be used by the replicator process to transfer delimited text files containing the data for a table to the database server, from where they can be bulk loaded into the database very quickly.

 

Running the FileService server requires permanent access to one Synergy runtime (RUN10) license.

 

If you do not install and use FileService, then bulk upload will not be available to you and the replicator will have to load tables row by row, which takes significantly longer.

 

You can obtain the installer for the latest version of FileService from the GitHub repository. After downloading the installer, simply run it to install and start the service.

 

Default Behavior

 

By default FileService listens for messages on TCP/IP port 8080:

 

http://<server>:8080/FileService

 

and manages files in a FileService folder below the public documents folder:

 

C:\Users\Public\Documents\FileService

 

Both of these options can be changed if necessary

 

Configuring FileService

 

If you wish to change the port number or directory used, you can do so by editing the applications configuration file:

 

C:\Program Files (x86)\Synergex\FileService\FileService.exe.config

 

The file contains an AppSettings section that looks like this:

 

  <applicationSettings>

    <FileService.Properties.Settings>

      <setting name="StorageFolder" serializeAs="String">

        <value />

      </setting>

      <setting name="HttpListenerPort" serializeAs="String">

        <value>8080</value>

      </setting>

    </FileService.Properties.Settings>

  </applicationSettings>

 

As you can see, the default port number is already included and can simply be edited. But there is no default value for the StorageFolder setting. If you wish to change the folder then you must edit the file, like this:

 

  <applicationSettings>

    <FileService.Properties.Settings>

      <setting name="StorageFolder" serializeAs="String">

        <value>D:\Some\Other\Folder</value>

      </setting>

      <setting name="HttpListenerPort" serializeAs="String">

        <value>8080</value>

      </setting>

    </FileService.Properties.Settings>

  </applicationSettings>

 

If you make any changes to the file you must restart the FileService server process. You can do this in one of three ways:

 

1.Using the Services tab in Task Manager.

2.Using the Services management utility (services.msc)

3.From an administrative command line, like this:

 

net stop FileService

net start FileService

 

If you use the latter option, you should see output like this:

 

C:\> net stop fileservice

The File Service service is stopping.

The File Service service was stopped successfully.

 

C:\> net start fileservice

The File Service service is starting.

The File Service service was started successfully.

 

C:\>

 

Verifying FileService Operation

 

You can verify that FileService is operational by using it's PING operation from a web browser. For example, from a browser on the SAME SYSTEM, use the following URL:

 

http://localhost:8080/FileService/ping

 

You should see s "FileService Ping Response" message in your browser.