SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


script task


script task

Author
Message
varmadba
varmadba
Valued Member
Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)

Group: General Forum Members
Points: 62 Visits: 84
Hi All,

i have been using ssis for few years now
i have used most of the components/task but never script task
i am a dba so cant do much coding

i am curious when to use script task where other components in ssis can't do the job

can any one please share a scenario where we must use script task


Thanks in advance
Andy Hyslop
Andy Hyslop
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2223 Visits: 3046
Hi

i am curious when to use script task where other components in ssis can't do the job


Well there is your answer! ;-)

One example would be to obtain the error message for a column that was redirected on error (not fail package) , by default SSIS provides the error number but in order to get to the text of the associated error you need a script task..

Its one that I have used quite a bit.

Here is an example

http://www.bidn.com/blogs/JSalvo/ssas/2428/ssis-using-the-script-component-to-obtain-an-error-description

==========================================================================================================================
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe
Orlando Colamatteo
Orlando Colamatteo
SSC-Forever
SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)

Group: General Forum Members
Points: 41112 Visits: 14413
I use Script Tasks so I can have access to .NET to do things that are not built into SSIS (e.g. FileSystemWatcher class) or maybe are built into SSIS but are not easily consumable (e.g. the Execute Process Task can be cumbersome to configure if you have a lot of or have cryptic command-line parameters).

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Paul Hernández
Paul Hernández
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1128 Visits: 661
Hi,

I recently had to use a script task to get the modification date of a group of files within a folder. With the Foreach loop task is possible to iterate over a folder and get the file name, fully qualify or the name plus the extension but not other file attributes like de modified date. Then I used a script task and the System.IO C# Library.
It would be great if this foreachloop component could be extended to retrieve different file attributes.

Hope that helps.

Paul Hernández
jm99
jm99
SSC-Addicted
SSC-Addicted (448 reputation)SSC-Addicted (448 reputation)SSC-Addicted (448 reputation)SSC-Addicted (448 reputation)SSC-Addicted (448 reputation)SSC-Addicted (448 reputation)SSC-Addicted (448 reputation)SSC-Addicted (448 reputation)

Group: General Forum Members
Points: 448 Visits: 297
I use both ScriptTasks and ScriptComponents when I need the power of .NET to achieve a specific function.

ScriptTask - Use the Microsoft.AnalysisServices namespace to dynamically create partitions in SSAS.

ScriptComponent - Time slicing events and optimised aggregations within sorted data flows. The latter being when the input's sort keys match the primary keys in the aggregation. Bespoke code but makes the aggregation block much more memory efficient and semi-synchronous.
mister.magoo
mister.magoo
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10895 Visits: 7891
I use script tasks in the OnError events of executables to store the error messages for sending an alert email at the end of the job (I also use a script task to send the email - it's just easier for me as a developer to use the .NET mail classes.

MM


select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);




  • Forum Etiquette: How to post Reporting Services problems
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • How to Post Performance Problems - by Gail Shaw

  • Go


    Permissions

    You can't post new topics.
    You can't post topic replies.
    You can't post new polls.
    You can't post replies to polls.
    You can't edit your own topics.
    You can't delete your own topics.
    You can't edit other topics.
    You can't delete other topics.
    You can't edit your own posts.
    You can't edit other posts.
    You can't delete your own posts.
    You can't delete other posts.
    You can't post events.
    You can't edit your own events.
    You can't edit other events.
    You can't delete your own events.
    You can't delete other events.
    You can't send private messages.
    You can't send emails.
    You can read topics.
    You can't vote in polls.
    You can't upload attachments.
    You can download attachments.
    You can't post HTML code.
    You can't edit HTML code.
    You can't post IFCode.
    You can't post JavaScript.
    You can post emoticons.
    You can't post or upload images.

    Select a forum

































































































































































    SQLServerCentral


    Search