Skip to content

Instantly share code, notes, and snippets.

@caveatlector
Created June 7, 2019 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caveatlector/9de6fe96d711c10f7d69788ce8c6543b to your computer and use it in GitHub Desktop.
Save caveatlector/9de6fe96d711c10f7d69788ce8c6543b to your computer and use it in GitHub Desktop.
sqlcmd: test connection via getdate()
#!/usr/bin/env bash
# Requires: sqlcmd
IP=
sqlcmd -S tcp:${IP},1433 -Q "select getdate()"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment