SSIS: Why I’m Standardizing on ADO.NET Connection Managers

When connecting to a database with SQL Server Integration Services, you will most likely use ADO.NET, OLE DB, or ODBC.  Until I find reason not to, I’ll be standardizing on ADO.NET connection managers as much as possible.  Even if the other database, such as mySQL, has only an ODBC connection, I’ll use ADO.NET instead and wrap that around mySQL’s ODBC connector.  My reason for this is simple:  I use a lot of script tasks and script components in my SSIS packages.  It is far easier to work with connection managers in script tasks/components when those connection managers are ADO.NET.  Consider the following:

  • OLE DB and ODBC, from what I can tell, do not enlist the current transaction.  What this means is that if you, for example, have an Execute SQL Task that starts a database transaction (assuming the database connected to supports it), the script task/component will not handle it’s steps in that transaction.  The most common occurrence is your package crashes.
  • OLE DB and ODBC when used in the script task/component do not support the “Retain Same Connection” setting. 
  • The code to acquire an OLE DB connection is not as elegant as the ADO.NET connection.  This is the number one reason why I am standardizing on ADO.NET.

I’ll have more to say on the third part later on – which is the most important to me.  Now that Microsoft has finally fixed the Script Component such that you can debug into it starting with SQL Server 2012, the Script Component is now very useful.

JamesNT

Why Windows Server 2003 Will Be Around A While Longer

Hello, Everyone.

It’s been just over a year since my last post on my blog.  Things got really interesting last year both on the professional and personal fronts.  As time moves on, I’ll discuss many of those things here.  To start off 2015 with blog posts, I thought I would cover something I’m seeing a lot of that we saw last year:  The end of support for a major Microsoft product.  Last year it was Windows XP.  This year, it’s Windows Server 2003.

There have been lots of articles on the web recently about the end-of-life of Windows Server 2003.  Like its little brother, Windows XP, Windows Server 2003 is to have support completely and permanently removed by Microsoft unless you are willing to pay Microsoft some additional money to extend support.  For more information on the Windows Server 2003 lifecycle, as well as the lifecycle of other MS products, visit the Microsoft Product Support Lifecycle page.  The problem I have with most of these articles is they generally fall into two categories:

  • People just don’t want to move; therefore, are being irresponsible.
  • It’s the economy, stupid!

But there is a third reason that I have seen and this third reason is more prevalent that any of the previous two mentioned above, in my opinion, as to why so many are delaying their migration off of Windows Server 2003:  Because there are still lots of applications out there that still will not run on more modern versions of Windows.  Especially applications written in VB6.

Windows Server 2003 is the last server operating system that will comfortably run VB6 applications without much fuss.  Once you hit Windows Server 2008 it’s pretty much game over for those applications.  While Microsoft does offer limited support for VB6 all the way through Windows 8.1, the problem with every VB6 app I have seen is that they break so many development rules that getting them to run on any version of Windows past Windows Server 2003 is practically impossible.  More modern versions of Windows have higher security standards and so forth that just won’t allow an errant application to do whatever it wants.  I realize that Microsoft has tools available to help with these things, but the point stands that getting many older applications to run on newer versions of Windows is painful, expensive, and the application may yet run less stable than before.

Some of you may wonder aloud why a company would still be on an application written in VB6 or, at the very least, old enough to not run on later versions of Windows.  Because moving line-of-business applications is HARD.  I’ve done this before, am in the process of doing it now, and I can tell you it is HARD.  Please consider the following:

  • Many line-of-business applications today are much more expensive than they were years ago.  A great example is the healthcare arena.  Practice Management and Electronic Medical Record systems that cost ~$5,000 10 years ago are well over ~$20,000 today.  That’s a big jump and most certainly hard to swallow.  One can’t help but wonder how many other applications cost more today than they did yester-year.
    • Along this line goes lack of expertise.  Just because you are on version 1.x of a software and need to go to 12.x doesn’t mean it’s easy.  You may need to phase your upgrades across virtual machines and so forth.  For example, what if the line-of-business software requires a different version of a database when going from Server 2003 to Server 2012 and you have to convert data?  What if the line-of-business application changed databases entirely (e.g. going from Advantage database to SQL Express)?  Who is going to handle all that?  Consultants with that kind of skill can cost a lot of money.  Congratulations, you just doubled the cost of your upgrade.
  • Moving to a new version of a line-of-business application may involve massive re-training.  With new features and changes to the user interface, staff may have to learn their way around all over again.  A good example is the big change from Office 2003 to Office 2007 with the advent of the Ribbon.  Personally, I love the Ribbon in MS Office, but nonetheless it required lots of retraining.
  • Your line-of-business application vendor may not exist anymore.  A lot of companies have gone bankrupt thanks to the housing crash of 2008.  Your company may have to switch line-0f-business application vendors entirely and that is a whole new ball of wax.

I could go on but you should see my point by now.  Even companies with very strategic plans on handling IT and software deployments are finding themselves in a crunch with Windows Server 2003.  Microsoft may find itself selling some extended contracts for many.

It may be time to be a bit more forgiving towards those that are still on Windows Server 2003 for a bit longer.  And, if you are a consultant familiar with older technologies and their newer counterparts, it may be time to start a new advertising campaign.

JamesNT

SSIS: Why You Should Use Temporary Tables

There seems to be some debate about the use of temporary tables in SSIS. I, for one, highly recommend using temporary tables rather than trying to pull data from different sources straight into your database production tables. Consider the following:

  • You are pulling data across a VPN connection when the connection suddenly fails. Perhaps a router failed or something, but now you are stuck with a partial pull.
  • There is some type of unexpected corrupt data that causes your flow to error out. Again, you are stuck with a partial pull.

In the above situations you’ll now be stuck with production tables in a production database that have records that need to be cleaned out. At best, you’ll have to figure out which records made it and which didn’t and then make up the difference. By using temporary tables in your production database all you have to do is wipe out the temporary tables and then start over after figuring out what the error is – the idea being that once the data makes it into your temporary tables you now have full control and no longer have to worry about VPN’s going out or data needing to be changed or cleaned as all that has already been done.

So in your SSIS package you pull data over to your database into a series of temporary tables that might in face have the same structure as your production tables just with different names. Then you pull the data from your temporary tables into your production tables. Some even go as far as to have a separate database just for temporary tables which is perfectly fine.

Remember, when pulling data from other sources, especially outside sources, unless you have some ownership over said sources you control only half of the operation. You have no guarantees as to whether the source is reliable or the data is clean. Therefore, it is very likely your dataflow may be interrupted.

See my post on handling temporary tables in Access.

JamesNT

\MSExchangeIS Mailbox\Messages Queued for Submission is not making progress – Exchange 2010

If you get reports from users that their emails are stuck in either the Drafts or Sent Items box and are not being sent, you should run the Microsoft Exchange Troubleshooting Assistant. If you get the following error message from the assistant, check the free space of the drive that the Exchange Transport Role is installed on to ensure it has at least 2.5GB of free space.

Once you free up space, go to SERVICES.MSC and restart the Microsoft Exchange Transport Service. Email should start working again.

Note: If you receive this error on a SBS 2011 box, one of the best ways to free up space is to move the WSUS database to another drive. Instructions for how to do this for SBS 2011 can be found here.

JamesNT

The Dangers of Giving Vendors too much Power

Back in the 90’s I worked for Sonoco. The capital project I was on was to install a new maintenance management software in an entire division of the company in order to, mostly, bring down the cost of spare parts inventory. During this project, many ideas for costs savings came up. One of them was that vendor reps should maintain parts usage history and stock the parts we bought for them in the parts room for us. I voice my concerns but since I was just a kid in my 20’s at the time with no college degree, I was promptly ignored and told to shut up.

This turned out to be a monumentally horrible idea as I predicted. Here’s why:

  • Let’s assume your vendor is a good guy. He’s only out for the benefit of you, the client and he wants to keep you as a client. Well, obviously, the last thing he wants is for you to run out of parts otherwise your machines will go down and you’ll yell at him. So the vendor may decide that, just to be on the safe side, he may need to stock a few extra bearings here and a few extra sprockets there because “you never know when they might have a spike in parts usage and we need to be careful and plan for those things.”
  • Let’s assume your vendor is a bad guy. He’s about $600 behind on his sales quota for the month and right now he’s not necessarily out to benefit you. So the vendor may decide that, since he’s the one stocking your parts room and you’ll most likely never notice, he may need to stock a few extra bearings here and a few extra sprockets there.

This is the danger of giving vendors too much power over your stuff. It doesn’t matter whether the vendor is a good guy or a bad guy, you’re screwed either way.

JamesNT