Friday, April 27, 2012

BCP Command Line Utility Installation Process

SQL Server 2012 BCP command line utility installation

Recently, I needed to install the BCP utility on our job automation servers.  These servers do not need the full suite of SQL Server Workstation Tools, just the BCP.exe command line utility.  I found the following process worked quite well at only installing what was needed (thus saving around 1 GB of disk space by not installing the Workstation Tools).

The following components need to be installed on a standalone server in order to get the BCP utility functioning.

Since the servers I was dealing with were Windows Server 2003, I needed to install the Windows Installer 4.5.  Newer versions of Windows Server (i.e. Windows Server 2008 R2) already have the newer Windows Installer.  If installation of the Windows Installer is needed, a reboot will be required.

Installing the Native Client and Command line utilities are as simple as just running the installers.  A reboot is not required for either the Native Client or Command Line Utilities.

These instructions are specifically for the SQL Server 2012 (and 2008 R2) BCP utility, but should be able to be adapted for other versions of SQL Server 

That's it!  Once the aforementioned components are installed, the command line BCP utility should work beautifully.


  1. Hey Matt,

    I've done this and I'm receiving an error saying "Data source name not found and no default driver specified". I'm running Server 2008 R2 trying to connect to a differnet server running the same with SQL Server 2008.


    1. Depending on your application, you may need to create an ODBC connection (DSN) to the appropriate server/database. If a DSN is required and you're running on a 64-bit OS (x64), be sure to create it in the correct ODBC utility. If it's a 32-bit app (x86) be sure to use the 32-bit ODBC Data Source Administrator (C:\Windows\SysWOW64\odbcad32.exe).

      Thankfully, our apps didn't require us to configure a DSN.

  2. Hi Matt, my name is Cristian and I'm from Chile..

    Recently I have this problem, I shoud install (really i have to ask for permition to install) bcp utility in a developing server without SQL Server. My doubt is, It's really necessary install the Native Client before the Comand Line Util?, I was searching in other pages and they talk about take the exe file and put it in other place, but it's a proctice out of terms of licence. I'm really confused. can you help me?...


    1. You will need the Native Client installed for the command line utility to work, but it may already be installed by another data application you have on your system. I cover that here to be 100% certain that you have it installed.
      As far as licensing, tools to access SQL Server are free to use anywhere and everywhere. Is the SQL Server database engine (or Analysis Services, Integration Services, Reporting Services) that you have to license.