How to fix SSIS "File/Process not in path" warning? - ssis

SSIS comes with many tasks that solve data acquisition and intrgration problems, but one task that it lacks is 'HTTP Task' for downloading files over HTTP.
To work around this, I installed Wget, and run it from SSIS using the Execute Package task.
Wget is on my system path so that I can type 'wget' from the command prompt while working in any directory to run the program. But SSIS complains that "File/process 'wget' is not on the path":
I have set the process property RerquireFullFileName to False to stop this complaint from causing an error:
Apart from issuing a warning at the start, the package runs as expected. It invokes wget and downloads the file I tell it to. But how do I stop SSIS complaining that wget is not on the path?
EDIT: Setting the Execute Process task's DelayValidation property to True, as suggested by Siva, does not solve the problem; it just stops SSIS from complaining at design time. With delayed validation, at runtime, I see this in the debug output window:
SSIS package "Extract.dtsx" starting.
Warning: 0xC0029154 at Download Locations Dump, Execute Process Task: File/Process "wget" is not in path.
SSIS package "Extract.dtsx" finished: Success.

The warning occurs because the packing is trying to validate the location of the executable during the design time. You can defer this validation to run time by changing the property DelayValidation on the Execute Process task from False to True.
Step-by-step process:
On the SSIS package, I have place an Execute Process Task configured to use the tool Wget. Refer screenshots #1.
Screenshot #2 the warning message similar to the screenshot shown in the question.
Right-clicked on the Execute Process Task and selected Properties as shown in screenshot #3.
In the properties window, changed the DelayValidation property value from False to True.
Screenshot #5 shows that the warning no longer appears.
EDIT:
To suppress the warning altogether, even at the run-time, you can do something as following:
Create a variable to store the full path of the wget.exe. Populate the variable with the full path to the wget.exe. The value could be different in your scenario. Refer screenshot #6.
Double-click on the Execute Process task. On the Expressions section of the task click on the ellipsis button. Refer screenshot #7.
On the Property Expressions Editor, set the Executable Property value to the newly created variable #[USer::WgetPath]. Refer screenshot #8.
Hope that helps.
Screenshot #1:
Screenshot #2:
Screenshot #3:
Screenshot #4:
Screenshot #5:
Screenshot #6:
Screenshot #7:
Screenshot #8:

Go to the Properties for your Execute Process Task, and set the RequireFullFileName property to false. You can access the properties by clicking the task and pressing F4 or right clicking on the task and clicking properties from the context menu.
This solution has been tested working in VS 2017 with SSDT. You will have a yellow flag warning but the package will run the command.

As a side note, keep in mind Visual Studio loads the PATH environment variable at startup. This means that if you open your project, install something (adding a new value to PATH) and then try to use the just-installed executable, it will give you the "File/Process not in path" waring, even if it's indeed in path. Just close VS, reload your project and the warning will be gone.

Related

PhpStorm showing "unvailable" breakpoint whereas execution is suspended

I'm sometimes stuck while attempting to debug my code.
Debug Session is active, code execution is suspended :
But I cannot see what really happens, as the breakpoint show "unavailable" ("no parking" symbol):
Does anybody know about this sign ?
I still haven't found any information about it on JetBrains sites... that's why I'm here :-)
(PhpStorm 2020.3, using docker containers (linux containers) with Docker Desktop/ Windows 10)
[EDIT] :
I just noticed that "break at first line in php script" seem to be functioning though:
But I have these weird breakpoints instead of red "normal" ones, and an highlighted line.
I tried restarting my docker containers, same issue. This produces seemingly randomly and gets solved after a while ... (reboot ?...)
[EDIT] SOLVED
The path mapping (local<->docker) for the root of my project was empty (how did it happen...) in my docker configuration in PhPStorm.
I'm not sure how this problem occured, but I'll be able to solve it next time if it's back.
If you try to disable "break at first line in php scripts" you may get the message :
17:38 Debug session was finished without being paused It may be
caused by path mappings misconfiguration or not synchronized local and
remote projects. To figure out the problem check path mappings
configuration for 'docker-server' server at PHP|Servers or enable
Break at first line in PHP scripts option (from Run menu). Do not
show again
In my case, the path mapping for the root of my project was incomplete "Absolute path on the server" was emtpy. I don't know how it happened but you could check :
In PHP | Servers

SSIS Logging: Enable/Disable Logging Using Variable Instead of Re-Deployment

I have an SSIS Package, call it PackageA. Sometimes, I want to have it logging to a text file, while other times, I do not. My initial though was to have the package check a table, then use a variable/expression to enable/disable logging. I am assuming this is not possible?
My work around is to create a "master" package, PackageB, with a SQL task to get whether or not to enable logging. PackageB would call PackageA1 or PackageA2 depending on the value--PackageA1 would be PackageA deployed with logging enabled and PackageA2 would be PackageA deployed with logging disabled.
That makes deployment a hassle and easy to mess up, however. Is there any way to accomplish, at the very least, something similar to what I am looking for?
Thanks!
Packages have LoggingMode property, which you can change when you run package using GUI or dtexec command line switch: (more info)
dtexec /f "C:\Package.dtsx" /set "\Package.Properties[LoggingMode];2"
If you use SSIS 2012 and Project Deployment Model you can also set LOGGING_LEVEL parameter from None to Verbose by using for example catalog.set_execution_parameter_value stored procedure (more info).

SSIS 2008 information warning when executing a package

Has anybody already faced a message like:
Information while loading package1:The package is attempting to configure from the XML file \xxxx\yyyyy\package1.dtsconfig
So I did set a configuration file to my package but I'm just wondering why I got this message even though the package is successfully executed.
This is expected behaviour. There is an option per package to suppress this message,
SuppressConfigurationWarnings
If you don't want to edit your packages, you can try the SET option on package invocation /SET "\Package.Properties[SuppressConfigurationWarnings]";1
I believe that is not a warning, just some information.
It is useful when debugging to help you make sure it is loading the correct configurations. If it failed to load the configurations you would have a a 'real' warning saying that it failed to load the configurations from said file.
This also happens when using parent package variables
I would say that this is an info message that the configuration is being loaded but Its the first time I'm seeing it even though I use configuration files all the time. Are you sure your config file is ok? Can you post it here so we can take a look?

Adding editFTPnetPRO to SSIS package causes error message

I'm trying to add some secure FTP code to an SSIS package. I've used the EnterpriseDT product successfully on other .NET projects, so I wanted to incorporate it into an SSIS 2008 package I'm working on.
If I create a Script Task (VB), edit the script, choose Project | Add Reference, and select the editFTPnetPRO.dll file, it comes back with this error:
No template information found. See the application log in Event Viewer for more details.
To open Event Viewer, click Start, click Control Panel, double-click Administrative Tools, and then double-click Event Viewer.
The application log doesn't contain any pertinent details.
I have no idea what this is trying to tell me. I've gone down a couple dead ends searching for this error message and following the prescribed fixes, but nothing has fixed it yet. Any idea what might be going wrong?
P.S. - I tried the devenv.exe /installvstemplates fix, which didn't change anything.
Update: Here is the error captured in the SSIS package when you try to run it:
Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'edtFTPnetPRO, Version=6.3.1.20, Culture=neutral, PublicKeyToken=0dce1ad63760d80b' or one of its dependencies. The system cannot find the file specified.
Where is it looking for this file? I tried copying it to the project direcory, the bin folder, and the C:\WINDOWS\Microsoft.NET\Framework\v2.0.nnnn folder, but it still can't find it, and it won't tell me where it's looking.
I'm now having this same problem with a custom C# assembly that I created to use with SSIS. I have added the assembly to the Windows\assembly and C:\WINDOWS\Microsoft.NET\Framework\v2.0.nnnn folders.
Put your DLL into C:\Program Files\Microsoft SQL Server\100\DTS\Binn and try again.
I have encountered this error a few times while attempting to add a reference from the .NET tab of the Add Reference dialog.
The (painfully simple) fix is to use the Browse tab to add the reference.

SSIS package not running when called as step in SQL Job

I have a .dtsx file (an SSIS package) that downloads files from an FTP server and imports data. It runs fine whenever I run it manually. However, when I schedule calling the package as a step in a SQL server agent job, it fails. The step it fails at is the one where I call a .bat file. The error in the job history viewer says this:
Error: 2009-05-26 12:52:25.64
Code: 0xC0029151 Source: Execute
batch file Execute Process Task
Description: In Executing
"D:\xxx\import.bat" "" at "", The
process exit code was "1" while the
expected was "0". End Error DTExec:
The package execution returned
DTSER_FAILURE (1).
I think it's a permissions issue, but I'm not sure how to resolve this. The job owner is an admin user, so I've verified they have permissions to the directory where the .bat file is located. I've tried going into Services and changing the "Log On As" option for SQL Server Agent, and neither option works (Local System Account and This Account). Does anyone have ideas as to what other permissions need to be adjusted in order to get this to work?
I tried executing just the batch file as a SQL Job step, and it gave more specifics. It showed that it failed when I was trying to call an executable, which was in the same directory as my .bat file, but not in the windows/system32 directory, which is where it was executing from.
I moved the executable to the system32 directory, but then I had no clue where my files were being downloaded to. Then I found that there's a property for the Execute Process Task (the one that executes the .bat) called WorkingDirectory. I set this to be the directory where the bat is located, moved the executable back into the same one as the .bat file, and it's now working as expected.
For me it was a permissions issue. Go to Environment --> Directories, then change Local directory to something the SQLAgentUser can access. I used C:\temp. Click the dropdown for Save, and choose "Set defaults".
Are you executing the SSIS job in the batch file, or is the batch file a step in the SSIS control flow?
I'm assuming the latter for this answer. What task are you using to execute the batch file (e.g. simple execute program task or a script task). If the latter, it looks like your batch file is actually failing on some step, not the SSIS script. I'd check the permissions of what your batch file is trying to access
In fact, it might be a better idea to rewrite the batch file as a script task in SSIS, because you'll get much better error reporting (it'll tell you which step in the script fails).
You could try executing the batch file using the runas command in a command window. If you try and execute it under the local system or network system account, it should give you a better error. If it does error, you can check the error level by going "echo %ERRORLEVEL%".
If it wasn't the latter, and you're executing the SSIS package via a batch file, why?
Are you possibly accessing a mapped drive in your .bat file? If so, you can't rely on the mapped drive from within the service, so you'd have to use UNC path.
I had the same error and I resolved it by logging on to the user account that runs the job, opened Coreftp site in question there, test the site access, made the change there (in my case, I had to reenter the new password) and now it works.
So yes, it is an issue of file access. This one is file access to the coreftp site in question.