in SSIS how to I make the package property CheckPointFileName a variable? - ssis

It appears this property needs to be hard coded. I'd like to make it a project level variable that I can set from the job.

From the Control Flow of the package, right-click anywhere in the design layout and select Parameterize.... From here choose the CheckpointfileName property and assign the parameter to use for this file.

Related

How can I dynamically change name of component reference <dropdown-component> at the run time globally in angular?

In my current application, there is a component called "dropdown-component" which is used across the application, I have to use "custom-dropdown-component" instead of "dropdown-component". I will not be able to do the changes to every file where ever its called as there is some specific business requirement. These changes should be reflected at the time of render. Kindly help with this
Current code
<dropdown-component></dropdown-component>
Expected to change at the runtime
<custom-dropdown-component></custom-dropdown-component>
I don't think you can change the component at runtime without major changes to the whole code.
Probably the simplest solution would be to do a search/replace or you can create the custom-dropdown-component but call it dropdown-component instead, then you you have to import the Custom Module but this is also kind tricky and not a nice solution

DTS Package unable to edit parameters

I have a DTS package where I am getting a very odd problem.
If I open the solution, when I look at a package, I can view and edit the parameter list.
If I open the same file, just as a standalone file, then although I can see everything else. The parameter list comes back blank.
Does anyone have a solution?
Some extra information as per request.
If I open the file directly within Visual Studio (2012 in this case) and view the parameter list, I get the following:
When I open the same file as part of a project, I get the following:
No errors are reported, but when I open the file stand alone I can no longer see the parameters.
Ok so it seems you want to edit the design time values of a package's parameters outside of the context of an SSIS project. As noted with your screen shots, if you open an SSIS package that has package parameters in it, they are not displayed. You get the same behavior if you click on the Parameter tab for an SSIS project that is using the classic Package deployment model.
This appears to be by design but you're welcome to open a Connect item to see if the product team will change this behaviour.
In the mean time, I see two approaches. The first is to hand edit the XML. Right click, view code and you'll find a section like the following. Change the value of your ParameterValue section and you'll be right as rain. The most important thing of course is that prior to mucking about with XML is to ensure you have a known, safe, recoverable version of the package - preferably in some sort of version control.
<DTS:PackageParameters>
<DTS:PackageParameter
DTS:CreationName=""
DTS:DataType="3"
DTS:DTSID="{C6988EC3-F273-4889-83B8-02A4AC8F6E9A}"
DTS:ObjectName="MyParameter">
<DTS:Property
DTS:DataType="3"
DTS:Name="ParameterValue">0</DTS:Property>
</DTS:PackageParameter>
</DTS:PackageParameters>
A different approach, and one that I would likely employ is to not care about what the package has as a value on disk. Instead, I'd focus on the value after deployment.
Consider the following code, it applies a configuration in the SSISDB that ensures the value of MyParamter is always 1. At rest, the value is 0 but by applying a configuration, I know that when this package runs in the catalog, it's going to use the configured value and not the design-time value. This approach is also generally going to be more accepted in places that are subject to change controls like SOX/SAS70/HIPPA/PCI etc
DECLARE #var int = 1;
EXEC SSISDB.catalog.set_object_parameter_value
#object_type = 30
, #parameter_name = N'MyParameter'
, #object_name = N'Package.dtsx'
, #folder_name = N'Deploy'
, #project_name = N'SO_ProjectDeploymentModel'
, #value_type = V
, #parameter_value = #var;

Parameter bindings in ssis

How to dynamically pass value to the child package variable by using Execute Package Task?
I need to call a package(child) from another package (parent) concurrently. In every call, I require to pass different value to child package variable
I have tried using parameter bindings in Execute Package Task but, some where I made mistake. Its not passing value as expected. Passing only empty
Eg:
one parent and one child. 3 different tasks to run same child. I want to pass 3 different variables from parent to a single child variable
Thanks in advance
To pass a variable from a parent package to a child package, you can use Package Configurations.
In your parent package, create the variable you want to pass the value from. Let's call it varParent. Now, use an Execute Package Task to reference the child package. You don't need any parameter bindings.
In your child package, create the variable that will receive the value from the parent package - varChild. Right click on an empty space in the Control Flow and select Properties. Scroll to Configurations under Misc. and click the button with the three dots.
Check "Enable package configurations" and click Add. The Package Configuration Wizard opens. Click Next.
In Configuration type, select Parent package variable. In the Parent variable field, enter varParent. Click Next.
In the tree view folder structure that shows, expand Variables, varChild, Properties and select Value. Click Next.
Give your Configuration a name and click Finish. Close the Package Configurations Organizer.
Now, you varChild will get the value from varParent.

SSIS Script Task: How do I set a variable in one package and use it in another

I need to use a variable I get in a Script Task in one package in a Script Task in another package. How can I make a variable with a scope that spans packages? Are there Project variables?
Prior to SQL Server Integration Services 2012, the only way to share a value between packages was to use Parent/Child configuration. You could actually share a value between them without using configurations but it was janky as all get out.
If you have no need of bi-directional communication, then you could have package A (one that computes the value in script task) start package B and use the /SET properties to assign a value to the variable
dtexec /file PackageB.dtsx /Set \Package.Variables[User::SharedVariable].Properties[Value];\"I was computed\"
In a SQL Server 2012 project deployment model, the Configuration concept has been replaced with Parameters. This is a bit more straight forward as you define Parameters and specify whether they are required. The Execute Package Task provides a nice mapping mechanism between local variables and expected Parameters.
In SSIS 2005 and 2008:
Declare a variable - say p as int - at the package level
Call your child package from the parent package.
Now, if you have a script task in the Child package, you can access the variable p like this:
1. Pass ReadOnly variable p in the Script Task Editor of Child package
2. To access the parent variable: Dts.Variables["p"].Value;
Notice, that I have not use "User::p" in any of the above two steps. I find this method straight-forward.
Make sure you do not declare a variable p at the child package level.
So, how does this method work? Think of the basic concept of the scope of a variable. The script task will keep "going up" to find the variable p. Going up means - it will first try to find it at task level, then container level, then package level, then finally at parent package level. (This is a simple explanation - technically each of these levels are containers.)
In SSIS 2012, you can also use parameters to pass the variable in ReadOnly mode. The method described above can also be used in SSIS 2012 with added advantage of being able to overwrite the value of the parent variable.

SSIS changing variable scope

How do I create a variable with a scope? It's just giving me a default which I do not want, and I'm unsure how to change. This should be simple, and a Google search leads me to believe this is quite a common problem but with no easy solutions.
imgur: http://imgur.com/uxlRf
click on new variable button, add variable name and then click on Move Variable Button right next to add variable. and from there select Executable , to which you want to set a scope to. Hope this helps.
Note: Scope of the variable is set based on the container you have focus before clicking the new variable button. Though BIDS Helper can help you change the scope of the variable very easily that’s the 6th button provided by BIDS Helper on top of the variable pane.
Found the above answer, not very helpful way of doing things.
As someone noted, this changes with 2012. I just got bit by that and note that the 2012 documentation did NOT get updated. It still says variables are scoped to what you have selected which is NOT true. But when you're on the variables window, note the 2nd from the left icon at the top - this is the "Move Variable" button that works quite nicely to allow you to move the scope of the selected variable. BiXpress also has similar function but it's buggy in that it won't pick up OnPostExecute scope making their version very limited.
We can change the scope of the variable in 2008 BIDS.PFB the steps I did for changing the scope of the variable from the package level to the task/container level.
1)Right click on the package.dtsx file from the Solution explorer and click on the "View code"
2)Search for the variable for which you wanted to change the scope. Copy the XML code related to that variable.
3)Search for the control for which you wanted to use this variable and copy the xml code after completion of any tag(Many tags are related to a task/container).
4)Remove the origial copied code.
5)Save this file
6)Open the package and the scope of the variable would have been changed
I am not sure If it impacts the package or not, but it worked for me.
Kindly let me know If it will impact the package or not if any one knows
How about:
View code of *.dtsx package
Change DTS:ObjectName for desired one.
Will this lead to any issues? At the moment it seems ok but i can't run package yet to check this.
Well thats the way BIDS has been designed. You create on the control flow element on which you want to create the variable. And if you want to create the variable on the package level, you click on an empty space on the control flow pane. Thats the only way to assign scopes for variables using BIDS. Havent looked at the BIDS Helper, but BIDS itself is capable enough of doing such things.