Page 1 of 1

[User Manual] Introduce Database

Posted: Mon Nov 21, 2022 4:52 pm
by OpcUa Support
The Database is used for storaging historical, Alarm & Event data into
database for other application use.
database01.png
database01.png (26.81 KiB) Viewed 3061 times
We support My SQL 5.x, My SQL 8.x and Microsoft SQL Server 2016,2017,2019 & Azure SQL Database. First step is to prepare the database, and then input Hostname, Port, User name and Password for accessing the database. In Log Config, input the Dafault Schema and Default Table. these files
are dependant on your design in database. For the Log Policy, we offer "Data Update" and "Sampling Rate."
database02.png
database02.png (35.04 KiB) Viewed 3061 times

Example 1: Set a historical configuration and save to MySQL Database.
database03.png
database03.png (50.6 KiB) Viewed 3061 times

Step 1: MySQL version: 5.7.39 (choose Database as "MySQL 5.x").
database04.png
database04.png (15.47 KiB) Viewed 3061 times
database05.png
database05.png (35.32 KiB) Viewed 3061 times

Step 2: Set login information (Hostname, Username, Port, Password and confirm it) then click button “Test Connection.”
database06.png
database06.png (35.7 KiB) Viewed 3061 times
database07.png
database07.png (2.7 KiB) Viewed 3061 times

Step 3: Click button “Init. Database” and check the initialization completed message. A new schema “opcua_db” and a new table “historical”are shown in the db server.
database08.png
database08.png (36.23 KiB) Viewed 3061 times
database09.png
database09.png (37.68 KiB) Viewed 3061 times

Step 4: Click “Apply" and restart the OpcUa server.
database10.png
database10.png (37.97 KiB) Viewed 3061 times
database11.png
database11.png (3.36 KiB) Viewed 3061 times
Step 5: The changed information are recorded in the table.
database12.png
database12.png (120.5 KiB) Viewed 3061 times
database13.png
database13.png (159.25 KiB) Viewed 3061 times

Example 2: Set up an Azure SQL Database.
Step 1: Create a Resource Group.
database14.png
database14.png (45.51 KiB) Viewed 3061 times

Step 2: Press "Create resources"
database15.png
database15.png (69.42 KiB) Viewed 3061 times

Step 3: Select "Azure SQL"
database16.png
database16.png (69.36 KiB) Viewed 3061 times

Step 4: Create a Single database.
database17.png
database17.png (57.91 KiB) Viewed 3061 times

Step 5: Create a server if there is no one.
database18.png
database18.png (61.94 KiB) Viewed 3061 times

Step 6: Define the server name, user name (admin login), and password.
database19.png
database19.png (67.1 KiB) Viewed 3061 times

Step 7: Choose "Public endpoint" in the Networking tab. Then "Review + create" to create this database.
database20.png
database20.png (93.44 KiB) Viewed 3061 times

Step 8: Check the database in your resource group and click it.
database21.png
database21.png (98.39 KiB) Viewed 3061 times

Step 9: Set the firewall
database22.png
database22.png (62.83 KiB) Viewed 3061 times

Step 10: Add a firewall rule, enter the IP of OpcUa server to allow it to connect to Azure SQL. Then press the "Save" button.
database23.png
database23.png (38.41 KiB) Viewed 3061 times
database24.png
database24.png (29.93 KiB) Viewed 3061 times

Step 11: Refer to "Connection strings", check the information and type them to Database configuration of OpcUa Server.
database25.png
database25.png (48.54 KiB) Viewed 3061 times