Joe Johnson

Path to SQLCMD

Joe Johnson - 20/01/2010

At a major client we use SQL Server 2008 Enterprise Edition on Windows Server 2008 Enterprise Edition, all 64-bit. After 20 minutes of searching, I couldn’t find the actual path to sqlcmd.exe for a script I am writing. Tired of relying on Windows Search to find the executable path, I’m making sure I do my part to ensure it is widely known to those people who don’t seem to know (despite Microsoft and most of the MVPs seeming to think it’s a given to know the path without ever using it).

C:\Program Files\Microsoft SQL Server\100\Tools\Binn\SQLCMD.EXE

01 comment

  • Eli 03 Nov, 2011, 16:27

    Just some quick tips for finding executables:

    In Windows Server 2008 R2 and Windows 7 the task has the option “Open File Location”
    I don’t know when this feature was added quite sure server 2005 and XP did not have this. For older systems sysinternal’s process viewer has this feature.
    SQLCMD.EXE is available in the cmd path by default so just run it and see where it is.

    dir /s filename
    is more reliable and faster than windows search for finding files.