You are on page 1of 21

Advantech SE Technical Share Document

Date 2020 / 06 / 15
□ FAQ■ SOP Related Product
Category
□ Driver Tech Note
Abstract Use PostgreSQL DB as the source of ODBC data storage for WebAccess /SCADA
Keyword WebAccess/SCADA、PostgreSQL DB、pgAdmin、ODBC
Related OS
Revision History
Date Version Author Reviewer Description
First edit.
2020/06/15 V1.0 Alger Tan Nick Liu
(WebAccess 9.0.0、PostgreSQL 10.6)

 Problem Description & Architecture:


The FAQ describes how user can change WebAccess/SCADA ODBC data storage from default MS Access to
PostgreSQL DB.

Page 1
 Brief Solution - Step by Step:

It depends on the PostgreSQL DB that user computer chooses to install and use

A. Use WebAccess/SCADA default PostgreSQL


(Make sure no other PostgreSQL version exists in Windows during WebAccess/SCADA
installation)
(Make sure to select WISE-PaaS Dashboard or SaaS Composer function)

B. Download and install PostgreSQL by User


(won’t be able to use WISE-PaaS Dashboard and SaaS Composer functions)

Page 2
A. Use WebAccess/SCADA default PostgreSQL

1. Please confirm following lists before installing WebAccess/SCADA

※ Make sure no other PostgreSQL versions in Windows before installing WebAccess/SCADA. Please
uninstall all PostgreSQL if any exist.

※ Please select WISE-PaaS Dashboard or SaaS Composer function before installing WebAccess/SCADA.

Page 3
2. Install PostgreSQL ODBC driver (must use same version of x86 PostgreSQL)
Download Path:https://www.postgresql.org/ftp/odbc/versions/msi/

※WebAccess default PostgreSQL version is 10.6 so please download psqlodbc_10_03_0000-x86.zip

select 32-bit version (x86)

Page 4
※ Unzip and Install psqlodbc_10_03_0000-x86.zip, just simple click Next button

Page 5
3. Install pgAdmin ( for PostgreSQL client software)
Download Path:https://www.pgadmin.org/download/

※ Please download latest pgAdmin Windows based version.

※ Install pgadmin4-4.20-x86.exe version, just simple click “Next” button with default installation

Page 6
4. Use pgAdmin to connect PostgreSQL Server

※ When first time executing pgAdmin, password authentication dialog box will pop up. Please use
Reset Master Password to set the new password.

※ Create a connection to PostgreSQL Server

Page 7
※ The default connection information of PostgreSQL installed by WebAccess is as follows:

 General:
 Name:Server Name (User Defined)
 Connection:
 Host name / address:connecting IP address (127.0.0.1 or actual IP Address)
 Port:5436 (WebAccess default, can’t modify)
 Maintenance database:postgres (WebAccess default, can’t modify)
 Username:postgres (WebAccess default, can’t modify)
 Password:Postgre@sql1 (WebAccess default, can’t modify)

5. Use pgAdmin to create a server (for example named “Demo”) in PostgreSQL server

※ Log in to the Server, then enter the newly established “Demo” connection. Last, create a new
database in Databases

Page 8
※ Give a name to Database and make sure it is created. (no need to create any table because
WebAccess/SCADA will create tables automatically)

6. Use ODBC Data Sources(32-bit) to create the database connection in System DSN
(WebAccess only supports 32-bit ODBC connection)

※ Search Control Panel > select Administrative Tools > select ODBC Data Sources(32-bit)

※ Click System DSN > select Add > search and select PostgreSQL Unicode

Page 9
※ PostgreSQL default ODBC connection information:

 Data Source:set a Data Source name (User Defined)


 Description:System description (User Defined)
 Database:Database name in PostgreSQL (same as step 5)
 SSL Mode:select a connection mode (use default prefer)
 Server:server location / IP address (127.0.0.1 or actual IP address)
 Port:5436 (WebAccess default, don’t modify)
 User Name:postgres (WebAccess default, don’t modify)
 Password:Postgre@sql1 (WebAccess default, don’t modify)

※ Set up the PostgreSQL information in the ODBC connection information:

Page 10
7. Use IE Browser to run WebAccess Project Home, and setup ODBC Log Data Source

※ Login WebAccess Project Home > expand menu on left-top > expand Setting > click ODBCLog
Data Source

※ PostgreSQL default ODBC Log Data Source Connection Information:

 Data Source ID:ODBC Data Source Identification ID (unique numeric, user defined)
 Data Source Name (DSN):ODBC System Data Source Name (same as step 6)
 Data Source Login Name:postgres (WebAccess default, don’t modify)
 Data Source Password:Postgre@sql1 (WebAccess default, don’t modify)
 Retype Data Source Password:Postgre@sql1 (WebAccess default, don’t modify)
 Description:System Description (optional) (User Defined)

Page 11
※ Finish setup ODBC Log Data Connection in WebAccess:

※ Test connection by clicking Connection Test:

Page 12
B. Download and install PostgreSQL by User

1. Install PostgreSQL ODBC driver (must use same version of x86 PostgreSQL version)
Download Path:https://www.postgresql.org/ftp/odbc/versions/msi/

Select 32-bit (x86)

Page 13
※ Install x86.zip version, click Next and use default configuration to install psqlODBC

Page 14
2. Install pgAdmin (client software for PostgreSQL)
Download path:https://www.pgadmin.org/download/

※ Download latest version of pgAdmin Windows version

※ Install pgadmin4-4.20-x86.exe version, and click Next to continue installation

Page 15
3. Use pgAdmin to create a connection to PostgreSQL Server

※ When first time executing pgAdmin, password authentication dialog box will pop up. Please use
Reset Master Password to set the new password.

※ Creating a connection to PostgreSQL Server

Page 16
※ PostgreSQL default connection information:

 General:
 Name:Server Name (User defined)
 Connection:
 Host name / address:connecting IP address (127.0.0.1 or actual IP address)
 Port:5436 (able to modify)
 Maintenance database:postgres (able to modify)
 Username:postgres (able to modify)
 Password:Postgre@sql1 (able to modify)

4. Use pgAdmin to create a database in PostgreSQL server

※ Login Demo server and create a new database in Databases

Page 17
※ Create a database (no need to create any table, tables will be created by WebAccess automatically )

5. Use ODBC Data Sources(32-bit) to create the database connection in System DSN
(WebAccess only supports 32-bit ODBC connection)
※ Search Control Panel > select Administrative Tools > select ODBC Data Sources(32-bit)

※ Click System DSN > select Add > search and select PostgreSQL Unicode

Page 18
※ PostgreSQL default ODBC connection information:

 Data Source:set a Data Source name (User Defined)


 Description:System description (User Defined)
 Database:Database name in PostgreSQL (same as step 5)
 SSL Mode:select a connection mode (use default prefer)
 Server:server location / IP address (127.0.0.1 or actual IP address)
 Port:5436 (WebAccess default, don’t modify)
 User Name:postgres (WebAccess default, don’t modify)
 Password:Postgre@sql1 (WebAccess default, don’t modify)

※ Set up the PostgreSQL information in the ODBC connection information:

Page 19
6. Use IE Browser to run WebAccess Project Home, and setup ODBC Log Data Source

※ Login WebAccess Project Home > expand menu on left-top > expand Setting > click ODBCLog
Data Source

※ PostgreSQL default ODBC Log Data Source Connection Information:

 Data Source ID:ODBC Data Source Identification ID (unique numeric, user defined)
 Data Source Name (DSN):ODBC System Data Source Name (same as step 6)
 Data Source Login Name:postgres (WebAccess default, don’t modify)
 Data Source Password:Postgre@sql1 (WebAccess default, don’t modify)
 Retype Data Source Password:Postgre@sql1 (WebAccess default, don’t modify)
 Description:System Description (optional) (User Defined)

Page 20
※ Finish setup ODBC Log Data Connection in WebAccess:

※ Test connection by clicking Connection Test:

 Pin Definition (in case of serial connection):

 Reference:

Page 21

You might also like