problems connecting to a ms sql server (using DBD-Sybase and sybase libs)

problems connecting to a ms sql server (using DBD-Sybase and sybase libs)

Post by imcs » Wed, 10 Oct 2001 04:15:33



the problem is this....

I have installed the sybase libraries and the dbd-sybase perl module
but when a i do a make test i get this error message.

PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib
-I/usr/lib/perl5/i386-linux -I/usr/lib/perl5 -e 'use Test::Harness

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "default",
        LC_ALL = "default",
        LANG = (unset)
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
t/autocommit........perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "default",
        LC_ALL = "default",
        LANG = (unset)
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

The context allocation routine failed when it tried to load
localization
files!!
One or more following problems may caused the failure

Your sybase home directory is /opt/sybase-12.5/OCS-12_5. Check the
environment variable SYBASE if it is not the one you want!
Using locale name "default" defined in environment variable LC_ALL
install_driver(Sybase) failed: DBD::Sybase initialize: cs_ctx_alloc()
failed
at /usr/lib/perl5/i386-linux/DynaLoader.pm line 219.
Compilation failed in require at (eval 1) line 3.

what am i doing wrong??
i have the SYBASE variable pointing to the correcto sybase directory
(/opt/sybase-12.5/OCS-12_5), i think it's something with the locale
files
but i'm not shure.

thanks for the help

 
 
 

problems connecting to a ms sql server (using DBD-Sybase and sybase libs)

Post by Anthony Mandi » Wed, 10 Oct 2001 20:21:19



> One or more following problems may caused the failure

> Your sybase home directory is /opt/sybase-12.5/OCS-12_5. Check the
> environment variable SYBASE if it is not the one you want!
> Using locale name "default" defined in environment variable LC_ALL
> install_driver(Sybase) failed: DBD::Sybase initialize: cs_ctx_alloc()
> failed
> at /usr/lib/perl5/i386-linux/DynaLoader.pm line 219.
> Compilation failed in require at (eval 1) line 3.

> what am i doing wrong??
> i have the SYBASE variable pointing to the correcto sybase directory
> (/opt/sybase-12.5/OCS-12_5), i think it's something with the locale
> files but i'm not shure.

        If you are using 12.5, you'll need more than just the SYBASE
        environment variable. I'm not sure if this version of Open
        Client can connect to MS SQL Server. If you are using version
        6.5 or earlier it may work. There were problems with version 7
        and later.

-am     ? 2001

 
 
 

problems connecting to a ms sql server (using DBD-Sybase and sybase libs)

Post by Michael Pepple » Thu, 11 Oct 2001 02:50:18




> the problem is this....

> I have installed the sybase libraries and the dbd-sybase perl module but
> when a i do a make test i get this error message.

> PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib
> -I/usr/lib/perl5/i386-linux -I/usr/lib/perl5 -e 'use Test::Harness

> warning: Setting locale failed. perl: warning: Please check that your
> locale settings:
>         LANGUAGE = "default",
>         LC_ALL = "default",
>         LANG = (unset)
>     are supported and installed on your system.

set LANGUAGE and LC_ALL env variables to "C" instead of "default".

Quote:> The context allocation routine failed when it tried to load localization
> files!!
> One or more following problems may caused the failure

> Your sybase home directory is /opt/sybase-12.5/OCS-12_5.

This is your problem - the SYBASE env. variable should point to
/opt/sybase-12.5, not /opt/sybase-12.5/OCS-12_5.

That said if you are running a recent version of MS-SQL server (i.e
MS-SQL 2k) then the Sybase libs won't work. Use the FreeTDS libraries
instead (www.freetds.org)

Michael
--
Michael Peppler - Data Migrations Inc. - http://www.mbay.net/~mpeppler

International Sybase User Group - http://www.isug.com

 
 
 

problems connecting to a ms sql server (using DBD-Sybase and sybase libs)

Post by imcs » Thu, 11 Oct 2001 07:01:28


i have tried using freetds, but DBD-sybase doesn't compile at all
that's why i use the sybase libraries.

the compile time error i get using SYBASE=/usr/local/freetds
is this....

cc -c -I/usr/local/freetds/include
-I/usr/lib/perl5/site_perl/i386-linux/auto/DBI -fno-strict-aliasing
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2  
 -DVERSION=\"0.93\" -DXS_VERSION=\"0.93\" -fpic
-I/usr/lib/perl5/i386-linux/CORE
dbdimp.c
dbdimp.c: In function `syb_ct_prepare_send':
dbdimp.c:2661: `CS_SEND_DATA_CMD' undeclared (first use in this
function)
dbdimp.c:2661: (Each undeclared identifier is reported only once
dbdimp.c:2661: for each function it appears in.)
dbdimp.c:2661: `CS_COLUMN_DATA' undeclared (first use in this
function)
dbdimp.c: In function `syb_ct_finish_send':
dbdimp.c:2695: structure has no member named `timestamp'
dbdimp.c:2698: structure has no member named `timestamp'
dbdimp.c:2699: structure has no member named `timestamplen'
dbdimp.c: In function `_dbd_rebind_ph':
dbdimp.c:3237: `CS_NO_RECOMPILE' undeclared (first use in this
function)
make: *** [dbdimp.o] Error 1

with this i'm clueless




> > the problem is this....

> > I have installed the sybase libraries and the dbd-sybase perl module but
> > when a i do a make test i get this error message.

> > PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib
> > -I/usr/lib/perl5/i386-linux -I/usr/lib/perl5 -e 'use Test::Harness

> > warning: Setting locale failed. perl: warning: Please check that your
> > locale settings:
> >         LANGUAGE = "default",
> >         LC_ALL = "default",
> >         LANG = (unset)
> >     are supported and installed on your system.

> set LANGUAGE and LC_ALL env variables to "C" instead of "default".

> > The context allocation routine failed when it tried to load localization
> > files!!
> > One or more following problems may caused the failure

> > Your sybase home directory is /opt/sybase-12.5/OCS-12_5.

> This is your problem - the SYBASE env. variable should point to
> /opt/sybase-12.5, not /opt/sybase-12.5/OCS-12_5.

> That said if you are running a recent version of MS-SQL server (i.e
> MS-SQL 2k) then the Sybase libs won't work. Use the FreeTDS libraries
> instead (www.freetds.org)

> Michael

 
 
 

problems connecting to a ms sql server (using DBD-Sybase and sybase libs)

Post by Michael Pepple » Thu, 11 Oct 2001 07:13:05




> i have tried using freetds, but DBD-sybase doesn't compile at all that's
> why i use the sybase libraries.

> the compile time error i get using SYBASE=/usr/local/freetds is this....

> cc -c -I/usr/local/freetds/include
> -I/usr/lib/perl5/site_perl/i386-linux/auto/DBI -fno-strict-aliasing
> -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2
>  -DVERSION=\"0.93\" -DXS_VERSION=\"0.93\" -fpic
> -I/usr/lib/perl5/i386-linux/CORE
> dbdimp.c
> dbdimp.c: In function `syb_ct_prepare_send': dbdimp.c:2661:
> `CS_SEND_DATA_CMD' undeclared (first use in this function)

This is a known problem - FreeTDS doesn't have all the symbols yet. Use
DBD::Sybase 0.91 instead.

Michael
--
Michael Peppler - Data Migrations Inc. - http://www.mbay.net/~mpeppler

International Sybase User Group - http://www.isug.com

 
 
 

problems connecting to a ms sql server (using DBD-Sybase and sybase libs)

Post by imcs » Fri, 12 Oct 2001 03:13:57


Thanks!!!
i've downloaded DBD-Sybase-0.91 and compiled fine, not all the tests
where successfull but i think that i can live with that, because the
connection and the queries i have in a test program work very well.

just one last doubt : ?will the newer versions of DBD::Sybase work
with freetds?

thank you very much again for your help.




> > i have tried using freetds, but DBD-sybase doesn't compile at all that's
> > why i use the sybase libraries.

> > the compile time error i get using SYBASE=/usr/local/freetds is this....

> > cc -c -I/usr/local/freetds/include
> > -I/usr/lib/perl5/site_perl/i386-linux/auto/DBI -fno-strict-aliasing
> > -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2
> >  -DVERSION=\"0.93\" -DXS_VERSION=\"0.93\" -fpic
> > -I/usr/lib/perl5/i386-linux/CORE
> > dbdimp.c
> > dbdimp.c: In function `syb_ct_prepare_send': dbdimp.c:2661:
> > `CS_SEND_DATA_CMD' undeclared (first use in this function)

> This is a known problem - FreeTDS doesn't have all the symbols yet. Use
> DBD::Sybase 0.91 instead.

> Michael

 
 
 

problems connecting to a ms sql server (using DBD-Sybase and sybase libs)

Post by Steven Back » Fri, 12 Oct 2001 03:54:39



>just one last doubt : will the newer versions of DBD::Sybase work
>with freetds?

Altough I don't speak for any of the freetds developers, I believe
the answer to that question is "some day".  For more information
check out the freetds mailing list at http://sunsite.unc.edu/freetds/

Steve
--
Steven J. Backus                        Computer Specialist


391 Chipeta Way -- Suite D2             Office:  801.587.9308
Salt Lake City, UT 84108-1266           http://www.math.utah.edu/~backus