I had to test an application from machine1. The application needed access to SQL Server in machine2. The problem is that I didn't have SQL Server installed in machine1, so there wasn't any command to reach SQL Server. This is the solution I found:
1. In machine1, install Microsoft ODBC Driver 11 for SQL Server. You can download it here. Remember to choose right for your system: 32 or 64 bits.
4. Test if everything went well. First, open a Command Line and enter: sqlcmd. You should see something like this:
sqlcmd -S<server_name> -U<user> -P<password>
Remember, there is no space between the "-S" and <server_name>. It's the same with all the other. Also, if your SQL server is in a Domain, you'll have to add the domain to the server_name (e.g. server_name.test.com). If you did everything OK, you should see this: