With help of auxiliary tools to work as Windows service interface proxy you can easily install and configure a service to host and run the One Identity Manager DatabaseAgent.There are some of such tools available:
The following is an example using NSSM on Command Line. Please note that NSSM also comes with a GUI when called with only one parameter, the new service name.After downloading NSSM (no installation required) and putting the nssm.exe in an administration folder, open an administrative prompt (cmd.exe) and switch to that folder.
Install and configure the basic parameters:
rem specify unique Windows service name
set SrvName=OneIMDBAgentSrv
rem specify service display name
set SrvDisplay=One Identity Manager Database Agent
rem specify service description
set SrvDesc=One Identity Manager Database Agent Service
rem specify the OneIM DatabaseAgentServiceCmd location
set PathTo_OneIMDBAgent=c:\Program Files\One Identity\One Identity Manager\DatabaseAgentServiceCmd.exe
rem specify the MSSQL connection string, which is used by the agent to connect to the OneIM database (take care of the triple quotes)
set OneIMDBAgentParameters=/conn """My MSSQL Connection String"""
rem the installation
nssm install "%SrvName%" "%PathTo_OneIMDBAgent%"
nssm set "%SrvName%" Application "%PathTo_OneIMDBAgent%"
nssm set "%SrvName%" AppParameters "%OneIMDBAgentParameters%"
nssm set "%SrvName%" DisplayName "%SrvDisplay%"
nssm set "%SrvName%" Description "%SrvDesc%"
rem in case the Connection String defines Windows Authentication on SQL server, you need to specify a Windows account as service credentials
rem nssm set "%SrvName%" ObjectName <username> <password>
rem for additional configuration refer to the NSSM command line parameters documentation
rem start the agent service right now
nssm start "%SrvName%"
Log file:Please make sure, that multiple instances of DatabaseAgentCMD.exe log into individual folders and files for better reading and analysis. Configure the logging in GlobalLog.config stored in the same directory.NLog log information will be stored by default in 'Local System' app data directory (if service uses default credentials and default GlobalLog.config settings are used):
c:\Windows\System32\config\systemprofile\AppData\Local\One Identity\One Identity Manager\DatabaseAgentServiceCmd\