Using RubyCLI

Connectivity

Using RubyCLI

I'm trying to establish a connection from my linux box to a Teradata server

My odbcinst.ini looks as the example does

     [ODBC DRIVERS]

     Teradata=Installed

     [Teradata]

     Driver=/opt/teradata/client/ODBC_32/lib/tdata.so

     APILevel=CORE

     ConnectFunctions=YYY

     DriverODBCVer=3.51

     SQLLevel=1

And I'm trying an IRB call

     require 'dbi'

     conn = DBI.connect("DBI:Teradata:test:localhost")

The Teradata namespace in the connect call equals the name in the odbcinst.ini file

(there is nothing in the odbc.ini file)

But I keep getting an error ...

DBI::InterfaceError: Unable to load driver 'Teradata' (underlying error: uninitialized constant DBI::DBD::Teradata)

        from /usr/local/lib/ruby/site_ruby/1.8/dbi.rb:300:in `load_driver'

        from /usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'

        from /usr/local/lib/ruby/site_ruby/1.8/dbi.rb:242:in `load_driver'

        from /usr/local/lib/ruby/site_ruby/1.8/dbi.rb:160:in `_get_full_driver'

        from /usr/local/lib/ruby/site_ruby/1.8/dbi.rb:145:in `connect'

        from (irb):3

Has anyone actually made this work?

Thanks,

Matt

Tags (4)