In order to run more than one dbWatch Server on a machine there are two things you need to do. Make them listen to different ports, and use seperate paths for their files.

Before making any changes to the files, make sure the the dbWatch Server is stopped.

Change paths

If you are running two (or more) Servers, all of different versions, you can skip this step, as they will have different paths by default.

The dbWatch Server reads a file called server.conf on startup. This file defines (among other things) where the Server keeps its configuration files, log files and data files. You will find this file in the root catalog of the dbWatch Server installation.

If you open it in a text editor it will look like this:


loglevel 1
loadproperties version.properties

export dbwatch.workdir    server

// If on windows
if(${win_app_data}) export dbwatch.datadir ${win_app_data}/dbWatch/$version/server
// Linux and mac
else export dbwatch.datadir server

export dbwatch.configdir  ${dbwatch.datadir}/config
export dbwatch.logdir     ${dbwatch.datadir}/log

include custom_server.conf
include ${user.home}/.dbwatch/custom_server.conf

redirect stdOut ${dbwatch.logdir}/output.log
redirect stdErr ${dbwatch.logdir}/error.log

localstore repository dbwatch no.dbwatch
localstore ${dbwatch.datadir}/generated_repository generated
localstore repository_server_bundles bundles no.dbwatch
localstore repository_external external

unify org.scala-lang:scala 2.11.8
unify com.fasterxml.jackson 2.5.2
unify org.apache.pdfbox:pdfbox 2.0.3

dependency org.scala-lang:scala-parser-combinators org.scala-lang:scala-library
dependency org.scala-lang.modules org.scala-lang:scala-library
dependency com.fasterxml.jackson.module org.scala-lang:scala-library
dependency com.fasterxml.jackson.module com.thoughtworks.paranamer
dependency io.reactivex:rxscala_2.11 org.scala-lang:scala-library
dependency com.typesafe.akka:akka-actor_2.11 org.scala-lang:scala-library
dependency no.dbwatch:common org.codehaus.groovy:groovy-all:2.4.6

run no.dbwatch:server:jar:$version/no.onedge.dbwatch.server.Server.main

The relevant statements are the ones starting with the keyword export


export dbwatch.workdir    server

// If on windows
if(${win_app_data}) export dbwatch.datadir ${win_app_data}/dbWatch/$version/server
// Linux and mac
else export dbwatch.datadir server

export dbwatch.configdir  ${dbwatch.datadir}/config
export dbwatch.logdir     ${dbwatch.datadir}/log

There are four paths defined

  • dbwatch.workdir The main working directory for dbWatch
  • dbwatch.logdir Where logfiles will be placed
  • dbwatch.configdir Where dbWatch will look for configuration files.
  • dbwatch.datadir Where dbWatch will place the data files it creates .

The win_app_data is only relevant on windows and will be found dynamically. It will usually resolve to “C:/ProgramData”.

So on windows the default setup will be:

dbwatch.datadir C:/ProgramData/dbWatch/12.2/server
dbwatch.configdir C:/ProgramData/dbWatch/12.2/server/config
dbwatch.workdir [Location of the executable]/server
dbwatch.logdir C:/ProgramData/dbWatch/12.2/server/log

To run several servers you have to change this, so each server has its own catalogs.

Change port

By default the dbWatch Server listens for connections on port 7099. To change this you have to edit the server_configuration.xml file manually. In dbWatch 12.2 it will by default be located in “ C:/ProgramData/dbWatch/12.2/server/config” (but you may have changed this in the previous step)

Open the file in a text editor and find the tags rmi-registry-port and rmi-export-ports, they will have the value 7099, change this to a new port.

SQLServer performance benchmarks / Running several Monitors in parallel →

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment