Hi Michael, Yes, I compiled DBD::Sybase with non-threaded libs.
How can I check the Sybase env vars from the dbi-link script? I could only see that PostgreSQL starts with user postgres env and sourced SYBASE.sh from postgres bash_profile. I don't know if this is enough. Will postgresql keep this environment or will it build a new one for itself while starting? []s, Fernando Lozano > It's hard to tell for sure what could be wrong. > > First, I would try to check that the Sybase related env. variable are > correctly seen when you are in the dbi-link script. > > Second - you may run into an insurmountable problem: Sybase open > client installs its own signal handler to do a number of things > (timeouts, among others). This signal handler is incompatible with the > signal handler that perl installs for itself since 5.8.x or > thereabouts, and causes various issues depending on which combination > of modules you try to use. > > I assume that you compiled DBD::Sybase with the non-threaded > libraries, as is recommended, right? > > Michael > > > On Sat, Dec 26, 2009 at 11:23 PM, <[email protected]> wrote: > > Hi there, > > > > This may not be the best list for my question, but I'm sure someone there > > will he able to help > > me ;-) > > > > I'm trying to use dbi-link under RHEL5.3. Using PostgreSQL and Perl rpms > > from distro, installed > > Sybase ASE 1.5.5 developers edition and DBD::Sybase using cpan -i. > > > > My test programs, using pubs2 example database, work fine. They connect as: > > > > $dbh = DBI->connect("dbi:Sybase:server=RHEL53I386", "teste", "123testando"); > > > > So I have a working DBD::Sybase install. But then I try to initialize > > dbi-link using the > statement: > > > SELECT make_accessor_functions( > > 'dbi:Sybase:server=RHEL53I386', > > 'teste', > > '123testando', > > '--- > > AutoCommit: 1 > > RaiseError: 1 > > ', > > NULL, > > NULL, > > NULL, > > 'pubs2' > > ); > > > > I get the error (from postgresql logs) > > > > OpenClient message: LAYER = (7) ORIGIN = (2) SEVERITY = (6) NUMBER = (6) > > Message String: ct_con_alloc(): unable to get layer message string: unable > > to ge > > t origin message string: error string not available > > NOTICE: ct_con_alloc failed at > > /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread > > -multi/DBD/Sybase.pm line 92. > > > > CONTEXT: SQL statement "SELECT dbi_link.cache_connection( 1 )" > > SQL statement "SELECT dbi_link.create_accessor_methods( > > 'pubs2', > > NULL, > > NULL, > > 'dbi:Sybase:server=RHEL53I386', > > 'teste', > > '123testando', > > 1 > > ) > > " > > ERROR: error from Perl function: error from Perl function: error from Perl > > func > > tion: DBI connect('server=RHEL53I386','teste',...) failed: (no error > > string) at > > line 137 at line 36. at line 53. > > > > I already tried forcing my database to en_US.UTF-8 and sourced SYBASE.sh > > from postgres > > bash_profile script. Before that, the error was aboit missing dynamic libs. > > > > I know this looks more a postgresql / dbi-link thing than a dbi thing but > > maybe someone can > > understand the sybase error message and help me. > > > > > > []s, Fernando Lozano > > > >
