Showing posts with label packages. Show all posts
Showing posts with label packages. Show all posts

Friday, March 30, 2012

imports microsoft.sqlserver.dts.pipeline does not work

I have been trying to follow/implement the examples in the following help topics (thanks to Jamie for these links).

Building Packages Programmatically

(http://msdn2.microsoft.com/en-us/library/ms345167.aspx)

Connecting Data Flow Components Programmatically

(http://msdn2.microsoft.com/en-us/library/ms136086.aspx)

The problem I am having is that MainPipe is not recognized as a valid type in my Script task, even though I have the imports statements that are listed in the example. I get the message "Error 30002: Type 'MainPipe' is not defined". The other and related problem is that when I type "imports microsoft.sqlserver.dts", the intellisense offers only two choices: {}Runtime and {}Tasks. I don't see any choice for Pipeline. Can anyone tell what I am missing? It seems to be some kind of configuration/installation issue, but I have no idea how to resolve it. I have tried this on 3 different machines, with both the RTM SQL 2005 standard edition, and with SP2 installed, all with the same result. Any help is appreciated Smile

Here is my code:

' Microsoft SQL Server Integration Services Script Task

' Write scripts using Microsoft Visual Basic

' The ScriptMain class is the entry point of the Script Task.

Imports System

Imports System.Data

Imports System.Math

Imports Microsoft.SqlServer.Dts.Runtime

Imports Microsoft.SqlServer.Dts.Pipeline

Imports Microsoft.SqlServer.Dts.Pipeline.wrapper

Imports Microsoft.SqlServer.Dts.

Public Class ScriptMain

Public Sub Main()

'

Dim package As Microsoft.SqlServer.Dts.Runtime.Package = _

New Microsoft.SqlServer.Dts.Runtime.Package()

Dim e As Executable = package.Executables.Add("DTS.Pipeline.1")

Dim thMainPipe As Microsoft.SqlServer.Dts.Runtime.TaskHost = _

CType(e, Microsoft.SqlServer.Dts.Runtime.TaskHost)

Dim dataFlowTask As MainPipe = CType(thMainPipe.InnerObject, MainPipe)

Dts.TaskResult = Dts.Results.Success

End Sub

End Class

Make sure you have added a reference (under Project..References) to the Microsoft.SqlServer.DTSPipelineWrap.dll.

|||That was it. Thanks for your help.

Monday, March 19, 2012

Importing existing DTS packages.

There doesn't seem to be a specific group covering legacy subsystems so I thought I would post this in here.

I have several hundred of these to import that are going to be left to run as they are until such time somebody has the time to migrate them to SSIS.

I have to say I'm not look forward to doing them one at a time using the brain dead UI (it folds up folders behind itself causing another two mouse click between each import). Is there a way of automating this import?

Thanks.

DTS packages are stored in exactly the same location in 2005 as they were in 2000, after all it is just a backward compatibility feature. If you upgraded a system there would be no change, If you are migrating as part of the "upgrade" then just copy the contents of msdb..sysdtspackages.

This may explain more about DTS storage

Transferring DTS Packages
(http://www.sqldts.com/default.aspx?204)

|||

Thanks for the guidance.

I actually found a utility by following your link above. The tool is called DTSbackup2000. It's more than a backup tool as it also transfers DTS packages between servers, including SQL Server 2005 targets.

Here is a direct link to the download: http://www.sqldts.com/download/DTSBackup2000.msi

It has worked for me and saved me a lot of clicky, clicky with the UI!