SSIS: pass package password to child package - ssis

I have a master SSIS package that calls child packages that have ProtectionLevel = EncryptSensitiveWithPassword and a password. When the master tries to to execute a child package, I am prompted for the child package password.
The child packages are in a Sequence Container. Within that definition, there is a "Package Password" property, and I have set that, but it still prompts for the password. I also notice that there is no settable property for packagepassword in the expressions editor.
I have tried defining the password as a parent variable, but it is not working -- still get prompted for the packagepassword. So I was thinking about using a SQL Server configuration table, but can not find the proper value to put in the "PackagePath" column.
Or any other suggestions/words of wisdom -- many thanks!
Steve

I have encountered the same kind of issue today and just updating that solution here as there is no answer given for this question.
We have to make sure the password has been updated on Master.dtsx --> Execute Package Task Editor (double click on Execute Package Task) --> Packages --> Password.
Enter the same password which you have set for the package and then run the Master package.

Related

SSIS package execute application(. exe) file which is protected by password

I have a application (. Exe) file,
At the time of running, it is asking the password to process.
My task is to run that exe file using SSIS package and pass the static password at the runtime.
Kindly help me to resolve my issue.
It is a matter of making the Arguments as an expression. In that expression you can pass the entire command line string including the password. This when you expose it via Package Configuration, it can then be made dynamic. Here is a link that shows how a SQL Server Package is used to zip a file with password which you can use to tweak for your package - SSIS: How to Compress/Zip your file using 7-Zip?

where to set the package password property

I have an SSIS package with protection level - EncryptSensitiveWithPassword and I can execute this package with in the BIDS.
While trying to deploy to file system using the Package Deployment Wizard I receive the error
The protection level of the package requires a password but the
package password property is empty
Where should I set this password? (In BIDS in the designer I have set this password and while trying to open the project it even asks me for the password) So for deployment is there a another property to set?
This error is generally caused due to the property PackagePassword being empty in your configuration. Kindly check it and if it's not set, set it.
Also change the protection level to DontSaveSensitive after opening the package using the password. Then add the packages to your solution and once you are done, make the protection level as SaveSensitiveWithPassword.
Try deploying your package with these settings.
Reference:Securing your SSIS Packages
As per the answer by user2339071, if you don't have any passwords in your connections (i.e. you use windows trusted security) then you don't actually need a password.
But, assuming you do... (perhaps you could calrify in the original question):
My understanding is that the package password is basically specified at runtime, not deployment time.
When your DTSX file exists in the file system (after deploying it or copying it there directly), then you need to execute it somehow and that's where you specify the package password.
For example if you use SQL Agent to run your package you will find a field in the job to enter that package password. If you use DTEXEC.EXE directly, there is a switch in there for your package password also.
Personally I don't use the package deployment wizard, I just copy the DTSX file to the target file location.
Set or change the protection level of the package or packages by using a command similar to the one of the following examples:
The following command sets the ProtectionLevel property of an individual package in the file system to level 2, "Encrypt sensitive with password", with the password, "strongpassword":
dtutil.exe /file "C:\Package.dtsx" /encrypt file;"C:\Package.dtsx";2;strongpassword
The following command sets the ProtectionLevel property of all packages in a particular folder in the file system to level 2, "Encrypt sensitive with password", with the password, "strongpassword":
for %f in (*.dtsx) do dtutil.exe /file %f /encrypt file;%f;2;strongpassword
If you use a similar command in a batch file, enter the file placeholder, "%f", as "%%f" in the batch file.
You can also easily set the package password by going into the 'Package Explorer' then right click on the package to go into the properties and set your protection level there.

Execute package task asking password if I saved the package with "Encrypt All with password"

I Have a Package which will execute 7 packages using execute package task. Those 7 packages are saved with protection level as "Encrypt all data with password".
While configuring Execute Package task I selected the Location as "File System". Daily I need to run this package manually. But the Problem is I need to give password for all the 7 packages every time I want to execute it. Usually I run this package during lunch time.
Is there anyway I can store the package password programmatically? If I ran it yesterday and I didn't close the BIDS and I'm running it again today this will not ask for the password.
I also tried to build the package after the first run where it didn't ask for the password. Then I run it again without closing the BIDS. But this is still not working.
Even if you store the package passwords SSIS will always prompt you for entering the password when you are using BIDS to execute it . This is because BIDS try to open the individual child package designer and hence prompts you for entering the password .
So the only way is to execute it without the dialogue prompt for password is to use sql agent or dtexec utility
1.In order to execute the child packages i suggest you to create a config file for the parent package and select the property Package Password for all your Execute Package Task
2.Now in the config file enter the password for all the individual execute package task
<Configuration ConfiguredType="Property" Path="\Package\Execute Package Task.Properties[PackagePassword]" ValueType="String">
<ConfiguredValue>Password</ConfiguredValue>
</Configuration>
3.Execute your package using dtexec utility
dtexec.exe /f "PackageLocation/Parent.dtsx"

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).

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

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.