Constantly checks connectivity to SQL Server each minute and writes OK/NOT OK in the output or file.
Built on .net core, so could be run on win / linux / mac.
Just run SqlConnChecker(-.exe) as binary file.
- ConnectionString (string) - SQL connection string.
- CheckIntervalMs (int) - how often tool shouldcheck connection (6000 ms by default).
- VerboseOutput (bool) - show error message in output in case of connection is NOT OK (true by default).
- WriteToFile (bool) - write or not messages to the file.
- FileOutputPath (string) - path to the file.
- modify appsettings.json:
- Install .Net Core 2.2 SDK or latest from the Microsoft official site
- Go to src folder and run
dotnet publish -c Release -r linux-x64
All supported platforms (win8, debian, ubuntu, etc.) could be found here
docker run -v /opt:/opt dmitrydoc/sqlconnchecker
--ConnectionString="connection string"
--CheckIntervalMs=1000
--VerboseOutput=true
--WriteToFile=true
--FileOutputPath=/opt/logs
docker build -t sqlchecker .