ST_ExtendedConnectionSettings

Overview

Type:

Structure

Available as of:

V2.0.0.0

Inherits from:

Description

The structure ST_ExtendedConnectionSettings contains the information for connecting to an SQL Gateway and information on the SQL database.

Structure Elements

Name

Data type

Description

xUseTls

BOOL

Set to TRUE to specify the use of a secured connection using TLS.

Default value: TRUE

wsDbConnectionName

WSTRING[40]

The value of this element must match the connection name configured in the SQL Gateway. Refer to the SQL Gateway User Guide.

wsGwIpAddress

WSTRING[GPL.Gc_uiIpStringSize]

The IP address of the SQL Gateway. This is the IP address of the server on which the gateway is running.

wGwPort

WORD

The port number of the SQL Gateway.

Default value: 3458 (secured)

timSqlTimeout

TIME

The timeout value that is applied to the SQL requests.

Default value: 60 s

timSqlConnectionTimeout

TIME

The timeout value that is applied to establish the permanent connection.

Default value: 10 s

stTlsSettings

ST_TlsSettings

Structure to specify the TLS (Transport Layer Security) configuration.

Considerations for a Secured TCP Connection Using TLS

If xUseTls = TRUE, TLS (Transport Layer Security) is used to encrypt the communication between the client (function block FB_SqlDbRequest) and the server (SQL Gateway tool). In addition to the encryption, TLS is verifying the identity of the communication partner (controller and SQL Gateway) with certificates.

Certificates are exchanged during the establishing of a connection, the TLS handshake. Sending certificates during TLS handshake is mandatory.

Only if the result of the certificate verification is positive can a connection with the communication partner be established.

NOTE:
  • A certificate from the SQL Gateway is required.

  • The SQL Gateway (server) is configured to verify the client certificate (SQL Gateway settings).

  • The SQL Gateway certificate must be classified as trusted. To do so, it is required to manage the certificates on your controller manually. This can be done using the Security Screen editor in EcoStruxure Machine Expert Logic Builder.

  • The default controller certificate must be available on the controller and the validity date must not be expired.

For detailed information regarding certificate management on the controller, refer to How To Manage Certificates on the Controller, User Guide.

For detailed information regarding the SQL Gateway, refer to the SQL Gateway User Guide.

Used By

  • FB_SqlDbRequest