Re: dbi-link with Sybase

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: <fernando(at)lozano(dot)eti(dot)br>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: dbi-link with Sybase
Date: 2009-12-27 02:31:50
Message-ID: D960CB61B694CF459DCFB4B0128514C203A89931@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> This may not be the best list for my question, but I'm sure someone there will he able to help me

There's a mailing list dedicated to DBI-Link, see
http://lists.pgfoundry.org/mailman/listinfo/dbi-link-general

> 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 sybase thing than a postgresql thing but maybe someone can understand the
> sybase error message and help me. After all I hope someone out there does use dbi-link

Do you know what that Sybase error means?
If you know that, maybe you can figure out what's wrong...

Does the connection to Sybase depend on environment variables?
I have had a problem like this with Oracle and DBI-Link, environment
variables of the postmaster didn't make it into DBI-Link functions.
If that is your problem, you can use the fifth argument to make_accessor_methods to pass
(YAML encoded) environment settings.

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rob Jaeger 2009-12-27 06:12:06 Re: Finding the bin path
Previous Message John R Pierce 2009-12-26 23:00:46 Re: Finding the bin path