Omnis Technical Note TNEX0011 Jan 2021

Creating a service for ODB on Windows

For Omnis Studio 8/10.x
By Omnis Engineering.

When you install the Omnis Data Bridge, you get the opportunity to install as a Windows service.

If you missed this opportunity then don't worry, you can still install the service manually! Here's what to do:

Edit the odbservice.ini file

You can find this file in the ODB's writable files folder. For ODB v1.76 this is in:
C:\Users\Administrator\AppData\Roaming\OmnisDataBridge1.76

You can edit this file to configure various attributes for the service, e.g.

[Service]
Name=ODBridge176
DisplayName=Omnis Data Bridge 1.76
Description=Provides a TCP/IP bridge to Omnis Data Files

Open the Command Prompt

Run the Command prompt as Administrator. To do this, press the Windows key then type "cmd"
Right-click on Command Prompt and select "Run as administrator":

Navigate to the folder where the ODB was installed and note the various command options supported by the odbridge executable:

To install the service use the command:

odbridge.exe install

Note that odbdridge.exe install and odbridge.exe remove work on the Name specified in the odbservice.ini file. To operate on a different service, you will need to edit this file accordingly.

Assuming that the service name does not already exist, this should read the odbservice.ini file and install the service.

Start the Service

To inspect/start the service, press the Windows key again and type "services" then start the service manager.
If it is not already running, locate the service named Omnis Data Bridge 1.76, right-click and select Start.
You can also edit the properties of the service, for example changing the Startup type.

Using a Newly Created or non-Administrator Account

A newly created User account does not by default have access to the "Log on as a service" policy.
This can be altered manually using the Local Security Policy. To do this, press the Windows key and type "local".
Open Local Security Policy, double-click Local Policies then User Rights Assignment followed by Log on as a service.
In the Log on as a service Properties select Add User or Group. Add the new User name, select Check Names and OK.

Starting/Stopping the Service using the Command Line

You can also use the Service control command; sc to start, stop and to query the status of any Windows service.
For example, to query the status of the ODB service you can type the following:

sc query ODBridge176

for which the output will appear similar to:

Note that when running the ODB either on the command line or as a service, status messages will be written to the messages.txt file in the writable files folder.

 

Search Omnis Developer Resources

 

Hit enter to search

X