This application waits for an specified time until a Microsoft SQL Server accepts connections. I need it for automatization.
The flag -h
provides info about the disponible flags. Running:
sqlserverwait -h
Will show info about the options and default values:
Usage:
sqlserverwaiter [flags]
Flags:
-d, --database string Database name to connect: ex. BikeStores (default "BoIsBo")
--debug Show debug info
-h, --help help for sqlserverwaiter
--host string Database server host (default "localhost")
-p, --password string Database user password (default "X1nGuXunG1")
--port int Numeric database port (default 1433)
-t, --timeout duration Time to wait: 30s, 2m, ... (default 30s)
-u, --user string Database user (default "sa")
--version version for sqlserverwaiter
If no flag is provided default value is taken
Most of the options can be provided with environment vars started with "SQLW_". Ex. the flag "--password" can be provided with the environment variable SQLW_PASSWORD
Run the command with SQL Server not started. The app tries to connect until timeout is reached.
SQL Server can be started but not accepting connections. Sqlserverwaiter waits until it accepts connections