I'm using a PLC connected to a laptop (over EthernetIP). The development software for programming the PLC has a built in settings page for connecting it to various database engines (MySQL, PostgreSQL, MS SqlServer). It's an easy form where you fill in the IP address, port number (not required), database name, username, password.
I installed SqlServer 2017 Express on the laptop, and found on internet how to enable the TCP protocol, set a fixed IP address, and switched off dynamic ports. I set the
TCP Port to 1433.
I filled in the database connection information in the PLC software and it worked. Connection was established and the PLC could execute queries.
The things I did are based on the accepted answer of this question: I can't connect to my servers SQL database via an IP Address
A week later, I was not busy with any activities about the database. I connected another device and had to change the IPv4 settings of the network adapter of the laptop (to change IP range). After setting the adapter settings to the original values, removed the extra device, and become busy with the database again, the PLC couldn't connect to SqlServer anymore.
I'm pretty sure the situation is the same as before, but even after following all steps again, the PLC says it can't connect to the db.
I tried a
ping to the IP address of SqlServer, but I got a response from my network card: Destination host not reachable. Request time-out.
Could it be I still forgot to set something back. Or could it have something to do with changing the adapter settings of the network card?
I did not forget to restart the Sql Server service every time I made a change.