PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Wechsler, Steven" <Steven dot Wechsler at mtvstaff dot com>
Subject: DBD::Sybase not working with repserver
Date: Mar 13 2008 6:56PM

Hi.

I have a system here with the following versions installed:

  Perl            : 5.008008    (x86_64-linux-thread-multi)
  OS              : linux       (2.6.9-42.0.3.elsmp)
  DBI             : 1.602
  DBD::mysql      : 3.0007
  DBD::Sybase     : 1.08

It works fine with ASE and MS SQL Server, but when I try to retrieve
results from a repserver, I get this:

Msg 2056, Severity 12, State 0:
Server 'secliverep01', Line: 0:
Line 1, character 1: Incorrect syntax with 'sp_datatype_info'.

Looking at a level 3 DBI trace, I see the following:

1   -> type_info_all for DBD::Sybase::db (DBI::db=HASH(0x9676990)~INNER)
thr#8fd7010
2   -> prepare for DBD::Sybase::db (DBI::db=HASH(0x9676990)~INNER
'sp_datatype_info') thr#8fd7010
    New 'DBI::st' (for DBD::Sybase::st, parent=DBI::db=HASH(0x9676990),
id=undef)
    dbih_setup_handle(DBI::st=HASH(0x9686a30)=>DBI::st=HASH(0x96869e0),
DBD::Sybase::st, 96868a0, Null!)
    dbih_make_com(DBI::db=HASH(0x9676990), 9684800, DBD::Sybase::st,
544, 0) thr#8fd7010
    syb_st_prepare() -> inUse = 1
    syb_st_prepare() parent has active kids - opening new connection
    syb_db_login() -> using global CS_LOCALE data
2   <- prepare= DBI::st=HASH(0x9686a30) at Sybase.pm line 315
    -> execute for DBD::Sybase::st (DBI::st=HASH(0x9686a30)~0x96869e0)
thr#8fd7010
    cmd_execute() -> ct_command() OK
    cmd_execute() -> ct_send() OK
Msg 2056, Severity 12, State 0:
Server 'secliverep01', Line: 0:
Line 1, character 1: Incorrect syntax with 'sp_datatype_info'.


Now, if I run the same script, with the same arguments, on a host with
an earlier version installed (and note that it's 32 bits instead of 64):

  Perl            : 5.008005    (i386-linux-thread-multi)
  OS              : linux       (2.6.9-42.elsmp)
  DBI             : 1.40
  DBD::mysql      : 3.0008
  DBD::Sybase     : 0.95

It works fine and I get a normal result set.  Here's the relevant
section of the trace:

1   -> type_info_all for DBD::Sybase::db (DBI::db=HASH(0x8be4430)~INNER)
thr#883a008
1   <- type_info_all= [ HASH(0x8bed928) ARRAY(0x8bed838)
ARRAY(0x8bed934) ARRAY(0x8c03594) ARRAY(0x8c03690) ARRAY(0x8c0378c)
ARRAY(0x8c03888) ARRAY(0x8c03bd8) ARRAY(0x8c03cd4) ARRAY(0x8c03dd0)
ARRAY(0x8c03ecc) ARRAY(0x8c046ac) ARRAY(0x8c047a8) ARRAY(0x8c048a4)
ARRAY(0x8c049a0) ARRAY(0x8c04d98) ARRAY(0x8c04e94) ARRAY(0x8c04f90)
ARRAY(0x8c0508c) ARRAY(0x8c05c14) ARRAY(0x8c05d10) ARRAY(0x8c05e0c)
ARRAY(0x8c05f08) ] at DBI.pm line 1530 via
/dba/sybase/scripts/run_sql.pl line 478
    <- type_info= HASH(0x89a7ff8)19keys at run_sql.pl line 478
    -> type_info for DBD::Sybase::db (DBI::db=HASH(0x8be8384)~0x8be4430
1) thr#883a008
    <- type_info= HASH(0x8c0788c)19keys at run_sql.pl line 478
    -> type_info for DBD::Sybase::db (DBI::db=HASH(0x8be8384)~0x8be4430
1) thr#883a008
    <- type_info= HASH(0x8c079d0)19keys at run_sql.pl line 478
    -> type_info for DBD::Sybase::db (DBI::db=HASH(0x8be8384)~0x8be4430
1) thr#883a008
    <- type_info= HASH(0x8c083f0)19keys at run_sql.pl line 478


Any ideas?

Thanks,

Steve



Steve Wechsler | steven.wechsler@mtvstaff.com
Sybase/SQL Server/MySQL Database Administrator
212-846-5683

MTV Networks