A PTV xServer is delivered with a simple database (Apache Derby) to store points of interest (POI), traffic information, and jobs.
Other databases can be used as well, as long as there is a jdbc driver in the top level folder jdbc
.
The JDBC driver for Microsoft SQL Server is, for example, named mssql-jdbc-*.jre8.jar. To use this database put the driver into the jdbc
folder, adjust the job-management-db.xml file in the conf
folder as follows:
<property name="dataSourceProperties"> <props> <prop key="url">jdbc:sqlserver://<hostname>:<port>;databaseName=<database name></prop> <prop key="user"><user name></prop> <prop key="password"><password></prop> </props> </property>
Depending on the database it is also necessary to adapt the property connectionTestQuery in the files job-management-db.xml and datasource-template.xml.
The base configuration file is called <configuration>-geodatasource.xml
. In the file default-geodatasource.xml
, there is an XML element Datasource with attributes driver
, url
, user
, and password
. These attributes have to be configured, examples are provided below:
<Datasource driver="org.apache.derby.jdbc.ClientDriver" url="jdbc:derby://localhost:50036/poi" user="POI" password="POI" />
<Datasource driver="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin://<ORACLE_HOST>:1521/<DATABASE_NAME>" user="USER" password="PASSWORD" />
<Datasource driver="net.sourceforge.jtds.jdbc.Driver" url="jdbc:jtds:sqlserver://<MS_SQL_HOST>:1433/<DATABASE_NAME>" user="USER" password="PASSWORD" />
Hint: If there is no verifiable server certificate you should add the parameter trustServerCertificate=true
to the JDBC URL.
Copyright © 2024 PTV Logistics GmbH All rights reserved. | Imprint