Dynamic Configuration of Script Task in SSIS - configuration

I have to execute a VB script on some data from a CRM database in a data flow task. I want to make it configurable on other system as well.
I am able to assign the connection string of the connection manager dynamically by configuring through variable using a configuration file. Is there any way to configure the ScriptLink property of Script Component Editor so that I can make the address of the script dynamic.
I have also tried CozyRoc Script Task + also but am still confused. I will highly appreciate any help.

Related

How to configure send mail task dynamically in SSIS using Package Configuration

I have a send mail task which sends the excel as attachment. We have couple of ids in CC, BCC and to. I want to configue send mail task dynamically using package configuration, So it takes all ids, message subject, and messageSourse dynamically. How to achieve this in SSIS?
And I have to configure that smtp connection also through package configuration.
Thanks in advance
Create variables for each aspect of the Mail task you would like configure, then map those variables to the various properties of the Mail task.
You will need another string variable for the SMTP server name, which gets mapped in the properties of the connection manager.
Once the variables are created and mapped, open the package configuration settings and map the variables to the package configuration.

How to do File System Task in SSIS depending on Result of Data Flow

I'm writing a (what I thought to be a) simple SSIS package to import data from a CSV file into a SQL table.
On the Control Flow task I have a Data Flow Task. In that Data Flow Task I have
a Flat File Source "step",
followed by a Data Conversion "step",
followed by a OLE DB destination "step".
What I want to do is to move the source CSV file to a "Completed" folder or to a "Failed" folder based on the results of the Data Flow Task.
I see that I can't add a File System step inside the Data Flow Task, but I have to do it in the Control Flow tab.
My question is how do I do a simple thing like assign a value to a variable (I saw how to create variable and assign them a value at the bottom pane of Data Tools (2012)) depending of if the "step" succeeds or fails?
Thanks!
(You can tell by my question that I'm an SSIS rookie - and don't assume I can write a C# script, please)
I have used VB or C# scripts to accomplish this myself. Since you do not want to use scripts I would recommend using a different path for the project to flow. Have your success path lead to moving the file to completed and failure path lead to moving the file to failed. This keeps it simple and accomplishes what you are looking for.

ssis 2008, Parameter on Script Component?

I'm working on SSIS 2008.
On the Control Flow of my ssis I have an Execute SQL Task which connects to a Data Flow Task giving the Data Flow Task a value on a variable.
On the Data Flow Task I have a Script Component which would have an sql query and the sql query would work with the variable value.
I want the Script Component to "receive" or "take" the variable as a parameter so I can work with the parameter value.
What I want is something like an OLE DB Source has: If one double clicks on the Ole Db Source and put Sql Command on Data Access mode, you can see the Parameters button, and there you can put the parameter and assign a variable to the parameter.
I have tested the Script Component options, but until now I have not seen a functionality like Ole DB Source has.
How can I do this with a Script Component?
Thanks.
If you're using an OLE DB Source component, you should be able to map parameters just like you do in an Execute SQL Task. Simply use a ? as the variable placeholder.
If you are using an ADO.NET connection, it's more painful as the parameters must be mapped outside of the actual data flow. See this answer for more detail.
If you have a pressing business need for using the Script Component, then by all means use it. Click the ellipses on the ReadOnlyVariable property of the Script Transformation Editor window.
In the resulting window, scroll down and check all the variables you will need access to.
Now in your Script Task you will be able to reference those variables. The syntax should be something like this.ComponentMetadata.Variables.MyVariableName

SSRS Dynamically change Datasource connection String

I want to modify the connection String of a Shared Data Source on a report Server. the reason is, every week we deploy new data on the server, so I am planning to deploy new database, test it and modify the datasource so that it than connect to new database, then remove the old database.
Can anyone help me in the regards.
I tried to use this post: Updating Shared data source connection string programmatically
but I can not create ReportingService2005 object as dll is missing to which this object points.
Thanks
ReportingServices2005 is not a dll, it's a webservice
The URL is formatted as below for most 2005 instances:
https://<<Report Server Name>>/ReportServer/ReportService2005.asmx
If you add the web reference the solution you have should work
An alternative to creating a custom application to do this is to use the rs.exe utility to execute the code as a script.
Scripting with the rs Utility and the Web Service

SSIS FileSystem Task

I have a filesystem task I would like to move a file from 1 folder to another.
I pick up via SQL task a couple of fields to be put into variables.
I have a SourceUri, for example: http://input.mozilla.com/data/opinions.tsv.bz2
and I Have a desitination: C:\Downloaded
during another SSIS package the file is downloaded to this location
I would like to move the file from: C:\Downloaded\opinions.tsv.bz2 to C:\Archived\opinions.tsv.bz2
I can't seem to customize the task enough where I can give it the variable "http://input.mozilla.com/data/opinions.tsv.bz2" and trim it down to "opinions.tsv.bz2" and build "C:\Downloaded\opinions.tsv.bz2" and then move that to "C:\Archived\"
any help would be greatly appriciated
In that regard, using a Execute Script task is helpful as you can write C# code and make use of .NET System.IO libraries and string manipulation commands to accomplish your requirement.