Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Perl + DBD + ODBC segfaults: msg#00344

db.maxdb

Subject: Perl + DBD + ODBC segfaults

Hi!

I've got a problem, which has been mentioned several times on this list. But
there wasn't a satisfying solution.

I'm running SuSE Linux 8.2 on my test-box. I've installed Perl (5.8.0),
unixODBC (2.2.3), Perl DBI (1.32), Perl DBD::ODBC (1.04), SAP DB ind, srv
and callif (7.4.3.27). Then I configured unixODBC for our test database
server:

/etc/unixODBC/odbcinst.ini:
[SAPDB]
Description = SAP DB 7.4.3.27 ODBC driver
Driver = /opt/sapdb/interfaces/odbc/lib/libsqlod.so
Setup = /usr/lib/unixODBC/libsapdbS.so.1
FileUsage = 1
CPTimeout =
CPReuse =

/etc/unixODBC/odbc.ini:
[TEST]
Description = Test Database
Driver = SAPDB
ServerDB = TEST
ServerNode = list01
SQLMode=INTERNAL
IsolationLevel=Uncommitted
TraceFileName=/tmp/sql.log

and linked "/usr/spool/sql/ini/odbc.ini" to "/etc/unixODBC/odbc.ini".

I've tested the ODBC-stuff with "isql" and I was able to connect to the
database and to kick some sql-statements off.

So I wrote a little Perl-script:

----%<----
#!/usr/bin/perl -w

use strict;
use DBI qw(:sql_types);

$| = 1; # flush stdout by default

my $dbh;
my $data_source = 'DBI:ODBC:TEST';
my $user = 'CHRIS';
my $password = 'mypasswd';

print "Connecting: ";
$dbh = DBI->connect($data_source, $user, $password) or die "ERROR: " .
$DBI::err_str . "\n";
print "OK\n";

sleep 10;

print "Disconnecting: ";
$dbh->disconnect() or warn "WARNING: " . $DBI::err_str . "\n";
print "OK\n";
----%<----

If I execute this script it segfaults (SIGSEGV) in the connect-statement.
Here's the output:

----%<----
Connecting: Segmentation fault
----%<----

Here's the trace of the ODBC-driver:

----%<----
<html><head><meta http-equiv="Content-Type" content="text/html;
charset=utf-8"></head><body ><PRE><PLAINTEXT>
<html><head><meta http-equiv="Con

DATASOURCE: TEST
SESSION : 1;
SQLMODE : INTERN
SERVERDB : TEST
SERVERNODE: list01
CONNECT "CHRIS " IDENTIFIED BY :A ISOLATION LEVEL 0
START : DATE : 2003-11-26 TIME : 0011:20:13
END : DATE : 2003-11-26 TIME : 0011:20:13
----%<----

I don't have other useful information.

Do I really need to rebuild the DBD-stuff for SAP DB or are there other
useful hints? What's the reason for this problem? unixODBC seems to work but
in conjunction with Perl it has obviously some problems :( A tcpdump
revealed that there's some communication between my box and the server.

BTW: What's the purpose of the html-junk in the ODBC-log?

Thanks a lot for your help!


bye
Christian Jung

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/maxdb?unsub=gcdm-maxdb@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qplus.devel/200...    network.jabber....    debian.qa-packa...    encryption.gpg....    python.dabo.dev...    uclinux.devel/2...    science.mathema...    recreation.pesc...    kernel.ck/2004-...    mozilla.devel.e...    tex.latex.prosp...    ietf.multi6/200...    bbc.cvs/2002-11...    xfree86.newbie/...    jakarta.taglibs...    altlinux.hardwa...    comedi/2002-05/...    horde.bugs/2004...    games.diplomacy...    finance.e-gold....    web.dom.test-su...    lang.ruby.rails...    os.netbsd.devel...    video.gstreamer...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation