A blog about SQL Server, SSIS, C# and whatever else I happen to be dealing with in my professional life.

Find ramblings

Showing posts with label SSISUploader SSIS. Show all posts
Showing posts with label SSISUploader SSIS. Show all posts

Monday, July 7, 2008

To hook or not to hook

And of course the response is "Hookers are insane, I'll gladly stay in the second row"

I thought SMO was going to hold the answer to how to save objects to SQL Server but that didn't turn out to be the case so all the work I've been doing on the SSISUploader has been based on me hooking the command line thinger and building an object model on top of that. It's been going well, I've gotten in and messed with some stuff I had not touched before in the .NET world. I've got a working concept out there and it seems to be getting some download activity. I've started getting a testing harness wrapped around it so I'll know when I break something trying to build a more coherent pattern around it.

I thought I'd take a night or two off from it and try to scratch a different itch---COBOL copy books. We consume a good deal of data from a mainframe (oh how deliciously wrong it is to be using cutting edge ETL tools on data from a 40+ year old system) and that means I have to spend a good deal of time dealing with fixed-width flat files. Great big pain in my ass when I have a 2000 byte wide file with 300+ columns in it and no headers. I'd built one tool to dummy up data so visually I could see where the columns change over thus


C0 C1 C2 C3
AAAAABBBBBCCCCCDDDDD


It works well enough for what it's doing but it still doesn't spare me the pain of having to transcribe a few hundred field names into the click happy connection manager interface. So I dive into BOL and find out about creating a connection manager dynamically, loading my package from XML which will be nice as I can just read in an existing package and slap a new connection manager into. And then I see some methods I was looking for back before I started hooking dtutil. Look at the object model on Microsoft.SqlServer.Dts.Runtime.Application


Microsoft.SqlServer.Dts.Runtime.Application application = null;
application = new Microsoft.SqlServer.Dts.Runtime.Application();
application.CreateFolderOnDtsServer("\\MSDB", "HeyLookAtMe", "localhost");


I think I'm going to turn in early. Maybe I'll get up and get some miles in before work, less than 60 days 'til the MS 150. Oh well, if I end up gutting the dtutil hook, it will still have provided a functionality that the object model doesn't provide and that is the simulate portion. People would still be able to use my tool to figure out what the commands they can pass in to dtutil from a scripting perspective.

Monday, June 30, 2008

SSISUploader

In the immortal words ofDr. Frankenstein, "It is alive!" My first open source contribution, beyond just monitoring assorted mailing lists---ant, I'm looking at you, was published this evening. SSISUploader is an attempt to take the dtutil tool and make it more command line friendly, at least for SQL Server deploys. It's after midnight and the past week has been like this coding on it so I best turn in but I wanted to let google start linking it in case it'll be of use to someone else.

Tuesday, June 24, 2008

Current project---SSISUploader a dtutil hook

At my current engagement, we deploy SSIS packages to SQL Server. It is not the SSIS package store, but just SQL Server so they go into the msdb database. How that happens is through a manifest file that loads packages all into a single folder. Now, you can create folders and do all sorts of package management from the command line with the program dtutil.exe What'd be nice would be to have the ability to use the nice manifest file to specify "these are the packages I want to deploy" but to deploy them into a folder in the database and by the way, nuke anything that used to be in there" We've got old packages in production that would probably fail if they managed to get run but just on principle, they should be removed whenever we do a deploy.

So, more posts will be coming on this project I'm sure, but for now, I just wanted to taunt Microsoft's spelling champs.
"Error (0xC0014043) createing folder recursive1 in folder recursive0." Obviously I've boned something or I wouldn't be seeing that but my code is so far from alpha, I'm not worried.

The project will eventually be on codeplex, I've already staked out a project site http://www.codeplex.com/SSISUploader