Older versions of SQL Management Tools includes SQLCMD as part of the install however the newer 18.x versions of SQL Management Tools no longer includes the file making it necessary to install it separately using the Microsoft Command Line Utilities. If the older version of SQL Management Tools is installed and the PATH environment variable is not set automatically (due to User Account Control), the workaround section below contains a method to set the PATH if that is the case.
If the path for SQLCMD.exe was not set in the PATH variable, use the method below:
Install SQL Command Line Utilities (SQLcmd.exe + bcp.exe)
Turn UAC off and then reboot
Start cmd as Administrator
Add the path of sqlcmd.exe using ?setx PATH <Actual Path to file> ?m?
UAC can now be turned back on if required
The PATH should now be set and the ARL update should no longer produce the error covered by this article.
The <Actual Path to file> in the Workaround above depends on version, for example on 2008 it is: "C:\Program Files\Microsoft SQL Server\100\Tools\Binn" - the 100 is what shows it is 2008, so make sure that you use the correct folder for your version.
To add to the information above. It is possible, if multiple versions of the SQL Management Tools exist on the machine, that the Path statement may need to be altered. To check this;
1. Right click the start button and click on System. 2. On the left, click on 'Advanced System Settings'. 3. In the pop-up, click on Environment Variables. 4. In the lower part of the window that pops up, within 'System Variables', click on Path and Edit. 5. We are looking for lines similar to 'C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\', and would want to ensure that the latest version is at the top of the list.
on Nov 29, 201204:16 AM - edited on May 26, 202305:37 PM by tpeacock