SQL Database Link

Run configured queries through the Connection Service.

Approved database operation, through Connection Service, to Mapped tags in the project.Approved database operationConnection ServiceMapped tags

Set it up

  1. Start the Connection Service. Its operator must approve the database connection and its operations first.
  2. Stop the PLC and add a SQL Database Link. On Connection, choose a connection.
  3. Save and connect. Open Operations to choose an approved query and supply its inputs.
  4. Check the result rows, status and diagnostics. A write operation changes database data and runs once.
  5. If the outcome is UNKNOWN, inspect the database before repeating the operation.

Check before you run

  • The Connection Service operator approves each connection and its operations. Database credentials stay in the Connection Service. The project does not carry them.
  • SQL_EXECUTE_WRITE is available only when the Connection Service grants that operation. A read connection does not grant writes. Writes change database data; each runs once and is never retried.
  • UNKNOWN means the database may or may not have made the change. The Link does not retry it automatically.

If it will not connect

Check the Connection Service indicator, the device or server address, and the Link’s diagnostics. A saved mapping does not mean the device is connected. Stop the PLC before changing the Link.

Related