Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel

On This Page:

Warning
titleImportant

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

Expand
titlespservice -i
OptionValue 

-i

 This (re-)installs the ServiceOptimizer service and re-creates the registry entries required. Only run this after an uninstall of the SERVICEOptimizer service you are trying to add (if it is already installed). -n <name> is optional.

-u

 This uninstalls the ServiceOptimizer service, and removes the servicepower entries in the  services section of the registry. The message “servicepower service <name> removed” is displayed on successful installation. -n <name> is optional.
-n<name>Optional name that may be used in conjunction with either of the above options. <name> is the name of the ServiceOptimizer service and is appended to the word servicepower e.g. if <name> = test then the service name would be servicepowertest.

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 startnet stop instructions.

Note

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). 

The registry entries DATABASE and LOCAL may need to be modified from the default created on install:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Servicepower<name>\Environment

 

Include Page
Database Connection
Database Connection

The LOCAL parameter (which is only used by Oracle) should be set to the Oracle TNS name.  For a non-distributed server (Admin ServiceOptimizer System Configuration 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 ( HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\servicepower<name> ) control the startup / shutdown time allowed for the ServiceOptimizer system. They are both specified in seconds, and may be modified to suit your requirements

EntryDefault value
StartUpTimeAllowed600 Seconds (0x258)
CloseDownTimeAllowed180 Seconds (0x64)

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 Windows SPService.exe. Each named service must run under a separate user account (see above) and with its own database user.

For example:     servicepowerproduction or servicepowertest

Autostart on Boot

The instance can be set up to autostart on boot, by setting the service to start automatically.

Warning

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.

 

 

Event Log

The ServiceOptimizer service logs both normal startup / shutdown events, and startups that fail to the WINDOWS Application Event log. This can be used to audit service startup and shutdown, for example.

 

Tips for Clean Service Starts

Tip
  1. Make sure that you have changed the DATABASE and LOCAL setting ( LOCAL will be ignored if using SQL Server).
  2. Ensure connectivity to all required resources for the user ServiceOptimizer is running as. Specifically ensure any mapped drives are available.
  3. Ensure the start dependencies are correct if start on boot is set.
  4. Ensure that the startup / shutdown times are set correctly (see section above).
  5. It may be necessary to reboot the machine for changes to the registry to take effect.
Note
titleCannot 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 Admin ServiceOptimizer System Configuration 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