Teradata Perl Connection Question.

Discussion in 'Perl Misc' started by Gary, Aug 1, 2008.

  1. Gary

    Gary Guest

    Hi

    I'm trying to post to the teradataforum but couldn't find any link to
    post.

    I'm trying to connect to Teradata and getting the following error.

    CODE:



    my $dbh;

    my $sth;

    my @row;

    $dbh = DBI->connect('dbi:Teradata:DB', 'user', 'password') or die
    "Connecting : $DBI::errstr\n ";

    $sth = $dbh->prepare('select * from TableX) or die "preparing: ",$dbh-
    >errstr;

    $sth->execute() or die "executing: ", $dbh->errstr;

    while (@row = $sth->fetchrow_array()) {
    print "displaying";
    print join(',',@row);
    print "\n";
    }



    --Note DB, user, password have been supplied.



    ERROR:

    Cannot init, result is 510

    Use of uninitialized value in concatenation (.) or string
    at /...../......../DBD/Teradata.pm line 5078



    Also does DBD:Teradata module supports encrypted logons?
     
    Gary, Aug 1, 2008
    #1
    1. Advertising

  2. Gary

    smallpond Guest

    On Aug 1, 10:08 am, Gary <> wrote:
    > Hi
    >
    > I'm trying to post to the teradataforum but couldn't find any link to
    > post.
    >
    > I'm trying to connect to Teradata and getting the following error.
    >
    > CODE:
    >
    > my $dbh;
    >
    > my $sth;
    >
    > my @row;
    >
    > $dbh = DBI->connect('dbi:Teradata:DB', 'user', 'password') or die
    > "Connecting : $DBI::errstr\n ";
    >
    > $sth = $dbh->prepare('select * from TableX) or die "preparing: ",$dbh->errstr;
    >
    > $sth->execute() or die "executing: ", $dbh->errstr;
    >
    > while (@row = $sth->fetchrow_array()) {
    > print "displaying";
    > print join(',',@row);
    > print "\n";
    >
    > }
    >
    > --Note DB, user, password have been supplied.
    >
    > ERROR:
    >
    > Cannot init, result is 510
    >
    > Use of uninitialized value in concatenation (.) or string
    > at /...../......../DBD/Teradata.pm line 5078
    >
    > Also does DBD:Teradata module supports encrypted logons?



    What happened when you ran the test as suggested by the documentation?

    "After installing, you can verify the install by running
    perl t/test.pl <host> <user> <password>"

    --S
     
    smallpond, Aug 1, 2008
    #2
    1. Advertising

  3. Gary

    Gary Guest

    smallpond,

    Thank you for your reply.

    This is what I get when I run test.pl

    TdTestBulkload.pm line 4:

    This Perl hasn't been configured and built properly for the threads
    module to work. (The 'useithreads' configuration option hasn't been
    used.)

    Having threads support requires all of Perl and all of the XS modules
    in
    the Perl installation to be rebuilt, it is not just a question of
    adding
    the threads module. (In other words, threaded and non-threaded Perls
    are binary incompatible.)

    If you want to the use the threads module, please contact the people
    who built your Perl.

    Cannot continue, aborting.
    BEGIN failed--compilation aborted at /usr/opt/BASperl/5.8.6/lib/sun4-
    solaris/threads.pm line 28.
    Compilation failed in require at TdTestBulkload.pm line 4.
    BEGIN failed--compilation aborted at TdTestBulkload.pm line 4.
    Compilation failed in require at test.pl line 17.
    BEGIN failed--compilation aborted at test.pl line 21.
     
    Gary, Aug 1, 2008
    #3
  4. Gary

    J. Gleixner Guest

    Gary wrote:
    > smallpond,
    >
    > Thank you for your reply.
    >
    > This is what I get when I run test.pl
    >
    > TdTestBulkload.pm line 4:
    >
    > This Perl hasn't been configured and built properly for the threads
    > module to work. (The 'useithreads' configuration option hasn't been
    > used.)
    >
    > Having threads support requires all of Perl and all of the XS modules
    > in
    > the Perl installation to be rebuilt, it is not just a question of
    > adding
    > the threads module. (In other words, threaded and non-threaded Perls
    > are binary incompatible.)
    >
    > If you want to the use the threads module, please contact the people
    > who built your Perl.


    That seems like a pretty helpful error message.
     
    J. Gleixner, Aug 1, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dpackwood
    Replies:
    3
    Views:
    1,829
  2. Paul Watson

    Teradata interface

    Paul Watson, Oct 19, 2003, in forum: Python
    Replies:
    0
    Views:
    455
    Paul Watson
    Oct 19, 2003
  3. TekInfoSys
    Replies:
    1
    Views:
    489
  4. PerlFAQ Server

    FAQ 1.4 What are Perl 4, Perl 5, or Perl 6?

    PerlFAQ Server, Jan 23, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    313
    PerlFAQ Server
    Jan 23, 2011
  5. PerlFAQ Server
    Replies:
    0
    Views:
    702
    PerlFAQ Server
    Feb 3, 2011
Loading...

Share This Page