|
|
sybperl-l Archive
Up Prev Next
From: <sergei dot cher at thomsonreuters dot com>
Subject: Need help in troubleshooting Sybperl installation on Sun Solaris 10
Date: Apr 23 2008 8:10PM
Hi,
I installed Sybperl 2.18 on Sun Solaris 10 box. The installation was not
clean - when I ran "make test" command, some of the tests failed. But
"make install" did not produce any errors.
Sybase client 2.15.1, which I installed on the same Sun box, works fine
- I tested it.
But the script, presented below, produced the "Bus Eror(coredump)" on
the statement "$dbh->ct_execute("SELECT id FROM clients");".
The script is presented below:
========================================================================
=
#!/usr/bin/perl
use Socket;
use FileHandle;
use Sybase::CTlib;
#($srv, $uid, $pwd) = ('SYB11_DB1', 'vrdn_software', 't8737m299');
($srv, $uid, $pwd) = ('VRDN_DB', 'vrdn_software', 't8737m299');
print "srv = $srv\n";
print "uid = $uid\n";
print "pwd = $pwd\n";
$dbh = new Sybase::CTlib $uid, $pwd, $srv;
print "DB connected\n";
if (!defined($dbh))
{
#error("Unable to connect to server, exiting.");
print "Unable to connect to server, exiting.\n";
} else {
print "dbh is defined\n";
}
$dbname = 'vrdn_network';
print "dbname before usage = $dbname\n";
#$dbh->ct_sql("use $dbname");
$dbh->ct_execute("SELECT id FROM clients");
print "select statement executed\n";
while($dbh->ct_results($restype) == CS_SUCCEED) {
if($restype == CS_CMD_FAIL) {
warn "Command failed!";
next;
}
Script produced the following output:
=====================================
$ ./vrdn_test.pl
srv = VRDN_DB
uid = vrdn_software
pwd = t8737m299
DB connected
dbh is defined
dbname before usage = vrdn_network
Bus Error(coredump)
$
I also tried to use a specific Database, uncommenting
"$dbh->ct_sql("use $dbname");" statement in the above script - in this
case, script failed executing
"$dbh->ct_sql("use $dbname");" command.
I suspect that my Sybperl installation, particularly installation of
Sybase::CTlib, was screwed up.
Any ideas why it happened are appreciated.
I checked the environment variables - I think that they are correct...
Thanks,
Sergei Cher
Consultant
Thomson Reuters
Boston, MA
|