How to check the connection to the MS SQL database on Ubuntu?

You need to check the connection to the MS SQL database on the remote Ubuntu machine (Ubuntu 18.04). As I understand it, I need an MS SQL client that can be given ConnectionString, after which it will say whether it was able to connect or not. Is there such a client on Ubuntu?

So far, I haven't been able to find it on the Internet. I found such a client for mysql, but I do not know if it will work for connecting to MS SQL (I believe not)

Author: Andrei Khotko, 2020-10-15

1 answers

For SQL Server there is sqlcmd it can also be installed on Ubuntu (https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools?view=sql-server-ver15#ubuntu).

You can connect using the command: sqlcmd -S localhost -U sa -P <your_password>.

 3
Author: Exploding Kitten, 2020-10-15 12:33:27