Another Mike

  • Home
  • Archive

Install TOra with Teradata on Ubuntu

11/30/2010

In my previous post, I wrote about compiling TOra with Teradata . Unfortunately, there are a couple additional steps to take on newer Linux distributions, like Ubuntu.

I am still using the 13.10 libraries. You can download the RPMs from Teradata . Convert them to deb files using alien (simply sudo alien [rpm]) and install them using dpkg -i [deb file].

Configure and compile TOra. Add the --with-teradata flag to enable Teradata support.

Try logging in with TOra. If you get an error like "CLI2: ICULOADLIBERR(527): Error loading ICU libraries," make sure that the Teradata libraries have all of their dependencies met.

At the time of writing, the Teradata libraries still depend on libstc++5. This is an old library that is no longer distributed with Ubuntu. But you can grab a copy from the Debian archive . When a library is missing, it appears in ldd output like this:

$ ldd /opt/teradata/client/13.10/tdicu/lib/libicuuctd.so.36.0
 linux-gate.so.1 =>  (0x0076d000)
 libicudatatd.so.36 => /usr/lib/libicudatatd.so.36 (0x00d41000)
 libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x0023c000)
 libstdc++.so.5 => not found
 libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x00255000)
 libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00adf000)
 libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x0027b000)
 /lib/ld-linux.so.2 (0x00d24000)

Also confirm that the rpm scripts successfully added a few lines to /etc/profile. They should look like the following. Double-check the paths before using, then run source /etc/profile.

TD_ICU_DATA=/opt/teradata/client/13.10/tdicu/lib; export TD_ICU_DATA   # Added by tdicu 13.0 package
COPLIB=/opt/teradata/client/13.10/lib; export COPLIB # Added by cliv2 13.0 package
COPERR=/opt/teradata/client/13.10/lib; export COPERR # Added by cliv2 13.0 package

On the next login attempt, you may now get an error like MTDP: EM_GSSINITFAIL(235): call to gss_init failed.

I had to run TOra with strace to figure out that it was trying to load something from /usr/teragss, which was empty. This might be an error from the rpm conversion, but it is quickly fixed with:

sudo mkdir -p /usr/teragss/redhatlinux-i386
sudo ln -s /opt/teradata/teragss/redhatlinux-i386/13.10.00.04/ /usr/teragss/redhatlinux-i386/client

Lastly (with any luck), you'll need a tdgssconfig.bin file. This appears to be a binary version of an xml file shipped with tdgss, but I am unable to run the tdgssconfig executable myself. There are even more incompatibilities with libstc++. Instead, I simply copied this file from the vmware Teradata Express image. You can use this file too, or your DBA might be able to provide a more suitable version.

Copy it to /usr/teragss/redhatlinux-i386/client/etc.

Despite the hacking it takes to get it running, TOra actually works really well with Teradata. This process would be much easier on a Teradata-supported OS, but I like my Ubuntu. I'm sure they've got additional instructions somewhere, but this is how I managed to get it working as an outsider with no support.