Monday, March 26, 2012

Running a package in C#

Hello all. I am trying to run a package in C# and have come accross the help file of how to do it in Visual Basic ('Running an Existing Package using Visual Basic'). However, I cannot find a reference to anything relating to DTS in my reference dialog. In the help file it says to add a reference to Micorsoft.SQLServer.ManagedDTS.DLL, however, I cannot find this reference anywhere. Am I missing something?
Thanks,
MikeAre you using Visual Studio .NET 2005?
Visual Studio .NET 2002/2003 projects can't have references to
Microsoft.SQLServer.ManagedDTS.DLL, since it is built with .NET 2.0.
|||Sorry, yes I am running .NET 2005 June CTP.|||Have you GACd it? I'm not sure if you have to but its worth a try.

-Jamie|||Pardon my ignorance, but GAC? Not sure what you are referring to here?|||GAC stands for Global Assembly Cache. its basically where you put your assemblies that you want to use in a .net app (I think).

The default location is %windows-dir%/assembly/ I think.

-Jamie|||I haven't put any assemblies anywhere. From what I understand, the .dll that I cannot find is supposed to be one of the built in ones. It is not one that I have created. I guess it deals with running the SSIS packages. Kinda like DTSRun was for SQL 2000.
Now the one thing that I have noticed that I forgot to mention above is that my VS 2005 is running on my local box and my SQL Server Business Intelligence stuff and SQL Server 2005 is running on a different box. Not sure if this would make a differnce. I hope not, but thought I would check.|||You are correct that from a high level that DLL is used in running the packages. But your .net app doesn't know where to find that DLL so I'm guessing that you need to put it somewhere where it knows where to look for it - that place is the GAC.

Hopefully someone can confirm this. I'm not absolutely sure.

Check in your GAC to see if you can see Microsoft.SQLServer.DTSPipelineWrap

-Jamie|||Hi Jamie. Sorry to sound frustrated, just a bad morning. I guess I should clarify that I did a search on my computer and that .dll is nowhere on my machine. So I couldn't move it if I wanted to. I guess what I really need to know is at which point does that .dll get loaded? When installing SQL Server 2005 or when installing VS 2005? Like I stated earlier, my VS2005 install and my SQL Server 2005 intsall are on two seperate computers. If it is installed when SQL Server 2005 is installed, is there a way to install just the Business Intelligence without installing SQL Server?
On my computer I have absolutely NO references to ANYTHING having to do with DTS. I have even done a search for anything containing DTS in the name and nothing was found.
Sorry for being confusing. Like I said, it has been a rough morning!
Thanks for your kind help!
Tazz|||The DLL gets loaded when you install Integration Services (as far as I know).

-Jamie|||The assembly that's being discussed, Microsoft.SqlServer.ManagedDts.dll, contains the Microsoft.SqlServer.Dts.Runtime namespace and thus the Application and Package objects. It is installed by default to C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies.

I believe that this file is installed if you install Business Intelligence Development Studio only, as BIDS installs everything necessary to design and test SSIS packages, but I can't easily verify this with my own eyes at the moment.

Now that SSIS exists as a robust ETL platform, it is no longer "redistributable" in the way that DTS was, simply by copying a few DLLs to client machines.

-Doug
|||The Add Reference dialog in VS does not use the GAC, but certain other folders, known "assembly" folders that VS knows to check. There is a KB which I assume is valid for VS2005, which describes is a registry key with the folders listed. So the assembly needs to be in a VS known location, not the GAC at this stage. (Jamie remember the fun with adding a reference to a Script Task).

The DLL may be installed in the GAC as well to help it be located at run-time, and save having multiple installs etc, but that is not the issue for Add References. Obviously as has now been determined, you need to install BIDS to get the DTS/SSIS assemblies, when they will be installed suitable folders, and actually in the GAC as well.|||

Tazzmann wrote:

...is there a way to install just the Business Intelligence without installing SQL Server?
...

Yes and I have it that way.
While installing you have to select only the option to install BIDS (I forgot the exact name of the option to select, but it is something like "development tools, documentation...")

HTH,
Nitesh

No comments:

Post a Comment