After installing MS SQL server on your local machine, you might want to connect with MS SQL server with command line.
sqlcmd -S localhost -U sa -P "<password>"
But instead of connecting with MS SQL server, you might get the error
"sqlcmd: command not found."
There might be mssql-tools or symlink issue. To resolve this error, use below commands.
The first method you should try is check
mssql-tools is installed. Run the below command in Terminal.
sudo apt-get install mssql-tools
If mssql-tools is already installed, you might get below output.
Reading package lists... Done
Building dependency tree
Reading state information... Done
mssql-tools is already the newest version (126.96.36.199-1).
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
If it is not already installed, it will start installing. You might still get the error after installation complete. You need to create symlinks. Run the below command to check where
mssql-tools/bin/sqlcmd is installed.
sudo ls /opt/mssql-tools/bin/sqlcmd*
It will output the path something like:
Now create symlink of the command to /user/bin folder with below command.
sudo ln -sfn /opt/mssql-tools/bin/sqlcmd /usr/bin/sqlcmd
This option should fix the error and you can now access MS SQL server using that above command.
How to disable or enable a form element using jQueryUse the jQuery prop() method...
What is manifest.json file and how it is usefulThe manifest.json is a simple JSON file...
Data Binding in Angular9In this Angular tutorial, we are going t...
How to Install Python 3.7 on Ubuntu 18.04Python is one of the most popular progra...
Laravel 8 - Sanctum API Authentication TutorialLaravel 8 Sanctum authentication article...