How to connect a PLC with a database (SQL)

This is solution for direct connection between Siemens PLC ↔ SQL Server

MS SQL Functionality for Siemens Simatic S7-1200 S7-1500 in TIA Portal V13 V14 V14

PDSql Library V1.2.0 for Siemens

PDSql Library V1.2.0 User Guide