|
Archives of the TeradataForumMessage Posted: Wed, 11 May 2005 @ 14:14:37 GMT
Bradley, we use Perl-DBI with Teradata a lot for years, at least for our software development (and now starting to use it in production also), and it works very well. Most problems occur with non-matching versions of the different tools/drivers; the versions we currently use are (at least this is the latest configuration I tested): Sun-Solaris 8 Perl 5.8.6 DBI 1.46 DBD::ODBC 1.13 TTU 7.0 ODBC 3.2.0.9 Teradata V2R5 This works fine currently, also on Teradata V2R5.1. C or C++ is currently not used by us under Unix to access Teradata. Here's a little sample program that I normally use in some variations to test the connection (can also be used for other DBMS; adjustments to the environment may be needed). --- BEGIN perl_dbi_test.pl #!/bin/sh -- # perl, to stop looping eval 'exec $PERLBINDIR/perl -w -S $0 ${1+"$@"}' if $sh; $sh = undef; ### # # Sample Perl-DBI-Program for Teradata # # Klaus Dittrich Vodafone D2 GmbH # 01.03.2005 # ### # use correct perl version and other libraries use DBI; use lib "/home/dwh/lib/dwhgen"; # DBI-Trace-Mode #DBI->trace(3); # activate in case of any problems # Check available Drivers printf "Available Driver:\n %s\n", join(' ',DBI->available_drivers); # Check available Sources printf "Available ODBC-Sources:\n %s\n\n", join("\n ",DBI->data_sources(ODBC)); # Open Connection my $dbhandle = DBI->connect("dbi:ODBC:testdsn", Klaus Dittrich
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||