How to restart SQL Server from the PLC

Hi Experts,

May I ask how to restart a SQL Server in my PLC application? For some reason, sometimes if the SQL server side is reset, it may cause the client end to lose connection to it. After the reset is done, I still don't valid connection to a database. Then I have to restart the SQL server as shown in the picture.

I am wondering if they is control in Ignition some where that allow me restart a SQL server.

Thanks.

No, not natively from Ignition. Ignition only knows JDBC, and there doesn't appear to be a SQL statement that tells SQL server to restart.

Something using java's ProcessBuilder, a set of secure shell keys, and a PowerShell script in the SQL Server's host machine might do the trick.

1 Like

Just for curiosity sake, why is SQL server being reset so much?

1 Like

No it's not often. Right now in development phase may be it is more. However in production phase even one reset a month or even longer might cause an issue.

Your title says, "How to restart SQL Server from the PLC?" but you are really asking "How to restart SQL from an Ignition application or from the Ignition gateway?" Maybe you should edit your question title?

2 Likes