FME Version
NOTE: This article applied to Windows only.
Symptoms
The tasks created in Windows Task Scheduler report to run successfully, but the FME Workbench log indicates that the translation has failed. There might be errors in the workspace log file similar to below:
2016-10-05 10:00:58| 1.8| 0.0|INFORM|Microsoft SQL Server Non-Spatial Reader: Read 1 DEF line(s). Found 0 attribute(s) 2016-10-05 10:00:58| 1.8| 0.0|INFORM|Microsoft SQL Server Non-Spatial Reader: Opening `TABLE' for read operation 2016-10-05 10:00:58| 1.8| 0.0|INFORM|Microsoft SQL Server Non-Spatial Reader: Trying to connect using SQL Server 2012 Native Client... 2016-10-05 10:00:58| 1.9| 0.1|ERROR |Microsoft SQL Server Non-Spatial Reader: Failed to connect using SQL Server 2012 Native Client. Provider error '(-2147217843) Invalid authorization specification'. Connection string 'Provider=DB_NAME;DataTypeCompatibility=80;Data Source=;Initial Catalog=TABLE_NAME;User ID=;Password=********' 2016-10-05 10:00:58| 1.9| 0.0|INFORM|Microsoft SQL Server Non-Spatial Reader: Trying to connect using SQL Server 2008 Native Client... 2016-10-05 10:00:58| 1.9| 0.0|ERROR |Microsoft SQL Server Non-Spatial Reader: Failed to connect using SQL Server 2008 Native Client. Provider error '(-2146824582) Provider cannot be found. It may not be properly installed.'. Connection string 'Provider=DB_NAME;DataTypeCompatibility=80;Data Source=;Initial Catalog=TABLE_NAME;User ID=;Password=********' 2016-10-05 10:00:58| 1.9| 0.0|ERROR |Failed to open reader 2016-10-05 10:00:58| 1.9| 0.0|INFORM|FME Session Duration: 1.8 seconds. (CPU: 0.6s user, 0.2s system) 2016-10-05 10:00:58| 1.9| 0.0|INFORM|END - ProcessID: 9440, peak process memory usage: 272396 kB, current process memory usage: 272396 kB
Cause
If the Windows Task Scheduler is used to deploy FME Workspaces and run them as the 'Default User', then FME Workbench will not be able to set the correct path to the database or web connection files. This will prevent passing any credentials into Readers or Transformers connecting to a database and the workspace translation will fail.
Resolution
For this situation, the registry must be set manually to indicate to FME.exe where the named connection file is located. The information is set in the HKLM hive where FME.exe looks if the keys are not present in the HKLU hive. The steps below assume the connection files have already been made public as outlined in Making Database and Web Connections Public.
Admin privileges are required to configure the default user using the steps below.
Edit the attached .reg file
Unzip the attached file nc.zip file. Open the nc.reg file in a text editor and modify the line "Named Connection Directory"="c:\\dbtest" to replace it with the path to the connection file on the shared directory. When editing the path, be sure to escape the \ character in the paths by entering \\. (ie: c:\\stellar\\test)
Execute the .reg file
Double click the .reg file to import it into HKLM (HKEY_LOCAL_MACHINE registry entry).
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Safe Software Inc.\Feature Manipulation Engine\Settings or
HKEY_LOCAL_MACHINE\SOFTWARE\Safe Software Inc.\Feature Manipulation Engine\Settings should now exist in the registry on the machine
Comments
0 comments
Please sign in to leave a comment.