Powershell would be my choice. But I'm curious what you mean by a specific ODBC connection as that is per process. So you wouldn't see it from another process unless you were doing this from a database server and querying the database itself. In that case it would depend upon your DB.
ODBC Connection
Paul
61
Reputation points
What is the best way to script to achieve the following on the client Windows 10 computer at a scheduled set time (Windows Task)...
To detect specific ODBC connection, if opens, close it.
batch file or console app?
2 answers
Sort by: Most helpful
-
-
S.Sengupta 17,311 Reputation points MVP
2022-09-03T01:11:35.357+00:00 You can try ODBC Test Connection Using PowerShell or, using a DQY File.
https://blog.devart.com/4-ways-to-test-an-odbc-connection.html