'sqlcmd.exe' is not Recognized as an Internal or External Command, Operable Program or Batch File


During the import to SQL Server when the DDL statements are loaded to the database using the sqlcmd command line tool the following message appears: “'sqlcmd.exe' is not recognized as an internal or external command, operable program or batch file.”


There may be several causes of the issue:

  • The system can't find the sqlcmd.exe (or bcp.exe, isql.exe) tool, because the path to this tool is not specified in the System Environment Variable “PATH”
  • The appropriate tool is not installed on your computer
  • You have another version of SQL Server, like 2000 and earlier


  • If the cause of the error is in the System Environment Variable “PATH”, then please specify the full path to the “Binn” directory in the SQL Server installation folder, where this tool resides. The full path is specified on the “Specify Import Options” page in SQLWays Wizard (like the one that is highlighted in the picture below).

  • If the cause of the error is that the tool was not installed, then please install it or copy it from the SQL Server installation directory (just copy the whole “Tools” folder to your computer).
  • If the cause of the error in version differences between SQL Server 2000 and 2005/2008, e.g. you are importing into the SQL Server 2000, but specified the incorrect target version of the database (like highlighted in the picture below):

In this case the command for the DDL import will be created using the SQL Server 2000 isql.exe tool, which is replaced with the sqlcmd.exe tool in the SQL Server 2005 and higher. So, in this case just specify the correct version of the target database and the import will work correctly.

More about Ispirer Systems