title: Can't get DBD::ODBC to work with DataDirect ODBC Driver Manager 7.0 - [DataDirect][ODBC lib] Specified driver could not be loaded (SQL-IM003)
body: <p>I'm trying to set-up PERL DBD::ODBC to use the DataDirect ODBC Driver Manager (7.0) that is provided with Informatica PowerCenter.  This is on a Solaris 10 Sparc64 environment.  We've had this working in the past with the 5.1 driver manager (on an sp32 server), but now running into problems since moving to this new version.  For all ODBC connections I get this error:</p>
  
  <pre><code>failed: [DataDirect][ODBC lib] Specified driver could not be loaded (SQL-IM003) at test_odbctd.pl line 19
  Can't connect to DBI:ODBC:tdedwprd: [DataDirect][ODBC lib] Specified driver could not be loaded (SQL-IM003) at test_odbctd.pl line 19, &lt;STDIN&gt; line 2.
  </code></pre>
  
  <p>I have tested the same connections using the "ssgodbc" tool provided by Informatica for testing and they work.  I can login and run queries.</p>
  
  <p>As an example, here's one of my Teradata connections as definied in odbc.ini (we're having the same problem with DB2, SQL Server, Teradata, Sybase, PowerExchange, etc).  <em>Don't ask why I have to hard-code the full driver path in this file instead of odbcinst.ini.  I couldn't get it to work and the Informatica standard is to hard-code it in odbc.ini so I don't want to affect our support from them.</em></p>
  
  <pre><code>[tddev]
  Driver=/opt/teradata/client/odbc/drivers/tdata.so
  Description=Teradata Development
  DBCName=teradata1
  DBCName2=teradata2
  MaxRespSize=65477
  DateTimeFormat=AAA
  EnableExtendedStmtInfo=No
  LoginTimeout=60
  </code></pre>
  
  <p>ldd output for the driver:</p>
  
  <pre><code>$ ldd /opt/teradata/client/odbc/drivers/tdata.so
  warning: ldd: /opt/teradata/client/odbc/drivers/tdata.so: is not executable
          libCstd.so.1 =&gt;  /opt/SUNWspro/lib/v9/libCstd.so.1
          libthread.so.1 =&gt;        /usr/lib/sparcv9/libthread.so.1
          libm.so.1 =&gt;     /usr/lib/sparcv9/libm.so.1
          libw.so.1 =&gt;     /usr/lib/sparcv9/libw.so.1
          libc.so.1 =&gt;     /usr/lib/sparcv9/libc.so.1
          libsocket.so.1 =&gt;        /usr/lib/sparcv9/libsocket.so.1
          libnsl.so.1 =&gt;   /usr/lib/sparcv9/libnsl.so.1
          libxnet.so.1 =&gt;  /usr/lib/sparcv9/libxnet.so.1
          libodbcinst.so =&gt;        /opt/powercenter/v951/ODBC7.0/lib/libodbcinst.so
          libddicu25.so =&gt;         /opt/teradata/client/odbc/lib/libddicu25.so
          libtdparse.so =&gt;         /opt/teradata/client/odbc/lib/libtdparse.so
          libicudatatd.so.46 =&gt;    /usr/lib/sparcv9/libicudatatd.so.46
          libicuuctd.so.46 =&gt;      /usr/lib/sparcv9/libicuuctd.so.46
          libCrun.so.1 =&gt;  /opt/SUNWspro/prod/usr/lib/v9/libCrun.so.1
          libmp.so.2 =&gt;    /lib/64/libmp.so.2
          libmd.so.1 =&gt;    /lib/64/libmd.so.1
          libscf.so.1 =&gt;   /lib/64/libscf.so.1
          libDWicu26.so =&gt;         /opt/powercenter/v951/ODBC7.0/lib/libDWicu26.so
          libdl.so.1 =&gt;    /usr/lib/sparcv9/libdl.so.1
          librt.so.1 =&gt;    /usr/lib/sparcv9/librt.so.1
          libpthread.so.1 =&gt;       /usr/lib/sparcv9/libpthread.so.1
          libdoor.so.1 =&gt;  /lib/64/libdoor.so.1
          libuutil.so.1 =&gt;         /lib/64/libuutil.so.1
          libgen.so.1 =&gt;   /lib/64/libgen.so.1
          libaio.so.1 =&gt;   /lib/64/libaio.so.1
          libm.so.2 =&gt;     /lib/64/libm.so.2
          /lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2
          /platform/sun4v/lib/sparcv9/libc_psr.so.1
          /platform/sun4v/lib/sparcv9/libmd_psr.so.1
  </code></pre>
  
  <p>I tried to run strace as the user that uses these connections, but I get this error so not sure what to do with that:</p>
  
  <pre><code>$ strace perl test_odbctd.pl
  ERROR: unable to open /dev/log
  </code></pre>
  
  <p>Here's the PERL test script we're using:</p>
  
  <pre><code>#!/usr/bin/perl -w
  
  use DBI;
  # use DBD::ODBC;
  # use DBD::DB2::Constants;
  
  
  my $data_source = "DBI:ODBC:tdedwprd";
  
  #Prompt for username
  print "Enter user:";
  my $user = &lt;STDIN&gt;;
  
  #Prompt for password
  print "Enter password:";
  my $password =&lt;STDIN&gt;;
  
  # Connect to the tdedwdev teradata database
  my $dbh = DBI-&gt;connect($data_source, $user, $password, {AutoCommit =&gt;1})
                  or die "Can't connect to $data_source: $DBI::errstr";
  $stmt = "SELECT database, time; ";
  $sth = $dbh-&gt;prepare($stmt);
  $sth-&gt;execute();
  
  #associate variable with output columns...
  
  $sth-&gt;bind_col(1,\$db);
  $sth-&gt;bind_col(2,\$timestap);
  while ($sth-&gt;fetch) {
             print "The database is: $db\n";
             print "The time is: $timestap\n";
  }
  $dbh-&gt;disconnect;
  </code></pre>
  
  <p>The above script works on our existing dev box (Solaris 10 sp32), but not on the new one we're building (Solaris 10 sp64).</p>
  
  <p>The old server had the driver manager bundled with Informatica PowerCenter 8.6.1 sp32, and the new one has Informatica PowerCenter 9.5.1 sp64.</p>
  
  <p>The DBD::ODBC module did compile fine with some modifications, roughly following this guide from DataDirect (the logic was basically the same, but the references to the Makefile.PL weren't identical):</p>
  
  <p><a href="http://knowledgebase.datadirect.com/articles/Article/2973" rel="nofollow">http://knowledgebase.datadirect.com/articles/Article/2973</a></p>
  
  <p>I enabled Trace in odbc.ini (Trace=1) but this just resulted in a "Segmentation Fault (core dumped)".  However it does output a trace file when using the Informatica-provided "ssgodbc" tool.</p>
  
  <p>I tried using isql, but it seems to be tied to the Sybase drivers so I'm not sure if I can use that.  I couldn't get it to work</p>
  
  <pre><code>$ which isql
  /opt/sybase/OCS-15_0/bin/isql
  </code></pre>
  
  <p>Here are my ODBC environment variables:</p>
  
  <pre><code>$ env | grep -i odbc
  MANPATH=/usr/share/man:/opt/teradata/client/14.00/odbc_32/help/man:
  ODBCINST=/opt/powercenter/v951/ODBC7.0/odbcinst.ini
  LD_LIBRARY_PATH=/opt/powercenter/v951/ODBC7.0/lib:/opt/powercenter/v951/server/bin:/home/etlin1d/sqllib/lib:/opt/pwx/v851:/opt/sybase/OCS-15_0/lib:/opt/sybase/OCS-15_0/lib3p64:/opt/sybase/OCS-15_0/lib3p:/opt/teradata/client/14.00/tbuild/lib:/opt/teradata/client/odbc/lib:/opt/teradata/client/odbc/drivers:/opt/teradata/client/14.00/tbuild/lib:/usr/lib:/prj/db2/etlin1d/sqllib/lib64:/prj/db2/etlin1d/sqllib/lib32:/usr/lib
  LD_LIBRARY_PATH_64=/opt/powercenter/v951/ODBC7.0/lib:/opt/powercenter/v951/server/bin:/opt/pwx/v851:/prj/db2/etlin1d/sqllib/lib64:/opt/sybase/OCS-15_0/lib:/opt/sybase/OCS-15_0/lib3p64:/opt/sybase/OCS-15_0/lib3p:/opt/teradata/client/14.00/tbuild/lib:/opt/teradata/client/odbc/lib:/opt/teradata/client/odbc/drivers:/usr/lib
  NLSPATH=/opt/teradata/client/14.00/odbc_64/msg:/opt/teradata/client/14.00/odbc_32/msg:/opt/teradata/client/14.00/tbuild/msg/%N:/opt/teradata/client/14.00/tbuild/msg/%N:/opt/teradata/client/14.00/odbc_32/msg/%N:
  PATH=/opt/sybase/ASEP/bin:/opt/sybase/DBISQL/bin:/opt/sybase/UAF-2_0/bin:/opt/sybase/OCS-15_0/bin:/opt/teradata/client/14.00/tbuild/bin:/opt/teradata/client/14.00/tbuild/bin:/usr/bin:/bin:/usr/local/bin:/opt/powercenter/v951/ODBC7.0/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/powercenter/v951/server/bin:.:/prj/db2/etlin1d/sqllib/bin:/prj/db2/etlin1d/sqllib/adm:/prj/db2/etlin1d/sqllib/misc:/prj/db2/etlin1d/sqllib/db2tss/bin
  ODBCINI=/opt/powercenter/v951/ODBC7.0/odbc.ini
  ODBCHOME=/opt/powercenter/v951/ODBC7.0
  </code></pre>
  
  <p>I'm totally at a loss.  I'm not a Solaris admin by trade though (in fact this is my first significant exposure to Solaris and Informatica really) so I'm hoping I'm missing something obvious.</p>
  
  <p>I'm not sure what else to share right now.  Any help would be GREATLY appreciated.  I've been stuck on problems with this ODBC implementation for weeks.</p>