SSIS (RSS)

SQL Server Integration Services

Attending the PASS Summit

Steve Jones makes some good points in his blog post Training. I find it difficult to believe the short-sightedness of some organizations when it comes to training events like the PASS Summit.

This year's Summit - like all previous years to date - had enough top notch presentations and labs to make it worth the cost of admission, travel and expenses, and the cost of allowing a database professional to leave work for three days combined. More than enough.

Like Steve, I don't get it.

Also like Steve, I bet we'll see these DBAs at the 2008 PASS Summit in Seattle - and working for another company.

I wonder if those responsible for denying database professionals opportunities for training factor in the cost of hiring and training a new DBA every six to eighteen months?

:{> Andy

Technorati Tags: EMPs Database Professionals PASS Training Changing Jobs

At the 2007 PASS Summit!

PASS stuff!

I'm at the 2007 PASS Summit!

I was wandering around the Colorado Convention Center earlier today in shorts, unshaven, tired... looking like I'd been rode hard and put up wet. But I caught the last half of Gert Draper's excellent presentation on Team Edition for Database Professionals! Gert is the man.

I'm presenting on the same topic tomorrow (yeah, I know - great move there, Andy...) and then on SSIS Development practices Thursday. This promises to be the geekiest week I've had in a long time!

:{> Andy

Technorati Tags: PASS Summit 2007 Denver Team Edition for Database Professionals

Getting Ready For The PASS Summit!

The PASS Summit is less than two weeks away!

I'm getting ready for my presentations. I need a couple laptops to host virtual servers for the demos, so I bought some new gear to take with me.

Check out my Network-In-A-Bag!

Network in a bag!

It's a power strip, a couple CAT6 cables, power supply, and a NetGear 1G 5-port switch - all in a 1 gallon Ziploc bag.

:{> Andy

Technorati Tags: PASS Summit 2007 Networking

Iteration = Maturity

Introduction 

I was recently reminded that iteration matures software.

The History of Andy, Part 1 

Like many DBAs, I was a software developer in another life. I built web applications - working my way up from HTML through DHTML and finally to ASP - and could regale (and bore) you young whipper-snappers with war-stories of how things were "back in my day". [/DanaCarvey]

But I won't.

The Times They Are a-Changin'

I'll share instead something I've witnessed many times since starting with software in 1975 - and something you probably already know: stuff changes.

And thank goodness stuff changes!

I recently ordered 1G of RAM from an online retailer. It should arrive before my next son (but that's not a given as Riley refuses to provide a tracking number - the doctors will induce Christy into labor Friday if he hasn't been born by then - but I digress...). I remember my neighbor John, who introduced me to computers, purchased a 256-byte RAM chip in the mid-1970s for about what I paid for the 1G. That's 256 bytes of RAM - not a typo. As I recall it was either a 14- or 16-pin IC.

Things have changed since then. Improvements in technology, brought about by building and improving upon existing knowledge, have brought us to a day when I can purchase 1,073,741,824 bytes for roughly the previous price of 256. I don't know how you feel about that. I think it's a good thing.

The idea of "building and improving upon existing knowledge" defines iterative development. Although the idea is relatively new to the software development field, it serves as the basis for engineering disciplines. Engineers iterate - build and improve upon existing knowledge - and we get more powerful hardware for the same amount of money. What's not to like?

Iteration - it's not just a good idea... 

Iterative software development builds and improves upon existing knowledge within a specific domain. Most domains are defined by an application (wholly or in part), enterprise knowledge (again, wholly or in part), or - most likely - some combination of the two. For example, let's say you work for a large corporation as a software developer. Your domain could be the corporate website. In which case you possess knowledge about the business of the corporation and web development. You mix these together to do your job. In this case, you will probably pick up marketing savvy and current trends along with the latest AJAX techniques.

As you make successive passes (iterations) through the website design interacting with marketing, your domain knowledge is built and improves. As your domain knowledge increases, the website will become more valuable to the corporation - as will you.

Iteration adds value.

Got Iteration?

The same can be said for database development.

Perhaps you've experienced this in your own database development efforts: you receive a request for a database design to meet some desired functionality. Or you're handed a design and asked to optimize it. Or maybe even you had an idea to capture data - performance metrics or something similar - and you're designing a database solution to accomplish this.

You get into the development a few hours or a few days and realize a little tweak here or there would improve performance, or readibility, or better adapt the design to your intentions. So you make the tweak and continue.

This improvement leads you to re-examine other portions of the design and you make more tweaks. Maybe your last change broke things. Maybe you see an opportunity to add a parameter to a stored procedure and combine the business logic of three stored procedures into one.

A "Growing" Solution 

Pretty soon, you have iterated enough to feel comfortable promoting, integrating, or even releasing the results - letting the effort move to the next step.

Depending on the nature of your efforts, it may not end there. If your database development is the back end of a larger application - say, the corporate website, for example - there will likely be requests for changes over time as the site grows (scales) in complexity and size.

When the requests come in you are not likely to start over. You will most likely build and improve upon your existing knowledge. You will most likely iterate.

Scaling forces iteration.

Voilà

This is how solutions mature - be they applications, databases, or both - regardless of who writes them or how many are involved in the development effort. It doesn't matter if the development team is one lady in a cubicle in the European Union or a development team of thousands at Microsoft.

Iteration matures software.

:{> Andy

SSIS for DBAs

Solid Quality Mentors is now offering a course entitled SQL Server 2005 Integration Services for Database Professionals.

I was honored to work with Erik Veerman to develop this SSIS for DBAs course! Our goal is to provide training in SSIS's non-ETL capabilities - stuff that is useful for Database Administrators.

Although it is an amazing ETL engine, SSIS is more than an enterprise ETL platform - it has lots of capabilities built especially to assist DBAs in the Production environment. In the course, we introduce the SSIS development environment and SSIS to folks who may have never opened Business Intelligence Development Studio.

Next, we cover the basics of SSIS - walking through capabailities of the Control Flow, Data Flow, Event Handlers, Variables, Properties, and Expressions.

We then get busy with Transfer Tasks, Import and Export Wizards, and Maintenance Plan development. Our next section focuses on using SSIS to perform more advanced DBA tasks - building SSIS packages that automate FTP, flat file data extraction and loading, and file archiving operations. We cover optimization, data cleansing, text mining, and binary data. We also dive into WMI, File watching, and Notifications - there's even an optional section on migrating DTS!

We then address SSIS administration, deployment, security, package configurations, logging, modular package design and team development. We cover restartability, snapshots, and transactions, and conclude with a section dedicated to troubleshooting.

Material is presented, then demonstrated. Students then perform lab exercises to reinforce the presented and deomnstrated concepts. It's a great way to learn - especially in a rich visual environment like Business Intelligence Development Studio.

As if all that wasn't enough, the course is led by Solid Quality Mentors! These are folks who have been there and done that - database professionals that are published, MVPs, or both!

If you're interested, contact Jeanne Reeves at Solid Quality Mentors.

:{> Andy

Technorati Tags: SSIS DBA SSIS for DBAs Database Professionals Solid Quality

Meltdown!

A couple days ago the Vista Ultimate instance on my laptop when all Klingon on me: it was "a good day to die."

I'll never know why for sure. Indications point to COM+ and VMM giving up the ghost. They were good systems, may they rest in peace.

I tried to revive the old OS. It would run in Safe Mode and even Safe Mode with Networking, but that's just not the same as having all the functionality I know and love.

I've spent the last couple days (and nights) rebuilding a second instance of Vista Ultimate on the same machine. I'm about half done at this point. Today is SQL Server instances and Visual Studio Team System day.

It's not just the installs, there's the service packs and updates after the installations. Lots of installing.

But it's also an opportunity to rebuild the machine with a different configuration.

Back to installing...

:{> Andy

Technorati Tags: Vista Re-install

Raleigh Code Camp - tomorrow!

I'm looking forward to speaking at the Raleigh Code Camp tomorrow!

I'll be presenting on Team Edition for Database Professionals and Incremental Loads with SSIS. It going to be fun!

If you're atending tomorrow and read this blog, please introduce yourself!

:{> Andy

Technorati Tags:

Back in the Saddle...

Monday, after a five-month hiatus, I return to SSIS training.

I really enjoy training whether I'm attending or leading it. It killed me last week to miss both Tech Ed and the Richmond .Net Users Group June meeting, but a client needed me on-site and I try to never leave a client hanging.

I roll out around 6:00 AM tomorrow to head for the airport, and it's 1:40 AM as I type this - another day when it's good to not need sleep! :)

To the good folks at New Horizons in Edina, MN: I'll see you Monday!

:{> Andy

Technorati Tags: SSIS training Minneapolis MN

SQL Server 2008 CTP Available!

The June CTP of SQL Server 2008 (the database server formerly known as Katmai) at Microsoft Connect!

Registration is required. You must also complete a three-question survey.

:{> Andy

Technorati Tags: SQL Server 2008 Katmai CTP

Managing The Thing You Cannot Touch

Yesterday I wrote about The Thing You Cannot Touch. Today I'm going to tell you some ways to manage the situation.

First, try to determine why You Cannot Touch The Thing. This is invaluable information in charting the waters ahead - especially if you're consulting.

Second, accept the fact that there's better than a 90% chance that you will not, in fact, be allowed to Touch The Thing. In my experience, three things must be true for you to overcome the business friction imposed by The Thing:

  • You have to try everything else first.
  • Everything else must fail to sufficiently address the issue.
  • The source of the issue must be mission-critical.

Regardless, your best knee-jerk reaction is acceptance. This is tough for a professional. In your heart of hearts you know what it takes to solve the real issue. And yet, you've been told You Cannot Touch It.

The good news? There's also a better than 90% chance you can find a way to solve the issue - or at least alleviate the client's pain - without Touching The Thing.

Modern enterprise applications are comprised of lots of moving parts. The Thing is probably not the sole source of pain. Addressing other bottlenecks may do the trick - at least for now.

And, if you're the person they called last time they had an issue and you solved it (and weren't "difficult" to work with), you'll likely get the call next time.

How cool is that?

:{> Andy

Technorati Tags: Consulting Software Development Satisfying The Customer Leveraging New Business

The Thing You Cannot Touch

I have this theory about consulting. I call it The Thing You Cannot Touch. Since a few friends have found it amusing I thought I'd share. It goes like this:

A potential client contacts your firm. A conference call is arranged to discuss the issue. During the call, the issue is defined. Resolution theories and attempts to date are shared, along with their results. The current status is explained - along with

The Thing You Cannot Touch.

Sometimes an attempt at justification accompanies the announcement: "We know it can't possibly be _______ so we're not going to waste any time looking at it."

Other times, it's just put out there for what it is: "You can't touch _______."

My experience has shown the heart of the issue almost always lies with The Thing You Cannot Touch. It needs to be fixed but someone, somewhere, for some reason does not believe it to be so - and so it Cannot Be Touched.

Sometimes it's political - It's someone's "baby". They built this application just ten short years ago - worked nights and weekends and toiled and sweated and bled to make it work - and rode it all the way to CIO, after all. Who are you, lowly consultant, to tell them VB 6 code should be re-written in this new fad known as .Net? Doesn't Vista support VB 6 until the mid-20-teens?

Sometimes the decision-maker doesn't understand the differences in the technologies.

Sometimes it's a purely market-driven business decision - and the decision-maker is right and justified in choosing to keep hands off The Thing. It's not all about technology folks... it's sometimes about what I like to describe as the (little "s") software (big "B") Business.

If you find yourself on a consulting conference call and The Thing You Cannot Touch comes up, pay attention. Tomorrow I tell you how to Manage The Thing You Cannot Touch.

:{> Andy

Technorati Tags: Consulting Software Development Thing You Cannot Touch Old Code Outdated Code VB 6

Updating the Virtual Team Foundation Server document

Talk about overdue... I'm finally updating the Virtual Team Foundation Server documentation at VSTeamSystemCentral.com.

There are 163 pages out there now that demonstrate the procedure I use to build a vTFS but they were written for the December 2005 CTP of TFS. A couple things changed - not much mind you: I think the biggest change is less permissions (not a member of local administrators) for the TFSReports and TFSService accounts. This means the document is ok as far as functionality is concerned, but it's always best to follow the principle of least privilege.

I'm finishing up some writing and a project in the next couple weeks. Adding some content to my blogs and VSTeamSystemCentral.com is one priority. I have about 35 blog posts in my \Andy\Blogs\Primordial folder just waiting to be posted - most of them at Applied Business Intelligence in a series I'm calling SSIS Design Patterns.

I really enjoy having too much work to do - I like it a lot more than the alternative. But I'm also looking forward to doing more work around the house as Wee's birth approaches.

:{> Andy

Technorati Tags: Team System Team Foundation Server SSIS Design Patterns Business Intelligence Wee Leonard

SSIS Design Patterns Series

On Applied Business Intelligence I've started a new series called SSIS Design Patterns.

The first in this series is now posted: Dynamic SQL.

:{> Andy

Technorati Tags: SSIS Dynamic SQL Design Patterns

A Green Box

It's been way too long since I posted a blog post - my apologies! I've started a bunch of posts (mainly so I wouldn't forget the idea on the top of my noggin), but nothing complete enough to turn into the wild.

I've been swamped on a consulting gig. It's a good gig - just intense. Since I started doing lots of SSIS training for Solid Quality, I had this idea it would be good to do a few weeks of consulting every now and then - just to stay sharp.

After battling a particularly "interesting" requirement, I finally got this:

Most of you reading this are developers. You know why I'm posting - it's the 11th hour of a 12-hour day. And yesterday was a 12-hour day too. But tomorrow is a really long day, but it's travel-home day and Stevie Ray's P.E. and Show-and-Tell day. His teacher tells us that for the past six weeks, Stevie's Show-and-Tell item has been the same: "Dada's coming home tonight!" Heart-warming and -breaking, all at the same time.

So this is a celebration. Houston, we have a green box.

:{> Andy

How do you say "SSIS" in Mandarin?

This is cool - Professional SQL Server 2005 Integration Services has been translated into Mandarin!

:{> Andy

Technorati Tags: SSIS Integration Services Mandarin Chinese

I will present SQL Server Tips and Tricks 8 Feb 2007

After the Freezing Redneck Tour 2007 wraps up this week, I'm looking forward to the next meeting of the Richmond SQL Server Users Group.

I've decided to present on SQL Server Tips and Tricks. I have three topics in mind:

  • SqlClr
  • An Introduction to Incremental Data Warehouse ETL with SSIS
  • A surprise topic!

Trust me, if you work with SQL Server data warehouse ETL you will like the surprise. ;)

Hope to see you there!

:{> Andy

Technorati Tags: Developer Community Richmond SQL Server Users Group SqlClr Incremental ETL

A couple changes!

I've started a new blog: Applied Business Intelligence!

I will continue to blog here about Team System topics. I'll probably continue to share personal stuff here as well - I'm debating that...

I've also changed my login here at VSTeamSystemCentral.com. I'll no longer be posting as that dry and boring "admin" guy - now I'll be posting as me!

:{> Andy

Technorati Tags: New blog Applied Business Intelligence BI SSIS ETL Reporting Services

The Freezing Redneck Tour - 2007 Rolls On!

The Freezing Redneck Tour - 2007 continues. In Week 2, I'm off to Minneapolis for an SSIS training course.

Since I started traveling regulary, I've been checking out different airlines - just to see what the differences are. I don't have enough data to make any determinations yet, but I see an interesting trend: a lot of the major airlines subcontract to smaller carriers. I see it with a flight advertised with Delta, for instance, but with a sub-heading that says something like "Operated by Fly-Me-Please Airlines."

It looks like the boarding for my connector is beginning - on time this time! :)

:{> Andy

Technorati Tags: Solid Quality Learning SSIS Training Minneapolis

SSIS Raw File Reader Review

As promised in an earlier post, I've tested the SSIS Raw File Reader released by Simon Sabin this past week.

Here's how I tested it:

First, I start a new SSIS project. I rename the package RawFileGen.dtsx. I add a Data Flow Task to the Control Flow as shown:

I double-click the Data Flow Task to edit it and add an OLE DB Source. I double-click the OLE DB source to edit it and aim it at the AdventureWorks.HumanResources.Employee as shown:

I add a Raw File Destination and configure it to dump the results to a file as shown:

I check the Input Columns to see if all are selected - I want a good test:

I click OK and press the F5 key to execute the package in Debug Mode:

I open the file generated in NotePad - not very legible:

I fire up the SSIS Raw File Reader:

I have to click File|Open and navigate to the file to view the columns:

After that, clicking Tools|Read File loads the data:

And this is a lot easier to read than the Notepad version!

I like it. Good work, Simon!

:{> Andy

Technorati Tags: SSIS Raw File Raw File Reader

Read Variable Value From a Flat File In SSIS

I recently saw a post on MSDN forums about loading a date value from a flat file into an SSIS variable. I thought I'd document one way to do it - I don't claim this is the best way, but it is one way that works.


First, I created a file named C:\FileDate.txt Download the File! and put the date 1/12/2007 in it.

Next, I created a new SSIS package and renamed it VarFromFile.dtsx Download the File!. I dragged a Data Flow task onto the Control Flow.

Double-click the Data Flow task to edit it. Drag a Flat File Source onto the Data Flow:

Double-click the Flat File Source to edit it. Click the New button to create a new Flat File Connection Manager:

I gave the Flat File Connection Manager the name FileDate, added a Description, and set the File name to C:\FileDate.txt:

Next, click the Columns item on the left to view the Row and Column delimiters and contents of the file:

Click OK to close the Connection Manager editor. The FileDate Flat File Connection Manager we just created is visible in the Flat File Connection Manager combobox:

Click OK to close the Flat File Source editor. Click the Control Flow tab. Right-click in the white space of the Control Flow tab and click Variables from the menu:

Create a new variable by clicking the New Variable icon (upper left). Name it vdtFileDate and configure the properties as shown:


Note: You cannot change the scope of the variable in the Variables window. Scope is controlled by the object that had focus when you created the variable - in this case, it was the Package.

Next, return to the Data Flow by either double-clicking the Data Flow Task or clicking the Data Flow tab. Drag a Script Component onto the Data Flow. You will be prompted to select the function of this script component (Source, Destination, or Tranformation). Choose Transformation:

Connect the data path (green arrow) from the Flat File Source to the Script Component:

Double-click the Script Component to open the editor. On the Input Columns page, select Column 0:

On the Script page, enter vdtFileDate into the ReadWriteVariables property:

Click the Design Script button to open Microsoft Visual Studio for Applications and perform the following edits:

  • Beneath the Inherits UserComponent line add Dim myDate As Date
  • In the Input0_ProcessInputRow subroutine add
    With Row
    myDate = CDate(.Column0.ToString)
    End With
  • After the End Sub for the Input_ProcessInputRow subroutine, add a new subroutine:
    Public Overrides Sub PostExecute()
    Me.Variables.vdtFileDate = myDate
    MsgBox(Me.Variables.vdtFileDate.ToString)
    End Sub


IMPORTANT: Do not leave the MsgBox command in deployed code. It will halt execution at this point. The MsgBox is here only to display the variable value has, in fact, been read from the file!

Execute by pressing the F5 key or clicking the green "Play" arrow on the SSIS IDE toolbar. You should see the results in a message box:

I'm certain there are better ways to get a variable value from a flat file. Please comment if you know one!

:{> Andy

Technorati Tags: SSIS Variable File

Simple "Changed Rows" SSIS Conditional Split Expression Generator

When building a dimension load data flow for SSIS ETL, I want to detect changed rows using a Conditional Split Transformation.

To demonstrate, I built a generic package:

The Lookup outer joins to the destination table and returns the surrogate key. If this returns a NULL, the record is new. But what if the row is there and there's no good way to tell it's been modified? You have to compare each and every column in the source and destination rows.

I find it painful to type all that out, so I have created this script which works well if:

  • The column names in the source match the column names in the destination.
  • A consistent aliasing convention is used for the Destination columns (here, I have aliased all my destination columns by adding the prefix "DW_" to each column name).

I just pop it into SSMS, execute it, copy the results to the clipboard...

... and then paste them into the Changed Rows condition of my Conditional Split transformation:

Voila! With some modification, it could do even more.

Here's the script:


declare @SourceServer varchar(255)
declare @DestinationServer varchar(255)
declare @SourceDB varchar(255)
declare @DestinationDB varchar(255)
declare @SourceSchema varchar(255)
declare @DestinationSchema varchar(255)
declare @SourceTable varchar(255)
declare @DestinationTable varchar(255)
declare @Sql varchar(8000)
declare @Output varchar(8000)
declare @DestinationPrefix varchar(25)

set @SourceServer=''
set @DestinationServer=''
set @SourceDB = 'Stage'
set @DestinationDB = 'DataWarehouse'
set @SourceSchema = 'Stg'
set @DestinationSchema = 'DW'
set @SourceTable = 'Table1'
set @DestinationTable = 'Dimension1'
set @DestinationPrefix = 'DW_'

set @Sql = 'USE tempdb;
if exists(select *
from sys.objects
where name
like ''##tmpSourceFields%'')
drop table ##tmpSourceFields;

use ' + @SourceDB +
';select c.name
into ##tmpSourceFields
from sys.columns c
inner join sys.tables t on t.object_id
= c.object_id
inner join sys.schemas s on s.schema_id
= t.schema_id
where t.name = ''' + @SourceTable +
''' and s.name = ''' + @SourceSchema
+ ''';'

--print @Sql
Exec(@Sql);
set @Sql = '';

set @Sql = 'USE tempdb;
if exists(select *
from sys.objects
where name
like ''##tmpDestinationFields%'')
drop table ##tmpDestinationFields;
use ' + @DestinationDB +
';select c.name
into ##tmpDestinationFields
from sys.columns c
inner join sys.tables t on t.object_id
= c.object_id
inner join sys.schemas s on s.schema_id
= t.schema_id
where t.name = ''' + @DestinationTable
+
''' and s.name = ''' +
@DestinationSchema + ''';'

--print @Sql
Exec(@Sql);

set @Output = ''
select @Output = @Output +
'(' + s.name + '!=' + @DestinationPrefix + d.name + ') || '
from ##tmpSourceFields s
inner join ##tmpDestinationFields d on
d.name = s.name;

set @Output = @Output + 'False';

select @Output;

:{> Andy

Technorati Tags: SSIS Expression Changed Rows T-SQL script

Ordering OLEDB Source Adapter Output

There are a couple approaches to ordering the rows delivered by an SSIS OLEDB source adapter.

First, open an SSIS package and add a Data Flow Task to the Control Flow. Open the Data Flow to proceed.

Approach 1 - Inline sorting using the Sort transformation

Configure the OLEDB source adapter to return all rows from a table:

Add a Sort transformation to the data flow and connect the OleDB source adapter to it as shown:

Double-click the Sort transformation to edit it. Select the fields you wish to sort on, in order, and specify ascending or descending sort order:

The problem with this approach is it can slow things down quite a bit if there's lots of data in the table you're sorting.

Approach 2 - Load the data sorted from the source

Configure the OLEDB source to use a SQL Command. Include the desired sort order in the Order By clause as shown:

Click OK to close the OLEDB source adapter editor.

Right-click the OLE DB source adapter and click "Show Advanced Editor...":

Navigate to the Input and Output Properties tab. Click on "OLE DB Source Output" and set the IsSorted property to True as shown:

Next, expand the "OLE DB Source Output" node and the "Output Columns" folder beneath, and click on the desired sort columns.

Set the SortKeyPosition property to indicate both direction and sort order. Direction - ascending or descending - is indicated by the sign of the number (negative = descending, positive = ascending). Sort order is indicated by the value of the number.

Therefore, a SortKeyPosition of -1 indicates [ExpYear] is the first field listed in the Order By clause, and is sorted descending:

Similarly, a SortKeyPosition of 2 indicates [ExpMonth] is the second field listed in the Order By clause, and is sorted ascending:

This method is preferable over the first for performance and scalability.

:{> Andy

Technorati Tags: SSIS Order By Ole DB Sort

SSIS Raw File Reader

Simon Sabin has released an SSIS Raw File reader. What a great idea!

I haven't had an opportunity to tinker with this yet, but I plan to test it later this week.

:{> Andy

Technorati Tags: SSIS Raw File Reader Simon Sabin

2006 - the Year in Review

This is probably my last post of 2006. It's been a good year. Not perfect, but very good.


SQL Server 2005 got lots of traction in the industry. Most SQL Server technologists I know agree five years was a long time to wait for a new release, but the feature set matches or exceeds the development effort.

Most shops I deal with have either migrated, are testing 2005, or have plans to in 2007.

SQL Server 2005 Service Pack 1 was released and Service Pack 2 is on its second CTP.

Team Edition for Database Professionals - aka Data Dude - went from CTP1 to RTM in six months. Very impressive development cycle!


It's been a good year for the Richmond Developer Community.

We started a new SQL Server Users Group, which is now the official PASS chapter for Richmond, VA! We also held two successful MSDN Code Camps - and the leadership team is planning more for 2007.

Speaking of leadership, the team did an outstanding job in 2007 - thanks to all who led and participated at every level! You folks rock!


Personally, it's been a good year too.

Christy and I bought a house in Farmville, VA - completing our move from Jacksonville, FL back home to Virginia.

We recently learned we're going to be parents again! :)


Business-wise, it's also been a cool year.

I moved from a temp-to-perm position to a permanent consulting gig, and was then recruited by Solid Quality Learning! The relationship with Solid Quality allows me to be an independent consultant. It's nice to be working for me again, although my boss is sometimes a jerk... ;)

I learned a couple difficult lessons as well. Without going into detail, suffice it to say this year affirmed my long-held business standards regarding the importance of integrity, loyalty, and trust. At my age and with my experience with people and in the industry, I am not often surprised by people - but I was surprised this year. My lovely bride Christy has an applicable saying about such times: "Good judgment comes from experience, and experience comes from bad judgment." Amen. I believe it is best to always treat people as you want to be treated because you never know...

I also experienced new levels of trust and respect. I worked with an incredibly talented team on a cool project. Loyalty was a hallmark of our experiences on the team. The result? Against seemingly insurmountable odds and obstacles, both internal and external, we succeeded - and made it look easy! My experiences at Solid Quality Learning have underscored the value of loyalty and integrity in all we do. The professionals that lead this company are at once the most talented, intelligent, down-to-earth, humble, and open people on the planet. It is an awesome honor to be part of this organization!

I was honored several times this year:

  • one of the authors of Professional SQL Server 2005 Integration Services (Wrox)
  • allowed to participate on the leadership team for the Code Camps
  • honored to lead the Richmond SQL Server Users Group
  • honored to lead the Richmond .Net Users Group
  • nominated for MVP
  • honored to deliver the Team Edition for Database Professionals keynote at the Philadelphia Launch Event
  • honored to be invited to Redmond several times to participate in TAP and certification discussions
  • honored to work with a fantastic team to develop an industry-changing application (which I cannot talk about!)
  • honored to be asked to join Solid Quality Learning as a mentor

I don't do resolutions, I merely set goals for the forseeable future. I was able to accomplish two of three goals I set at the end of last year. I find three is a nice round number for goals - and I am working on my three goals for 2007 this last afternoon of 2006.

Here's to 2007 - may you have a safe, prosperous, and happy new year!

:{> Andy

Technorati Tags: 2006 Year in Review trust Solid Quality Learning integrity new baby 2007

Out of Canada...

I'm on the way back to Farmville from Guelph this morning - with mixed emotions.

It will be great to see Christy, Stevie Ray, and Emma when I get home! I always miss them when I'm on the road.

But I also met some good people in Guelph. They were simply awesome to work with (and for). I believe I made some new friends.

It's always good to be able to "geek out" with people doing cool work. I'm very fortunate in that most of the people I work with (and for) are doing cool work. I love this job!

But it's even more cool when I have time to geek out over a couple pints at a good local pub before hitting the road - even if someone had to twist my arm. ;)

:{> Andy

Technorati Tags: Geek out pints pub friends

You learn something new everyday...

So....

Work finds me in Guelph (pronounced "Gwelf"), Ontario this fine evening. As I type this, I'm awaiting room service - pasta alfredo with chicken and mushrooms. Yum.

I almost didn't get out of the airport this afternoon. But I learned something very important about Canadian Customs: they don't care one whit for (in my part of Virginia, we'd say "they don't cotton to") Americans coming into their country to work! Who knew? Certainly not moi...

At the airport, I was handed a customs document to fill out. It had a couple checkboxes labeled "Why are you here? Pleasure, Business." I'm here to conduct an SSIS class, so I naturally checked "Business." Wrong answer!

After a bunch more questions: "Who do you work for? Myself. Who hired you? I subcontract for global virtual corporation. How many people work for your company? Just me. What kind of work is it? Training. What kind of training? Microsoft SQL Server Integration Services. And why did they call you to train them on this? I wrote part or this book last summer about it. Where were you on the night of June 21st?"

And the looks kept getting meaner...

I was asked to go sit in a waiting area while they "figured this out." I did. After about five minutes, the official returned to tell me "you are offering specialized training." To which I nodded "yes." "You are free to go," he said.

And go I did.

I went right across the street and rented the last Hertz car on the lot (apparently, if you're he last person to get in line at Hertz, they forego the usual "Which model would you like today?" question...). So, what do you know, I learned a couple new things today!

:{> Andy

Technorati Tags: Canada Customs Far from home

The Clean Break

For the first time since 2001, I find myself sitting behind the president's desk in the global headquarters of my own business!

The new venture is called Andy Leonard Technologies, Inc. and this my first full-time day on the new office.

I mostly perform work for Solid Quality Learning as a mentor. For those who are unfamiliar with S. Q. L., it's a fantastic company! Not only are the people industry-recognized experts, they're actually cool! They engineer the entire process of joining their ranks so that it's low-stress. It has allowed me to ramp up quickly - and for that I am very thankful.

Mentoring is a great concept - it's a hybrid between consulting and instructing. Here's how it works: I join teams for a number of days or weeks. While working together, we develop a specific set of objectives - usually to develop template projects, best practices, and establish a foundation for the working environment. Together, we build out example projects using the templates to demonstrate their effectiveness.

In addition to this, I'm also a trainer. When training, I lead excellent classroom-based instruction courses. I currently lead the ETL with SSIS course, but I am ramping up on more course material - hoping to lead others.

In my previous jaunt into business, I operated ASI. ASI specialized in industrial automation and integration. It was a lot of fun for me because it brought together several disciplines I enjoyed (and still enjoy!): engineering, electrical control systems design, and software development.

ASI started in 1995 when I wrote one of the first completely web-based Manufacturing Execution Systems (MES) called Plant-Wide Webs. Plant-Wide Webs started using dynamic HTML before DHTML was widely available, then graduated to ASP. Writing the application and running the business were cool experiences!

I learned a lot about business and myself. :)

Most of those lessons were learned the hard way. I remember looking at the checking account one day during my first few months of entrepreneurship and seeing $80 in there. I thought "I must've done something stupid." I was right, and this was the beginning of my understanding of business development.

When Solid Quality Learning called I was ready. I understood the risks of making the leap. I knew it would be a lot of hard work. But, unlike last time, this time I have a fantastic team supporting me - and outstanding business development support!

The person who deserves the most credit has to be Christy. Not only does she support this decision, she's actively involved - booking my flights, making hotel arrangements, and renting cars... she's awesome! She even jumps onto mapping software and talks me in from the airport to the hotel so I don't drive around lost my first night in a new town! (The car rental people always ask "Do you know where you're going?" and look at me funny when I say "No, but I'll find it!") Christy does this in addition to taking care of Stevie Ray and Emma without help from me (when I'm out of town or holed up in the office) - and she does it without complaining.

Thanks, Cutie. I couldn't do this without you!

It feels good to be back. So far, the new boss is treating me ok... but it's still early on the first day... ;)

:{> Andy

Technorati Tags: Andy Leonard Technologies, Inc. Self-employment SQL Server Solid Quality Learning SQL

Roll your own error-handler in SSIS

I was working on error handling with SSIS recently and came up with what I believe is a snappy way to address it. The solution presented below is partial. For one, I would encourage you to use a database table to house errors; for another, I would encourage you to store lots more data than merely the ErrorDescription field.

Error logging is crucial to troubleshooting and auditing efforts. If an error occurs in your SSIS package while it is executing production loads, transformations, or transfers; you will want to know as much as possible about it.

To demonstrate, create a new SSIS project named ErrorTest:

I encourage you to develop the practice of renaming packages as you create them. This will make your life simpler once you deploy:

I rename Package.dtsx to ErrorTestPkg.dtsx (don't change the extension):

When you rename a package the following dialog will appear:

Always answer this dialog "Yes".
Drag an Execute SQL Task onto the Control Flow:

Configure it (double-click or right-click and select Edit to open the editor) as shown below. Note any connection will suffice, so long as the SQL Server is running. Also note the SQL will generate an exception (intentionally):

Click OK to close the editor. Right-click the Task and select Execute Task to test:

The task should fail (as planned):

Stop execution and click on the Event Handlers tab:

Check to be sure the Executable dropdown is set to the ErrorTestPkg (the package) and the Event handler dropdown is set to OnError. Click the link to create a new OnError Event Handler for the package. From the Toolbox, drag and drop a Data Flow Task onto the Event Handler:

Double-click the Data Flow Task to edit it. From the toolbox, drag a Script Component transformation onto the Data Flow:

The Script Component can be configured as a Source, Transformation, or Destination. Select Source:

Since a Source has only outputs (a destination has only inputs, and a transformation has both inputs and outputs), you will need to configure the Output. Rename the generic Output 0 to ErrorOutput:

Click on Output Columns and click Add Column:

Rename the Column ErrDescription:

Edit the ErrDesription column's properties - change the datatype to String (DT_STR) and the length to 5000:

Add the ErrorDescription System variable to the ReadOnlyVariables property of the Script Component:

There are other variables you will add to your error handling script component. Remember variable names are case-sensitive, comma-separated, with no spaces in the list.
Click the Design Script button and add the following code snippet as shown below:


        With ErrorOutputBuffer
            .AddRow()
            .ErrDescription = Me.Variables.ErrorDescription
        End With


Some explanation: The name of the ErrorOutputBuffer was determined by the name you gave the Script Component Output earlier. When you changed the Output name to ErrorOutput, the script component's output buffer was changed to ErrorOutputBuffer.

To populate the buffer, you must add rows to it. Think of this as starting a new row in a table. If you're familiar with tables in Microsoft Word documents, you know when you start a new row it is empty until you populate it. The same is true here. You are creating a new, empty row in the output buffer to populate with data.

The final step is to load the row. Again, in your production-ready error event handler you will populate more columns in the output buffer than this one - this is for demonstration purposes only:

Next, drag a flat file destination onto the Data Flow and connect it to the Script Component as shown:

Note: You will likely want to store error data in a database rather than a flat file.

When you configure a flat file destination, you are prompted for which type of file. Delimited files are fairly simple to read - especially with few fields:

Select a location and name for your flat file. I chose C:\ErrorOutput1.txt:

Click Columns to view the columns the file will contain. Note: the columns would be empty if you had not connected a data path from the Script Component prior to configuring the Flat File Destination:

Click OK to proceed. Click the Mappings page to assign mappings between fields in the pipeline and fields in the destination:

Since you built the destination from the metadata contained in the pipeline, auto-mapping should occur when you click Mappings:

Click OK. Your Event Handler should appear as shown:

Start debugging the package by pressing F5 or clicking the Debug Run arow. Your ExecuteSQL task should fail as before:

Click on the Event Handlers tab to determine the run status of your Package OnError Event Handler. Double-click the Data Flow Task and note one row was written to your error file (ErrorOutput1.txt):

Open ErrorOutput1.txt file to view the error stored there:

In this example, we built a package to demonstrate logging package errors to a data destination - albeit a flat file. This technique can be used to catch errors and store them for troubleshooting posterity.

:{> Andy

Technorati Tags: SSIS OnError Event Handlers Logging

FAQ Friday

I was honored to be G. Andrew Duthie's guest today on FAQ Friday. (I know, "next time post something before the event, Andy.")

Thanks Andrew for asking to be on the webcast!

We talked about SQL Server Integration Services, Team Edition for Database Professionals, Team Foundation Server, and SQL Server 2005. We managed to get in some tips and tricks for the query window in SQL Server Management Studio, including viewing and executing SQLCmd statements in an SSMS query window.

FAQ Fridays rock!

:{> Andy

Technorati Tags: FAQ Friday SQL Server Integration Services Management Studio SQLCmd

RCC2-10 days: Countdown to Code Camp

Richmond Code Camp 2 approaches!
Have you registered?

Only 1010 (decimal, lest you bit-heads think I mean there are only 2) days remain until the second Richmond MSDN Code Camp! (That's 10102 days for youwe bit-heads.)

The schedule has been posted!

:{> Andy

Technorati Tags: Developer Community Code Camp Richmond, VA

Load a package variable with a dataset in SSIS

Occassionally in SSIS, you need to load a dataset into a package variable. To do this, first create a variable:

Next, drag an Execute SQL Tak onto the Control Flow canvas:

Double-click the task to edit it. Set the Result Set property to Full Result Set. Choose a Connection and enter some SQL:

Navigate to the Result Set pane and click the Add button to create a new Result Set mapping. Name the Result Set 0 and assign it to the variable you previously created.

This will populate the variable with an ADO.Net dataset.

:{> Andy

Technorati Tags: SSIS Variables DataSet

Free! (for 180 days...)

I regularly speak to folks who tell me they wish someone would give them an MSDN subscription so they could play with all the cool new technology. I sincerely hope every single person with this desire gets their wish - if not from an individual (as happened to me), from their company. An MSDN subscription is a cool thing.

Until then, I recommend folks do what I did: get the trial versions!

You can build yourself a handy little enterprise on a workstation that has 1G RAM and some hard drive space. It won't be fast, but you can learn cool things nonetheless. Here's how:

1) Download and install Microsoft Virtual Server 2005 R2 Enterprise - it's completely free (as in beer). With this snappy software you can create virtual machines on your workstation and install any operating system you desire. Use Virtual Server to do just that - build a virtual machine before proceeding.

2) Download the 180-day trial version of Windows Server 2003. Install this as the operating system on your new virtual machine.

3) Download the 180-day trial version of SQL Server 2005. Install this on your new VM.

4) Download the 180-day trial version of Visual Studio 2005. Install this on your new VM.

There you have it - a development virtual workstation that will allow you to learn and grow and try cool new things, for the next six months, at least!

:{> Andy

Technorati Tags: Developer Community VS2005 Visual Studio SQL Server SQL SQL2k5 Virtual Server MSDN Windows Server 2003 2005

Tuning SSIS

Elizabeth Vitt - along with Donald Farmer, Ashvini Sharma, and Stacia Misner - provide an excellent look inside the SSIS engine in this article: Integration Services: Performance Tuning Techniques.

:{> Andy

Technorati Tags: SSIS performance tuning

Donald Farmer is blogging again

Donald Farmer, Microsoft's Group Program Manager for SQL Server Business Intelligence and Integration Services, is blogging again!

Mr. Farmer is a legend in the business intelligence community. Even so, he's always made time to answer questions from this aspiring author.

His post entitled Tales of Two Bills is an interesting read.

:{> Andy

Technorati Tags: Developer Community Donald Farmer SSIS blogs

Odd Error in SSIS

I'm unable to find anything online about this, so maybe someone out there has seen something similar:

Sometimes, when attempting to execute an SSIS package inside the IDE, the package fails to execute and I see a momentary (second-tary, actually) flash of a command shell titled SQLDumper.exe.

It happened this morning when firing a package that reads data