The connection between a controller and an SQL database is established via the SQL Gateway and therefore consists of the following two parts:
Connection between the controller and the SQL Gateway.
Connection between the SQL Gateway and the SQL database.
Steps that are required for establishing a connection between the controller and the SQL Gateway are described in the chapter How to Configure a Connection Between the Controller and the SQL Gateway.
Steps that are specific to connections to the different SQL database types are described in detail in specific chapters for:
To establish an SQL connection between a controller and an SQL database, proceed as follows:
Step |
Action |
Remark |
---|---|---|
1 |
Set up the PC on which you intend to install the SQL Gateway. |
Configure the firewall in order to allow SQL data traffic on the TCP/IP ports
|
2 |
Set up your SQL database. |
Make sure that your database is created with an SQL client supported by the SQL Gateway. For more information, see the list of compatible SQL clients in the chapters How to Configure a Connection to a <name> Database. |
3 |
Install the SQL Gateway by double-clicking the Setup.exe file from the SQL Gateway installation and following the instructions on screen. |
– |
4 |
Configure the SQL connection to the SQL database in the . |
Refer to the detailed description for configuring a secured connection (chapter How to Configure Secured Connections) and to the chapters How to Configure a Connection to a <name> Database of this step for the different SQL database types. |
5 |
Configure the connection between the controller and the SQL Gateway. |
Refer to the chapter How to Configure a Connection Between the Controller and the SQL Gateway. |
6 |
In EcoStruxure Machine Expert, create an application for SQL data transfer using the SqlRemoteAccess library. |
Refer to the programming examples in the SqlRemoteAccess Library Guide. |
7 |
Download the EcoStruxure Machine Expert application for SQL data transfer to the controller. |
Refer to the Downloading an Application chapter of the EcoStruxure Machine Expert Programming Guide. |
8 |
Start the EcoStruxure Machine Expert application for SQL data transfer in the controller. Result: The SQL connection between the controller and the SQL database is established via the SQL Gateway if the individual components have been configured correctly. If the connection is not established, verify the configuration and refer to the chapter Troubleshooting. |
Refer to the Running Applications chapter of the EcoStruxure Machine Expert Programming Guide. |