Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Segmentation fault when run perl

Status
Not open for further replies.

ofermag1

Programmer
Joined
Dec 25, 2000
Messages
14
Location
IL
Hi,
when runing this small app i get "Segmentation fault"
the app works fine retrives the rows and prints it.
#!/usr/local/bin/perl

$ENV{ORACLE_SID} = "?";
$ENV{ORACLE_HOME} = "?";
$ENV{EPC_DISABLED} = "TRUE";
$ENV{LD_LIBRARY_PATH} = "/app/oracle/product/8.1.6/lib\:/lib\:/usr/lib\:/usr/local/lib";
$ENV{ORAPIPES} = "V2";
my $dbname = "?";
my $dbuser = "?";
my $dbpass = "?";

use DBI;
use strict;

my $driver="Oracle";
my $trace_level=5;
my @ary = DBI->available_drivers;
print "DRIVERS : @ary\n";
my @ary1 = DBI->data_sources($driver);
print "DATA_SOURCE : @ary1\n";
#DBI->trace($trace_level);

my $dbh = DBI->connect("dbi:Oracle:$dbname", $dbuser, $dbpass) || die "coudnt connect to database\n" . DBI->err ;
my $sth = $dbh->prepare("select * from dba_jobs");
$sth->execute;
while ( my @row = $sth->fetchrow_array ) {
print "@row\n";
}
my $rc = $dbh->disconnect || die "Could not disconnect: $DBI::errstr";

print "This is the END\n";


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top