Monthly Archives: October 2012

SSIS and Oracle All Your Non-options

Why do some things have to be so hard?

I have been asking myself that question for the better part of two weeks as I wrestle with SSIS 2008 R2 and getting data out of Oracle and into SQL Server.

It’s like the shell game, only with drivers.

Like, go native man!

Like anyone else working in SSIS and dealing with Oracle I started with the default drivers that ship with SSIS. Technically, they work. There are a couple of glaring caveats. They only work in 32 bit mode. Huge non starter on our 64 bit system. They are slow. I know that’s like saying the sky is blue, especially if you don’t have any context. Well I do have some context. Migrating packages from DTS to SSIS I’ve got historical run times and also did some test runs before actually converting the packages. The native 32 bit drivers were slower or just equal to the equivalent on the SQL Server 2000 box running the Oracle 8 drivers. They don’t return the proper metadata column data types. Everything comes back as a wide string a.k.a. st_wstr or varchar for you table creating types. Decimal(18,2)? Thats a varchar(50) for you. varchar(10)? You guessed it, varchar(50) should do it! This beyond anything else was probably the biggest problem.

No, only use what Oracle provides!

I decided to install the Oracle drivers. Let the pain begin!
First, you have to create an account on the Oracle Developer Network site. Really? I just need some drivers. I guess it could have been worse, like a sharp stick to the eye. You need to download the 32 bit and the 64 bit driver packs. Each one weighs in at 700MB compressed. They do include a ton of tools that I have no clue how to use, thats a bonus. Here is your sharp stick to the eye as you get to use of one of the worst installers in the history of installers. After about a dozen tries I finally found out the magic combination to get only the drivers cutting out about 1.3GB from being piled onto my server. Oh, and you get to do it twice. Next, as you look at where it put the drivers at you realize that each install is named client, client_1 and so on. No clue at all which is the 32 bit or 64 bit install bits. Get that figured out, you can go fix your borked path. The installer will gladly stick its path right at the beginning giving your hours of fun trying to figure out exactly what is broken. That is if your path isn’t already too long and it just skips this bit for you. And finally, you get to manually add a system variable pointing to your tnsnames.ora file usually stored in /app/<nt login>/11.2/client/network/tnsnames.ora

After all your hard work you are rewarded with Ole Db, ADO and ADO.Net drivers HUZZAH!
First thing I found out is the Ole Db drivers work as well as the native drivers as far as metadata is concerned. Performance was better. The ADO and ADO.Net do take it up a notch. You do get some additional metadata goodness from these drivers. I did get decimal and float types back but pretty much every string came back as st_wstr again. It would size correctly them that was nice. It did mean I had to add conversion from wide string to string. On a table with 86 columns and 64 million records this also was a bad combination. You do get to run in both 32 bit and 64 bit.

Use what random people on twitter recommend!

Well, not quite that bad. I posted a 14o character version of this post to the mighty #sqlhelp hashtag and lo’ my friend Merrill Aldrich (twitter|blog) and he simply said “Can you use the Attunity connector? #sqlhelp” Huh? When I did a search for just Attunity it brought me to their website http://www.attunity.com/ I didn’t see exaclty what Merrill was talking about. Doing a search for Attunity Connector brought me to the gold I’d been looking for http://www.attunity.com/products/attunity-connect/ssis-connectors-for-oracle-and-teradata. Apparently, Attunity makes connectors for Oracle and Teradata and releases them for F R E E. There are two versions currently 1.2 for SSIS 2008 R2 and 2.0 for SSIS 2012. The installer is rough but not Oracle rough. One of the nice things is installing the 64 bit drivers also installs the 32 bit drivers. Unless you have a problem with the installer and the 64 bit installer only installs the 32 bit drivers. After a few searches and a few more failed install attempts I found that you need to install the Visual C++ 2008 SP1 redistributable package. I only needed to do this on my server since I had Visual Studio 2010 already installed on my laptop. Once that was done the installer worked just fine. Except it really didn’t “install” everything. You still have to manually add them to your toolbox sidebar for data flows before you will see the source and destination connectors for Oracle. It’s totally worth it.

First off with a bang, all the metadata returned was 100% spot on. No more fussing with conversion steps or guessing what the data type should be. They are faster. Not by a small margin ether. On 50~ packages they were around 25% or more faster than the Oracle provided drivers. You still need to have a TNS names file you can’t use the machine name, port and service name directly. (that I know of)

And there was much joy to be had.

I do think it is sad that neither Microsoft or Oracle has a good solution to this issue. I’m glad Microsoft is supporting Attunity I wished they would ship them by default. As for Oracle, I know why Oracle developers and DBA’s get paid so much. If getting drivers installed was this hard I can’t imagine getting the whole database setup and going, ugh.

The Fundamentals of Storage Systems – Shared Consolidated Storage Systems

Shared Consolidated Storage Systems – A Brief History

Hey, “Shared Consolidated Storage Systems” did you just make that up? Why yes, yes I did.

For as long as we have had computers there has been a need to store and retrieve data. We have covered the basics of hard disks, RAID and solid state storage. We have looked at all of this through the aspect of being directly attached to a single server. It’s time we expand to attaching storage pools to servers via some kind of network. The reason I chose to say shared and consolidated storage instead of just SAN or Storage Area Network was to help define, broaden and give focus to what we really mean when we say SAN, NAS, Fibre Channel or even iSCSI. To understand where we are today we need to take a look back at how we got here.

Once, There Were Mainframes…

Yep, I know you have heard of these behemoths. They still roam the IT Earth today. Most of us live in an x86 world though. We owe much to Mainframes. One of these debts is networked storage. Way back when, I’m talking like the 1980’s now, Mainframes would attach to their storage via a system bus. This storage wasn’t internal the way we think of direct attached storage though. They had massive cables running from the Mainframe to the storage pods. The good folks at IBM and other big iron builders wanted to simplify the standard for connecting storage and other peripherals.

 

Who doesn’t love working with these cables?

You could never lose this terminator!

Out With The 1960’s And In with the 1990’s!

Initially IBM introduced it’s own standard in the late 80’s to replace the well aged bus & tag and other similar topologies with something that was more robust and could communicate over optical fiber. ESCON was born. The the rest of the industry backed Fibre Channel which is a protocol that works over optical fiber or copper based networks, more importantly it would be driven by a standards body and not a single vendor. Eventually, Fibre Channel won out. In 1994 Fibre Channel was ratified and became the defacto standard even IBM got on board. Again, we are still talking about connecting storage to a single Mainframe, longer connections were possible and the cabling got a lot cleaner though. To put this in perspective, SQL Server 4.2 was shipping at that point with 6.0 right around the corner.

High Performance Computing  and Editing Video.

One of the other drivers for Fibre Channel was the emerging field of High Performance Computing (HPC) and the need to connect multiple mainframes or other compute nodes to backend storage. Now we are really starting to see storage attached via a dedicated network that is shared among many computers. High end video editing and rendering farms also drove Fibre Channel adoption. Suddenly, those low end pc-based servers had the ability to connect to large amounts of storage just like the mainframers’.

Commodity Servers, Enterprise Storage.

Things got interesting when Moore’s Law kicked into high gear. Suddenly you could buy a server from HP, Dell or even Gateway. With the flood of cheaper yet powerful servers containing either an Intel, MIPS, PPC or Alpha chip you didn’t need to rely on the mainframe so heavily. Coupled with Fibre Channel and suddenly you had the makings for a modern system. One of the biggest challenges in this emerging commodity server space was storage management. Can you deal with having hundreds of servers and thousands of disks without any real management tools? What if you needed to move some unused storage from server A to Server B? People realized quickly that maintaining all these islands of storage was costly and also dangerous. Even if they had RAID systems if someone didn’t notice the warnings you could lose whole systems and the only people who knew something was up was the end user.

Simplify, Consolidate, Virtualize and Highly Available

Sound familiar? With the new age of networked storage we needed new tools and methodologies. We also gained some nifty new features. Network attached storage became much more than a huge hard drive. To me, if you are calling your storage solution a SAN it must have a few specific features.

Simplify

Your SAN solution must use standard interconnects. That means if it takes a special cable that only your vendor sells it doesn’t qualify. In this day and age, if a vendor is trying to lock you into specific interface cards and cables they are going to go the way of the dodo very quickly. Right now the two main flavors are Fiber Optics and copper twisted pair a.k.a Ethernet. It must also reduce your management overhead this usually means a robust software suite above and beyond your normal RAID card interface.

Consolidate

It must be able to bring all your storage needs together under one management system. I’m not just talking disks. Tape drives and other storage technologies like deduplication appliances are in that category. The other benefit to consolidation is generally much better utilization of these resources. Again, this falls back to how robust the software stack that your SAN or NAS comes with.

Virtualize

It must be able to abstract low level storage objects away from the attached servers allowing things like storage pools. This plays heavily into the ability to manage the storage that is available to a server and maintain consistency and up time. How easily can I add a new volume? Is it possible to expand a volume at the SAN level without having to take the volume off-line? Can other resources share the same volumes enabling fun things like clustering?

Highly Available

If you are moving all your eggs into one HUGE basket it better be one heck of a basket. Things like redundant controllers where one controller head can fail but the SAN stays on line without any interruption to the attached servers. Multiple paths into and out of the SAN so you can build out redundant network paths to the storage. Other aspects like SAN to SAN replication to move your data to a completely different storage network in the same room or across the country may be available for a small phenomenal add on fee.

If your SAN or NAS hardware doesn’t support these pillars then you may be dealing with something as simple as a box of disks in a server with a network card. Realize that most SANs and NAS’es are just that. Specialized computers with lots of ways to connect with them and some really kick-ass software to manage it all.

Until Next Time…

Now that we have a bit of history and a framework we will start digging deep into specific SAN and NAS implementations. Where they are strong and where they fall flat.

One Great Day And Mixed Feelings

If it happens two times then you know the first time wasn’t a fluke.

Today was my anniversary date for the SQL Server MVP award. I wasn’t expecting to be renewed. I was though. Three of my friends weren’t added to the MVP roster. All three of them have put in the time and work. If this was as simple of do X and Y get MVP it would be easy to say you didn’t do X enough or Y enough. That’s not the nature of an award.

a·ward verb (used with object)
1. To give as due or merited; assign or bestow: to award prizes.
dictionary.com

An award is given. Let me say that one more time. An award is GIVEN. You may have done enough to earn an award. That doesn’t guarantee you will be given it.

I deserved it!

I dare say many have deserved it and not been granted MVP status. I thought I was one of those people. In 2004 I did a ton of crazy traveling and promotion for SQL Server 2005. I was a user group coordinator for two user groups almost 2 hours apart from each other. I sacrificed a lot. I felt I was entitled to the MVP award. I had been passed over before but this time I deserved it. I didn’t get it. Was I mad? Did I feel a bit betrayed? You bet I did. Why should someone that hangs out in a user forum all day be more worthy than me? I had a hard time accepting that I was passed over, AGAIN. It changed me. It changed my outlook on things. I sat back and evaluated why I was giving so much of my time supporting a product, made by one of the wealthiest software companies in the world, FOR FREE? Eventually, I realized it wasn’t the product or the company. I was supporting my career,  my desire to learn more and the people around me who also just wanted to learn as much as I did. So, for the most part I got over it. I quit flinching every time I was introduced as an MVP or former MVP. I stopped getting angry every time someone would say “I was sure you were an MVP!” I stopped letting my world revolve around achieving MVP status. Even though many of my friends and colleagues were current or former MVP’s. I just put it aside. I said if all the work I did in 2004 wasn’t enough then I can’t imagine how much more I could do, what else I could give up to prove I was MVP material. I just kept doing what I loved to do, working with a product I was passionate about teaching what I knew and learning from others whenever I could.

Being happy for others.

Eventually, I just got really zen about it. I watched others get the MVP and I was always happy for them. My favorite was when Jen McCown (@midnightdba) got her award. I watched it live on DBAs@Midnight. I was so happy for her I cried. I cheered at the screen and realized just how awesome Sean can be sometimes. I had several conversations about how Jen “came out of nowhere” and was awarded “early” in her efforts. Had Jen been community driven as long as I had? No. Did she take a sabbatical to have a family? Yes. Did she F**KING CRUSH IT when she got back in the swing of things? Oh hell yeah. She started blogging, recording videos and speaking in 2008. In January of 2011 she was awarded. She didn’t write a few blog posts. she wrote HUNDREDS. She didn’t record a few vids she (and Sean) started a live show on fridays. She was just everywhere, for TWO YEARS SOLID. To say just just popped fully into her MVP in 2011 is a great injustice to the amount of work she put in. Did others work harder during that time than Jen? Maybe, but I couldn’t name them.

I Finally made it.

When I was awarded last year I was unbelievably fortunate to be surrounded by my friends and the community I support. I was, and am, extremely humbled to be an awardee. Today, when I hadn’t received my nod, I was ready to pull the MVP logo from my intro slide and give the best presentation I possibly could. MVP or no MVP I love what I do. I love teaching. I love community. If I don’t get renewed next year it won’t change a thing. I will still travel on my dime, give my time and do my best. If you think that is “lip service” then I am sad for you. If not being an MVP keeps you from doing the things you love then maybe you really aren’t doing what you love.

We are all human.

 

It’s not wrong to want the MVP award. Its not wrong to work towards that goal. If you think you earned it and didn’t get it, thats your fault. You aren’t alone in the “I should be an MVP” club. As a former member I know just how bitter it can make you sometimes. If you want to earn something, go get your Microsoft Certified Master. It shows you are technically one of the best with SQL Server. You don’t have to speak, blog, record videos or hang out on the technet forums for years hoping to be recognised. If you work your ass off for it and you earn it Microsoft hands your certification right over.

For those of you who haven’t been awarded yet, please don’t stop trying. More importantly, don’t stop giving to the community who appreciates it more than Microsoft ever will. Realize you change lives when you teach others. Your and theirs.

So, now that I’ve ranted and rambled about the MVP what is it? Again, Jen wrote it up well.