Tuesday, December 1, 2009

Installing Oracle Enterprise Manager 10.2 on Windows Server 2008

One would suppose that installing OEM on Windows Server 2008 would be like installing it pretty much in any other Windows environment; Oracle did a pretty good job of making it easy to install and run out-of-the-box under earlier versions of Windows, so it should be easier with the latest version of OEM and Windows, correct?
Wrong. There are a variety of reasons, and we’ll run through them in this exercise, as we install Oracle Enterprise Manager 10.2.0.5 on Windows Server 2008 (NOT R2; this is important!).
As an added bonus, we’ll get the OEM repository database up to 11g.

Friday, September 4, 2009

An Introduction to SSIS - A Beginning Step-by-Step Tutorial

SQL Server Integration Services (SSIS) is a *really* powerful data transformation and import tool; it allows for all kinds of data manipulation, both between databases and within them.
The problem is that it’s not entirely intuitive; the learning curve is steep. But you really shouldn’t let that stop you from trying it out: once you’ve got the basics, it’s really quite accessible.
In this series of posts, we’ll do some basic, step-by-step data manipulation with SSIS, starting with importing data from a CSV file into a SQL Server 2008 database. We’ll move on to copying data between Oracle and SQL Server.
For more complicated data, bulk insert allows for some reasonably full choices. You can read about using it in my post here.

Importing data from a CSV file into SQL Server

SQL Server allows for a few ways to import data from a text file, most directly with the import wizard, which is a pretty accessible way to import uncomplicated data. This, by the way, uses SSIS in doing the import, though it wraps it all in a wizard.
SSIS, though, offers the most flexibility, both in terms of data source and destination, as well as what you’d like to do with the data as you’re copying it.

How do I get SSIS?

SSIS is included with SQL Server (non-express editions). It’s installed by default, and you can specify its installation specifically by selecting the “Integration Services” components of SQL Server when you’re doing the installation.
Note, by the way, that SSIS does not require a SQL Server instance in order to run.

Wednesday, August 5, 2009

ORA-29275 when Accessing a UTF8 Database with SSIS

So when I first started looking into SQL Server Integration Services (SSIS), I was told that the learning curve was steep, and that it was worth it to learn what you're doing with it. Truly said. SSIS presents a myriad of possibilities for data, and once you get your head around some of the terminology, creating simple transformations and data imports is a snap. But what about when the problems you encounter span two different products? What if one is Oracle? What if it's 64-bit, on Linux? UTF8? That's really what SSIS is for, and it's possible. But. Lots of Googling. Here's one roadblock I encountered in importing data from an Oracle database into SQL server, along with an unsatisfying workaround. But it does work, and it's easy. If you know of a better solution, I'd love to hear from you!

The Problem

So here's the problem in a nutshell: the Oracle database uses a utf8 character set. SSIS, when connecting with either the OLEDB or ADO.NET data sources, would use something else. What, precisely, I'm unable to discern. I can say that the Unicode setting was set to true in the data manager. This was manifest by a startling Oracle error during the load from the data source: ORA-29275, which is a "partial multibyte character" error. This means that the data doesn't fit the database's character set, which (one assumes) is terrible: such data is almost by definition corrupted, and getting it back reliably is a tricky proposition. Oracle says, basically, that you've got bogus data when you see this error. I was prepared to believe that, as this error occurred even in a simple select statement from the DB server itself.

The Clue

The curious thing about this situation is that, in trying to figure out what was going on, another user had logged into the server using a different OS username. When he connected to the database using the same Oracle user ID, he didn't get any errors. Aha. Environment. NLS_LANG, to be exact. Setting that to American_America.UTF8 took care of the error on the server, and on clients running SQLPLUS, to boot. All should be well, correct? No. The SSIS package continues to fail. Oh, yes: the registry. Don't forget that Oracle stores client NLS data there, as well: HKLM/Software/Oracle/$ORACLE_HOME/NLS_LANG Watch out for any dangling NLS_LANG settings in HKLM/Software/Oracle That surely will fix it, right? Sadly, it didn't, and a desperation reboot didn't help.

The Work-Around

So Google leads me to hints that ADO.NET and OLEDB from Oracle don't really pay much attention to the local NLS_LANG settings. That appears to be the case, or, at least, they don't get their settings from the same place everything else does. So, I return, sadly, to ODBC. And it works! It works well. But it's so non-portable, and, let's face it: ODBC is not anything new and shiny; it'd sure be nice to have all of our SSIS packages all new, self-contained, and .NET-ed. So if you, like me, run into this problem, know that ODBC can be your friend. If you, unlike me, know of a better solution, please let us know! I'll post updates as I encounter them.

Monday, August 3, 2009

Creating a Floppy Image in Windows

It's not too often any more that we need a floppy drive image created, but there are times (such as when accessing a server through iLO) when it's handy to have a virtual floppy drive.

There are a lot of shareware and commercial programs out there that will create a .img file from other files on your file system, but I had a hard time finding a free floppy image creation package. BFI (Build Floppy Image), thank goodness, still is around. It's a very easy-to-use floppy image creation command line tool that is fully free. 

It's old, and it's unsupported, but it works.
Rather than hosting the files here, I'll link to BFI's home page. If you find that the page or files are down, let me know, and I'll post it here. Turns out the home page link finally went away.  Here's a link to the download.

In short, what you do is put the files you want to write to your image in their own directory.
Here's an example of its usage. Say I want to create a floppy image file at c:\temp\myfloppy.img, containing all of the files in c:\temp\floppyfiles. The command I'd use to do this is:

bfi -f=c:\temp\myfloppy.img c:\temp\floppyfiles

That's it. Enjoy your new (free and legal) floppy disk image!

Monday, July 27, 2009

Installing Oracle on RHEL 5 (32 and 64 bit) - Part 3

In part one of this series, we got the operating system ready for the installation of Oracle. In part two, we got Oracle installed and running. In this, our final (for now) post on Oracle and Linux, we'll look at some of the tweaks that make it better, as well as some of the surprising bumps one encounters when using Oracle on Linux.

Sunday, July 26, 2009

Installing Oracle on RHEL 5 (32 and 64 bit) - Part 2

In part one of this series, we got the operating system ready for the installation of Oracle. In this post, we'll actually install Oracle and get it up and running. In part three, we'll look at some of the things you can do to make Oracle a bit more usable on the Linux platform. Oracle recommends using the GUI installer. I think they're right: it's the most accessible way to get Oracle installed. If you only have remote access to your system, and SSH is the only remote access you've got, you can set up VNC reasonably quickly to have remote GUI access to your system.

Thursday, July 23, 2009

Installing Oracle on RHEL 5 (32 and 64 bit) - Part 1

With the then-hyped Oracle Enterprise Linux rollout, and Ellison's evident disdain for Microsoft, you'd have thought that Oracle would go out of their way to make it straightforward to install and use Oracle database on Linux. It's not so, unfortunately. Not that it can't--or shouldn't--be done, mind you: it works great; you just need some persistence. This is part one of a three-part series on Oracle on Linux. This post looks at getting the OS ready for Oracle. Part 2 looks at installing the database software, and Part 3 talks about some of the things that can be done to make running and maintaining Oracle easier on Linux. Oracle has a document here that does a pretty good job of outlining the steps necessary to install Oracle on linux. I quibble with some of their instructions, particularly their directions to use the package rpms from the Oracle install CD. If they're going to go to the trouble of providing the requisite rpms, it seems like they'd also install them during the installation process, if they're needed. Instead, it seems like a *much* better option to install them from your repository (CENTOS or RedHat are most pertinent to this guide). They also have you using rpm, which is fine, but it won't find dependencies for you like yum will. In any case, I do recommend that document for additional information. It's my hope that this series will help navigate the installation process and make it easier. I've broken this into several posts so as to keep the length of each one a little smaller, anyway. In this post, we'll get the OS prepped and ready for the

Monday, July 13, 2009

ORA-00911 when writing a query for SSIS

Coming from the Oracle world, I'm in the habit of putting a semicolon at the end of all of my SQL queries. Not a good idea when you're writing an Oracle query for import/export in SSIS (SQL Server Integration Services).

The problem is that SSIS takes care of that for you, and you'll get an entirely unhelpful "ORA-00911: invalid character" error message.
Just remove that final semicolon, and you should be in OK shape.

If you find yourself needing to do multiple SQL statements in one execute SQL task (for instance), you can use the GO separator instead of semicolons.

Note that GO has to be on its own line:
select 'this is sql statement 1' from dual
go
select 'this is sql statement 2' from dual
go

For the curious, GO is a SQL Server-specific batch keyword that is used to separate different SQL batches. It wouldn't normally be something you'd consider using in an Oracle query, but it works in this case.

Friday, May 15, 2009

Converting a Physical Linux system to a VMWare VirtualCenter VM

This is a daunting task. At least, it is until you figure out how to do it. Once you've got the steps, it's quite simple, and relatively quick. We'll be importing a physical Linux (CENTOS 5) server -- using IDE drives -- into a VMWare VirtualCenter-managed host. So immediately, one thing needs to be made clear: the tools we're using in this exercise aren't free. There are a variety of tools out there that are free, and I may get around to exploring those for this situation, as well. In the mean time, however, we're talking about VMWare Enterprise Converter 4 (v3 works, as well), which isn't available (yet, anyway) without cost. So enough of the fine print: let's get to it.

Sunday, May 10, 2009

Microsoft Office 2007 button menu not dislaying

A quick Google search will show that a few people here and there report instances in which the Office Button (the icon at the top-left-hand corner of Office 2007 applications) menu won't display when you click on it. If you do some digging, it turns out that you can navigate the menu with keystrokes, even though it's not appearing. The problem, it turns out, is with remote control software. We ran into this, and it was puzzling, both the problem and the fact that there isn't much out there that is easy to find (hence this post). We were using an older VNC (TightVNC 1.3.8, to be specific, with which I'm not enamored, anyway). It's unclear to me under what circumstances this occurs (we have many servers running that version of TightVNC, without exhibiting this problem), but using RDP (MS Remote Desktop) does clear up the problem, as does installing RealVNC.