Escaping In Expressions

by Darren Green 30 Oct 2008 17:18
The expressions language is a C style syntax, so you may need to escape certain characters, for example: "C:\FolderPath\" + @VariableName Should be "C:\\FolderPath\\" + @VariableName Another use of the escape sequence allows you to specify character codes, like this \xNNNN, where NNNN is the Unicode character code that you want. For example the following expression will produce the same result as the previous example as the Unicode character code 005C equals a back slash character: "C:\x005CFolderPath\x005C" + @VariableName For more information about ... [More]

Create MSDB Folders Through Code

by Darren Green 28 Oct 2008 08:58
You can create package folders through SSMS, but you may also wish to do this as part of a deployment process or installation. In this case you will want programmatic method for managing folders, so how can this be done? The short answer is, go and look at the table msdb.dbo. sysdtspackagefolders90. This where folder information is stored, using a simple parent and child hierarchy format. To add new folder directly we just insert into the table - INSERT INTO dbo.sysdtspackagefolders90 ( folderid ,parentfolderid ,foldername) VALUES ( NEWID() ... [More]

Redistribute SSIS

by Darren Green 28 Oct 2008 08:55
The DTS component of SQL Server 2000 was a redistributable client component. This mean anyone with a SQL Server Client Access Licence (CAL) could not only connect to SQL Server in the normal manner, but that could also run DTS packages on their machine. Since DTS and SSIS have no client server, or remote execution feature, this was rather useful. The DTS install was officially documented in redist.txt and expanded upon in articles like Redistributing DTS with your program . SSIS is not redistributable. If you want to run a SSIS package on a machine, you need to licence that machine with a ser... [More]

Disabling tasks through Expressions

by Darren Green 28 Oct 2008 08:43
All Containers include a Disable property. This is what is used for the right-click Disable/Enable functionality you may have used when developing packages in the designer. Expressions are evaluated at run-time and can be used to set properties, so it follows that you could use an expression on the Disable property to control execution of the container. This will not always work. By design, the Disable property is evaluated quite early on during package execution. This may be before you have set a variable that is subsequently used within your Disable property expression. This may caused unex... [More]

Expressions

by Darren Green 28 Oct 2008 08:40
Data Flow Property Expressions Property expressions within the data flow are not immediately obvious. Whilst most pipeline or data flow components do support them for their properties, the expression is not generally exposed through the component user interface, neither is the Expressions property shown properties grid for the component. Property expressions are only available at the task level, so for those components that do support expressions, you need to look in the parent data flow task's property Expressions collection. This can be accessed through the Property Grid for the task. You n... [More]

Expression Date Functions

by Darren Green 28 Oct 2008 07:58
Date Parts Expressions support a range of date related functions such as DATEADD, with the same basic syntax to that found in T-SQL. Whilst the familiarity is very helpful, the difference that catches me out is the format of date part which must be quoted. T-SQL allows this: DATEADD(n, -10, GETDATE()) DATEADD(mi, -10, GETDATE()) DATEADD(minute, -10, GETDATE()) The SSIS equivalent is: DATEADD("n", -10, GETDATE()) DATEADD("mi", -10, GETDATE()) DATEADD("minute", -10, GETDATE()) Related functions that use the same date part tokens - DATEAD... [More]

Welcome to the new SQLIS site

by Darren Green 23 Oct 2008 22:00
If you're reading this and have visited us before, then you will probably have noticed we have released a new site. We have migrated all the content, and old links will continue to work for now. We have also updated all of our tasks and components for SQL Server 2008. See the Component Downloads category for a full list.  I hope it all looks good and works fine, but if you have any issues or problems them please let us know.

SQL Server Editions and Integration Services

by Darren Green 24 Sep 2008 14:00
The SQL Server 2005 and SQL Server 2008 product family has quite a few editions now, so what does this mean for SQL Server Integration Services? Starting from the bottom we have the free edition known as Express, and the entry level Workgroup edition, as well as the new Web edition. None of these three include the full SSIS product, but they do all include the SQL Server Import and Export Wizard, with access to basic data sources but nothing more, so for simple loading and extraction of data this should suffice. You will not be able to build packages though, this is just a one shot deal a... [More]

Extending SSIS with custom Data Flow components (Presentation)

by Darren Green 6 Mar 2008 14:00
Download the slides and sample code from my Extending SSIS with custom Data Flow components presentation, first presented at the SQLBits II (The SQL) Community Conference. Abstract Get some real-world insights into developing data flow components for SSIS. This starts with an introduction to the data flow pipeline engine, and explains the real differences between adapters and the three sub-types of transformation. Understanding how the different types of component behave and manage data is key to writing components of your own, and probably should but be required knowledge for anyone bu... [More]

Extending SSIS with Custom Tasks (Presentation)

by Darren Green 13 Oct 2007 14:00
Download the slides and sample code from the Extending SSIS with Custom Tasks presentation, first presented at the SQLBits 2007 Community Conference. The sample demonstrates a custom task with a connection property, including a property grid drop-down (UITypeEditor) to list all your connections and also add new connections, and a password property flagged as sensitive to honour the package protection level. It also illustrates how to create a user interface for your task. Abstract This session is all about developing for SSIS, writing .Net code to create your own tasks. We cover b... [More]

SQL Server Integration Services - Thinking Outside of the DTS Box (Presentation)

by Darren Green 19 May 2005 14:00
Download the slides and sample code from our SQL Server Integration Services - Thinking Outside of the DTS Box session at the 2005 PASS European Conference. Presentation & Samples (521KB) SQL Server Integration Services - Thinking Outside of the DTS Box

How to add an icon to your component

by Darren Green 8 Nov 2004 14:00
When developing your own custom components for that more professional, and also practical, finish you may want to use your own icon rather than relying on the default system icon. You set this through the IconResource property of the appropriate component attribute; DtsTask for a control flow component or task, DtsPipelineComponent for a data flow component, and DtsConnection for your own connection manager. The DtsConnection IconResource functionality is not fully implemented, and you will always get the default icon. To set an icon for your component the first thing you need to do is to pr... [More]

For Loop Container Samples

by Darren Green 10 Aug 2004 14:00
One of the new tasks in SQL Server 2005 is the For Loop Container. In this article we will demonstrate a few simple examples of how this works. Firstly it is worth mentioning that the For Loop Container follows the same logic as most other loop mechanism you may have come across, in that it will continue to iterate whilst the loop test (EvalExpression) is true. There is a known issue with the EvalExpression description in the task UI being wrong at present. (SQL Server 2005 Beta 2). Timer Loop This example shows how to create a simple timer loop, such that all tasks inside the loop cont... [More]