KB ID : 87
Published : Jan. 14, 2016
Created : Jan. 14, 2016
Last Modified : June 26, 2016

Cause

This error occurs when there is no/wrong path is set in system variables under the environment variables.

Solution

  1. On the affected machine, right click on My Computer.
  2. Select Properties.
  3. Select the Advanced tab.
  4. Select Environment Variables.
  5. Under System variables section, scroll down to Path, Click on Edit.
  6. Specify the directory path which points to the OSQL.exe file:

Example:

  • For SQL Server 2005 OSQL Path is : c:\Program Files\Microsoft SQL Server\90\Tools\binn\;
  • For SQL Server 2008 OSQL Path is : c:\Program Files\Microsoft SQL Server\100\Tools\binn\;
edit retag flag offensive close merge delete