A new Flexera Community experience is coming on November 25th. Click here for more information.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Summary

This KB article addresses the following error which may appear in the recognition.log file when running the ARL update:

2023-11-20 01:14:39,879 [ft.Recognition.Program] [FATAL] An unhandled exception occurred.
System.Exception: Error running command: sqlcmd.exe -S server-name -d FNMSCompliance -b  -i "C:\ProgramData\Flexera Software\FlexNet Manager Platform\DataImport\Content\ARL\.temp-extract\ARLCreateTables120.sql"  -E ---> System.ComponentModel.Win32Exception: The system cannot find the file specified

Symptoms

Your ARL update fails and you find the logging similar to the following in the recognition.log file (usually found in C:\ProgramData\Flexera Software\Compliance\Logging\Content, or the service account's %TEMP% directory in releases prior to 2018 R2):
2023-11-20 01:14:39,744 [ecognition.Recognition] [INFO ] Executing SQL file C:\ProgramData\Flexera Software\FlexNet Manager Platform\DataImport\Content\ARL\.temp-extract\ARLCreateTables120.sql
2023-11-20 01:14:39,854 [ecognition.Recognition] [INFO ] Executing command: -S server-name -d FNMSCompliance -b  -i "C:\ProgramData\Flexera Software\FlexNet Manager Platform\DataImport\Content\ARL\.temp-extract\ARLCreateTables120.sql"  -E
2023-11-20 01:14:39,879 [ft.Recognition.Program] [FATAL] An unhandled exception occurred.
System.Exception: Error running command: sqlcmd.exe -S server-name -d FNMSCompliance -b  -i "C:\ProgramData\Flexera Software\FlexNet Manager Platform\DataImport\Content\ARL\.temp-extract\ARLCreateTables120.sql"  -E ---> System.ComponentModel.Win32Exception: The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at ManageSoft.Recognition.Recognition.ExecuteCommand(String command, String commandParams, String[] argumentsForSanitization)

Cause

This error means that either sqlcmd.exe file is missing or is not set in the PATH environment variable.

Resolution

Install Microsoft sqlcmd utility, and ensure sqlcmd.exe is available in the system PATH.
 
Note that the ODBC-based sqlcmd must be used; the go-based sqlcmd described on that page cannot be used with FlexNet Manager Suite.

Additional information

Older versions of SQL Management Tools includes sqlcmd.exe as part of the install. However SQL Management Tools 18.x and later no longer includes the file, making it necessary to install it separately.
 
If an older version of SQL Management Tools is installed and the PATH environment variable is not set automatically (due to User Account Control), the following steps may need to be done to set the PATH.
 
If the path for sqlcmd.exe was not set in the PATH variable, use the method below:
  1. Ensure sqlcmd.exe is installed, and locate it on the filesystem
  2. If UAC is enabled and prohibits setting system environment variables, turn UAC off and then reboot
  3. Start a cmd window with local administrator rights
  4. Add the path of sqlcmd.exe to the system PATH environment variable:
    setx PATH "<directory containing sqlcmd.exe>" /M​
  5. 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.

A common location where sqlcmd.exe can be found is: C:\Program Files\Microsoft SQL Server\<version-number>\Tools\Binn

If multiple versions of sqlcmd.exe are installed, the system PATH environment variable should be configured so that the directory containing the most recent ODBC-based version of sqlcmd.exe appears before any directories containing other versions.

Was this article helpful? Yes No
No ratings
Comments
sreeramyenuga
By
Level 6

@sunshine ,

same issue occurred in our environment.

we followed the below steps.

  1. Install SQL Command Line Utilities (SQLcmd.exe + bcp.exe)
  2. Turn UAC off and then reboot
  3. Start cmd as Administrator
  4. Add the path of sqlcmd.exe using ?setx PATH <Actual Path to file> ?m?
  5. UAC can now be turned back on if required

now it's working fine.

Thanks,

sreerama yenuga

Version history
Last update:
‎Jan 18, 2024 05:36 PM
Updated by: