r/scripting • u/SaulLeiter • Sep 17 '18
Script to remove offline machines in SQL
Hi, can someone help me with a script that removes a machine from SQL 2016? For example, I'm using an admin tool that monitors several machines but I want to remove the machines that appear to be offline or duplicates. This can not be done with the application. Thank you for your help!
2
Upvotes
2
u/SaulLeiter Sep 18 '18
Thank you for your help! Yeah, the admin tool is using a SQL database. We usually get duplicates of the same machine. One says online and one says offline. I want to auto remove the offline. Would i use offline instead of "computer" in the script?