1 Reply Latest reply on Sep 26, 2012 7:37 PM by jschellSomeoneStoleMyAlias

    Perl Script unable to do database call

    Asif Khan-Oracle

      Below program is doing nothing, simply hanging. Same program is running fine in other servers. All perl modules are installed.

      bash-3.2$ cat test.pl
      #!/usr/local/git/bin/perl -w
      use strict;
      use DBI;
      my $db = DBI->connect("DBI:Oracle:<DB>",'<Username>','<password>') or die "Could not connect to the database pxrpam". DBI->errstr;
      $db->{AutoCommit} = 0;
      $db->{RaiseError} = 1;
      $db->{ora_check_sql} = 0;
      $db->{RowCacheSize} = 16;
      my $SEL = "select count(*) from test_table";
      my $sth = $db->prepare($SEL);
      print "If you see this, parse phase succeeded without a problem.\n";
      print "If you see this, execute phase succeeded without a problem.\n";
      my $count = $db->selectrow_array ($SEL);
      printf ("Count = %d\n",$count);
      END {
      $db->disconnect if defined($db);
      bash-3.2$ /usr/local/git/bin/perl test.pl


      I am very new to the perl scripting. I am not having any idea how to debug this. Please help me.

      Thanks in advance!