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?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
6,740 questions
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
290 questions
No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 41,356 Reputation points

    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.

  2. S.Sengupta 5,871 Reputation points MVP

    You can try ODBC Test Connection Using PowerShell or, using a DQY File.