Windows
Important
Knowledge of Windows Services is required to complete this section.
The ServiceOptimizer service allows complete startup of a ServiceOptimizer instance as a WINDOWS® service. The service installation / start / stop is provided by the SPService.exe
executable supplied in the %SPHOME%/bin
directory.
SPService.exe
Installation
The ServiceOptimizer service is installed by default as part of the installation of the product.
Thus it is possible to start, and stop the ServiceOptimizer instance using the usual service control manager and net start
/ net stop
instructions.
It is recommended that a clean instance startup, directly using spsysmon,
is achieved prior to starting using the service.
Default installation gives a set up for manual running of the ServiceOptimizer service, running as the system account, and allowing the service to interact with the desktop. Se later sections for setting up to run automatically on boot and as named services etc.
Setting up a Default Environment
The default installation names the service servicepower
and uses the ServiceOptimizer environment for the system account. This starts / stops a single instance of ServiceOptimizer. The default installation also allows interaction with the desktop (when a user is logged in).
All ServiceOptimizer processes require the database connection details to be supplied on the command line, in one of the following forms:
[
[ <dbUser>/<dbPassword>[@<dbHost>] ] |
[ORACLE:<dbHost>:<dbUser>:<dbPassword> ] |
[MSSQL:<dbServer>[\<dbInstance>]:<dbName>:[<dbUser>]:[<dbPassword>]]
]
- The first and second variants are Oracle only; the third is MS SQL Server only.
- If there is no password configured in the SP database then the
dbPassword
is also used to authenticate the database password supplied by an SP client (such as ServiceManager or ServiceGANTT). - Default Oracle
dbHost
is environment specific (specified for example byLOCAL
orTWO_TASK
environment variables). - The MS SQL Server
dbInstance
is only required if you are connecting to a named instance. - If MS SQL Server
dbUser
is not specified, the connection to MS SQL Server will be made as the trusted user (i.e. the operating system user).dbPassword
is then not used to authenticate the ServiceScheduling connection to the database.
The LOCAL
parameter (which is only used by Oracle) should be set to the Oracle TNS name. For a non-distributed server (Distributed System) the LOCAL
parameter should be deleted if the database is local to this server. For SQL Server this parameter is not used and it is recommended to set it to a blank string, or it can be removed.
Changing Default Settings
No Interaction with Desktop | This can be setup by using StartUp|ControlPanel|Administrative Tools|Services|servicepower|startup , and un-selecting the interaction with desktop check box. It is recommended that this is only done once the ServiceOptimizer system has been fully configured. | ||||||
---|---|---|---|---|---|---|---|
Startup / Shutdown Time | The following 2 registry settings (
If the system takes longer than these settings to startup / shutdown, the service control manager will log an event to the application event log indicating that the startup / shutdown failed. | ||||||
Running as a different user account | This can be done by simply selecting servicepower in StartUp|ControlPanel|AdministrativeTools|Services , selecting the startup button, and configuring the service accordingly. In the case of running as a user other than system account, all the environment settings must be declared as detailed above. Any user must have the appropriate permissions to access the database. | ||||||
Multiple ServiceOptimizer instances | This must be done by using named services as described in SPService.exe. Each named service must run under a separate user account (see above) and with its own database user. For example: | ||||||
Autostart on Boot | The instance can be set up to autostart on boot, by setting the service to start automatically. It may be necessary to create service dependencies on, for example, the database instance and net logon to ensure that ServiceOptimizer starts up after the database instance. Note that for certain versions of Oracle, the service dependencies won’t work.
|
Tips for Clean Service Starts
- Make sure that you have changed the
DATABASE
andLOCAL
setting (LOCAL
will be ignored if using SQL Server). - Ensure connectivity to all required resources for the user ServiceOptimizer is running as. Specifically ensure any mapped drives are available.
- Ensure the start dependencies are correct if start on boot is set.
- Ensure that the startup / shutdown times are set correctly (see section above).
- It may be necessary to reboot the machine for changes to the registry to take effect.
Cannot access tnsnames.ora
The tnsnames.ora
file for oracle, is sometimes located on a network drive. The service can fail if no user with sufficient permissions is logged on e.g. at system boot time. This can also affect System Monitor’s archiving function – see Application Logfiles.
The solution is to move the tnsnames.ora
file (with tnsnav.ora
and sqlnet.ora
) to a folder on a local drive. The registry entry or entries for the Oracle environment variable TNS_ADMIN
must then be changed to point to that folder
.
Starting / Stopping the ServiceOptimizer instances
There are 3 ways to achieve this:
1) Use ControlPanel|Administrative Tools|Services
to start ServiceOptimizer
2) Use the net start
/ net stop
command e.g. net start servicepower
(or net start servicemanager<name>
if you have named the servicepower service)
3) Use the WINDOWS ServerManager to start / stop servicepower remotely