How to view documents using Visual Studio

View documents in Visual Studio with an amazing tool

Xpath Axes

A very useful trick for automation

Review: Spire.DataExport for .NET

A great tool for exporting data in .NET

How to install Arch Linux, step by step, for VMware Workstation (Part I)

First part of a installation tutorial for this beloved OS

How to setup a local repository in Ubuntu

The steps to have a local repo in Ubuntu

Wednesday, April 2, 2014

How to connect to SQL Server from a machine without SQL Server installed

Ok, here's a scenario that I faced a couple days ago:

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.
2. Once the download is ready, install the driver. Just a "next, next, next" installation.
3. Download and install Microsoft Command Line Utilities 11 for SQL Server. You can download it here.
4. Test if everything went well. First, open a Command Line and enter: sqlcmd. You should see something like this:
This only shows that everythig went well. Now, in order to connect to a SQL Server, enter the following command:

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. If you did everything OK, you should see this:
Pretty easy, right?