Most Windows server software runs as a service when the machine boots up. You can create a Windows service to run the Database Agent by executing a script bundled with the product. 

Install the Database Agent as a Windows Service

To create the Database Agent as a Windows Service, run the following command as an administrator:

cscript <db_agent_home>\InstallService.vbs <jvm_options>
CODE

A Windows Services named "Appdynamics Database Agent" will be created.

Alternatively, you can create the database agent as a Windows Service in the silent mode where the script skips user input for installation, run the following command as an administrator:

 

cscript <db_agent_home>\InstallService.vbs SilentInstall <jvm_options>
CODE

The screenshot below shows the Windows Service Control Manager.

If you choose to use Windows authentication for Microsoft SQL Server, you must change your login credentials and restart the database agent service.

Uninstall the Database Agent as a Service

To uninstall the database agent service, run the following command as an administrator:

cscript <db_agent_home>\UninstallService.vbs
CODE


Running the Agent on Windows Using the Task Scheduler

It is recommended to run the Database Agent as a Windows service. However, if you choose to run the agent using Task Scheduler, ensure the agent runs with the highest privileges available. When using Task Scheduler, if the host is restarted, the agent will not start automatically.