Symptoms
During the import to SQL Server when the DDL statements are loaded to the database using the sqlcmd command line tool the following message arises: “'sqlcmd.exe' is not recognized as an internal or external command, operable program or batch file.”
Cause
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 to your computer
You have the different version of SQL Server, like 2000 and earlier
Solution
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 in versions 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.