User Tools

Site Tools


h2databasetcpserver

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
h2databasetcpserver [2016/03/06 19:26] – [H2DatabaseTCPServer] pelah2databasetcpserver [2018/11/03 02:59] (current) – external edit 127.0.0.1
Line 12: Line 12:
 The readonly values displayed at the top shows the outcome of the configuration. The readonly values displayed at the top shows the outcome of the configuration.
  
-  * **TCP ConnectionString** shows the internal address to the database server, for example //jdbc:h2:tcp://10.0.1.40:9092/[data file name]//+  * **TCP ConnectionString** shows the internal address to the database server, for example //jdbc:h2:tcp:////10.0.1.40:9092/[data file name]//
   * **TCP Status** shows the status of the database server, for example //Running, remotes can connect//   * **TCP Status** shows the status of the database server, for example //Running, remotes can connect//
-  * **WEB ConnectionString** shows the address to the web console. Depending on the **WEB public** setting this value may show localhost:8082 (not public) or https://10.0.1.40:8082 (public)+  * **WEB ConnectionString** shows the address to the web console. Depending on the **WEB public** setting this value may show as http://10.0.1.40:8082 or http://127.0.1.1:8082 when not available publicly, or https://10.0.1.40:8082 public. 
-  * **WEB Status**shows the status of the web console, for example //Running, remotes can connect//+  * **WEB Status** shows the status of the web console, for example //Running, remotes can connect// or //Not running - check logs// if the server has not been started.
  
 Note, the web connection string may show https for public access but you may still not be able to access the console. This is because the home item can't know if the SSL is enabled or not. If so, access the web console using http and preferably change via preferences to use SSL (Use encrypted SSL (HTTPS) connections).  Note, the web connection string may show https for public access but you may still not be able to access the console. This is because the home item can't know if the SSL is enabled or not. If so, access the web console using http and preferably change via preferences to use SSL (Use encrypted SSL (HTTPS) connections). 
 +
 ===== Functions ===== ===== Functions =====
   * Start and Stop TCP Service is for the H2 Database server itself.   * Start and Stop TCP Service is for the H2 Database server itself.
Line 35: Line 36:
 //Note: You may have to stop and start the service(s) if you change any of the settings.// //Note: You may have to stop and start the service(s) if you change any of the settings.//
  
-===== Configure global logging to the database ===== +====== Configure global logging to the database ====== 
-Following these steps will enable global logging of all value items to the database. The database named **nhs_values** will be created with a user named **sa** and the password will be set to **SuperSecretPa$$w0rd**.+Following these steps will enable global logging of all value items to the database. 
  
-  * Go to the Settings page and enter a GlobalLogger value such as **jdbc:h2:tcp:////localhost/nhs_values;USER=sa;PASSWORD=SuperSecretPa$$w0rd** +In this example the database will be named **nhs_values** and created with a user named **sa** and the password will be set to **SuperSecretPa$$w0rd**. 
-  Create the H2DatabaseServer home item. It is located in the Ports section. Fill in the fields as explained previously + 
-  Make sure the H2DatabaseServer is enabled+  - Go to the Settings page and enter a GlobalLogger value as **jdbc:h2:tcp:////localhost/nhs_values;USER=sa;PASSWORD=SuperSecretPa$$w0rd** 
 +  Create the H2DatabaseServer home item. It is located in the Ports section. Fill in the fields as explained earlier on this page. 
 +  Make sure the H2DatabaseServer is enabled
  
 The Log view will display additional information about the logging activity. The Log view will display additional information about the logging activity.
  
 Note! Always use a hard to guess password if you intend to have the Web console public. Note! Always use a hard to guess password if you intend to have the Web console public.
 +
 +The **jdbc:h2:tcp:** part is needed to enable the database functionality.
 ===== Change user and password ===== ===== Change user and password =====
 (Un)fortunately it is not easy to change the user name and password. (Un)fortunately it is not easy to change the user name and password.
Line 56: Line 61:
    - The import will start and it can take some time before all values have been imported.    - The import will start and it can take some time before all values have been imported.
    - View and periodically refresh the Log page for progress of the import.     - View and periodically refresh the Log page for progress of the import. 
 +
 +====== View graphs ======
 +When you want to view graphs of the logged data, click the **View graph...** link for home items.
 +
 +Please note that the database server will cache the result on successive views. This means that the first view will take slightly longer but successive views will be faster. This is in any case several times faster than reading the logs from the text files.
  
 ==== See also ==== ==== See also ====
 http://www.h2database.com/html/main.html http://www.h2database.com/html/main.html
h2databasetcpserver.1457288776.txt.gz · Last modified: 2018/11/03 02:57 (external edit)