This topic describes the StreamBase services and Registry keys that are installed on Microsoft Windows machines, and how you can (optionally) customize them for your environment. Often these steps occur during the deployment phase of your StreamBase application.
Note
Beginning in Version 5.0, StreamBase supports installing multiple versions of StreamBase, and the version number is appended to StreamBase registry keys and default installation directory. If you are configuring an earlier version of StreamBase, omit the version number from registry keys and installation directories shown in this topic.
-
HKEY_LOCAL_MACHINE\SOFTWARE\StreamBase Systems\StreamBase(in release 5.0 and later).n.m -
HKEY_LOCAL_MACHINE\SOFTWARE\StreamBase Systems\StreamBase(release 3.7 and earlier)
A Windows service is an executable that can be set to run when Windows is booted. The StreamBase installer adds the following service to the registry on your Windows machine, and leaves it set for manual startup:
-
StreamBase n.m Service, to run the StreamBase Server executable,
.sbd.exe
After StreamBase installation, you can view this service in the Windows Services Control Panel. For example:
Notice in the sample above that the StreamBase Service is installed but is not started by default. To start a service, click the Start the service link. If you want the service to start when Windows is booted:
-
Select the service name
-
Right click and select Properties from the menu
Then on the dialog shown below, change the Startup type
from Manual to Automatic:
StreamBase lets you run multiple StreamBase applications
on the same Windows machine. Each application file is hosted by its own
StreamBase Server (sbd)
process. If you want to run more than one application as a Windows service, you can
create additional StreamBase services to run the applications. To
create an additional service, use the --install-service and --service-name
options on the sbd command line.
For example, at the StreamBase Command Prompt, type:
sbd --install-service --service-name "sbd2,StreamBase Service Two"
If successful, StreamBase displays a confirmation message. For example:
sbd2 installed with display name "StreamBase Service Two"
Refresh the Services Control Panel, and notice the service we just added,
, in the listing:
StreamBase Service
Two
Note
The first argument in the --service-name option is
used as a prefix in several Windows Registry keys. The second argument, the
service name, is used (as shown above) in the alphabetical display of Windows
services. We recommend that you start the name with StreamBase to make it easier to manage (start, pause, resume, or
stop) your StreamBase services in the Windows Services control
panel.
If desired, change the Properties for the service that you added, by following the
instructions in the previous
section of this topic. For example, you might change the Startup type from Manual to
Automatic:
Also Note
If you ever need to remove a StreamBase service, use the
--remove-service option on the sbd command line, using only the first argument you
gave with the --install-service option. For example:
sbd --remove-service --service-name
sbd2
Because your edits to the Windows Registry were not done by an installer, a
StreamBase uninstallation operation does not remove the registry keys
of a service that you added and then subsequently removed. Under these
circumstances, use regedit to search
for and remove any obsolete keys, such as an sbd2Startup key in HKEY_LOCAL_MACHINE\SOFTWARE\StreamBase
Systems\StreamBase.
.n.m
A required next step is to edit the Registry keys for each StreamBase service, to associate the startup of a particular StreamBase application with each service, as described in the next section. Also read the note that follows the table in Registry Keys for the StreamBase Installation.
If you decide to automatically start a StreamBase service on a Windows machine (for example, on a production machine that is hosting a deployed StreamBase application), you may need to modify configuration parameters for the StreamBase Server instance running as a service.
For Windows services that start at boot time, the way to define non-default settings
is by editing keys in the Windows Registry. To start the Registry Editor, select
Run from the Start menu. In the Run dialog, enter
regedit and click
OK.
This section explains when the StreamBase keys in the Windows Registry are used. Details about these keys are provided in subsequent sections.
The following Registry key is used only by StreamBase Server when running as a Windows service:
sbdStartup
The following keys are used by StreamBase Server instances that are either running as Windows services, or were started with an sbd command, and are running as background processes (sbd -b command-line option).
LogFile
LogLevel
LogToLogFile
CrashDump
CrashQuiet
CrashPause
You can optionally set crash dump environment variables to override the Registry key values.
However, if you are running a StreamBase Server instance
as a Windows service, this practice is not recommended in cases where a different
user-id (Local System) could be used.
The following Registry keys are used in all cases of (StreamBase Servers started as Windows services, or command-line background processes, or command-line foreground processes).
InstallDir
DataDir
Note that not all the Registry keys can be specified on a command line, or in a
configuration file. The DataDir parameter
specifies the directory where disk-based Query Tables (available only in
StreamBase Enterprise Edition) store their persistent data. The
DataDir parameter is the only one subject
to a multi-stage precedence resolution, which is:
-
If present on the sbd command line (
--datadirvalue). -
The
STREAMBASE_DATAenvironment variable's value. -
The value in the server section of the
sbd.sbconfconfiguration file. -
The
HKEY_LOCAL_MACHINE\SOFTWARE\StreamBase Systems\StreamBasevalue in the Registry..n.m\DataDir -
Finally, if not specified (assumes the Registry key value has been deleted), or the special value "+TEMP+" is used, a temporary directory is created on server startup and deleted on shutdown.
The remaining sections in this topic describe the Registry keys installed by StreamBase.
The registry keys at the following location affect the StreamBase installation as a whole.
HKEY_LOCAL_MACHINE\SOFTWARE\StreamBase System\StreamBase.n.m
If you have more than one StreamBase version installed, you will find more than one set of keys at this registry location, one for each StreamBase installation, as shown in the following image:
The keys and their default values are as follows:
| Key Name | Default Value | Description |
|---|---|---|
| CrashPause | no |
If set to yes, the StreamBase Server process pauses for five
minutes before dumping data to the log file and dump file. StreamBase
Systems recommends that you keep the default value.
On Windows, if you use the Dr. Watson program to set preferences for crash dumps, the default location for dump files is:
The dump file is a binary file and can be used for debugging in Visual
Studio. Dr. Watson has its own text-based log file that is different from
the StreamBase log files. You can use any text editor to
view the StreamBase log files. They contain
StreamBase messages ( |
| CrashDump | no | Controls whether the crash dump is written to the dump file. |
| CrashQuiet | yes |
When set to yes (the default), the
StreamBase Server process can create the crash dump without
having to launch a dialog box. The no setting
is not appropriate when you are starting the StreamBase Server
as a service.
|
| DataDir |
C:\Program Files\StreamBase
Systems\StreamBase
|
Sets the directory that will contain disk-based Query Tables. Change this
value to specify a different DataDir location
for your StreamBase applications,
|
| InstallDir | (The directory where you installed StreamBase.) | Do not change this value. |
| sbdStartup | -b |
You can use this value to pass in any valid sbd command-line parameter at startup. For
example:
The NoteIf the command-line argument contains spaces, such as in a Windows path, you must enclose it in quotes. ImportantPlease see the note that appears after this table for related information about multiple StreamBase services, if you defined any. |
sbd2Startup
|
None | This key is present when you add another service |
If you create you own Windows services, in addition to the default services
installed by StreamBase, you will find additional Registry key names
of the form <service-name>Startup in this key.
The prefix name comes from the first argument of the --service-name option on the sbd command line, as described above in Setting Up Multiple
StreamBase Applications as Services.
For example, in HKEY_LOCAL_MACHINE\SOFTWARE\StreamBase
Systems\StreamBase, notice the
.n.msbd2Startup key, which we added with an
sbd command described earlier in this
topic:
Notice in the screen above, we modified the sbd2Startup key's value, from the default of -b, to start a specific StreamBase application with a
specific server configuration file.
Assuming that you set the service's property to start automatically (in the control
panel, as
described earlier), the sbd
process will start and host this StreamBase application (Ourapp.sbapp) when the system is booted.
The registry keys at the following location affect the StreamBase Server set to run as a Windows service.
HKEY_LOCAL_MACHINE\SOFTWARE\StreamBase System\StreamBase.n.m\sbd.n.m
For example, the keys for the folder sbd.6.0 affect
the StreamBase Server set to run as a service by the StreamBase 6.0
installer.
The keys and their default values are as follows:
| Key Name | Default Value | Description |
|---|---|---|
| LogFile |
C:\Program Files\StreamBase Systems\StreamBase.n.m\logs\sbd.log
|
Sets the location of the StreamBase Server log file. Change this value if you want to designate a different directory. |
| LogLevel |
0
|
Sets the log level of messages reported by the StreamBase
Server. The log levels are:
|
| LogToLogFile | False | Boolean to indicate whether you want logging to occur for the StreamBase Server. |
If you added a second or third service as described above, you can create
a folder named the same as the first argument you gave to the --install-service option. Using the example above, you could
create a registry folder named:
HKEY_LOCAL_MACHINE\SOFTWARE\StreamBase System\StreamBase.6.1\sbd2
Create LogFile, LogLevel,
or LogToLogFile keys in this folder as required to
manage your secondary StreamBase service.
