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: "Johan De Graeve" <johan dot de dot graeve at switch dot be>
Subject: Problems with Sybase environment?
Date: May 23 2005 7:25AM

> Can somebody explain me the results of the code fragment below please.
> 
> Thx,
> Johan De Graeve
> 
> /apps/sybase-12_0/interfaces contains entry for SYBASE_DS_12_0
> /apps/sybase-12_5/interfaces contains entry for SYBASE_DS_12_0 &
> SYBASE_DS_12_5
> /apps/repsvr-12_5/interfaces contains entry for SYBASE_DS_12_0 &
> SYBASE_DS_12_5
> 
> test.pl
> =====
> #!/usr/local/bin/perl -w
> 
> use Sybase::Sybperl;
> 
> my($dbproc) = "-1";
> 
> $ENV{'SYBASE'} = "/apps/sybase-12_0";
> print "SYBASE_DS_12_0\n";
> $dbproc = dblogin("sa", "password", "SYBASE_DS_12_0");
> print "$dbproc\n";
> dbclose($dbproc) if ($dbproc != -1);
> 
> $ENV{'SYBASE'} = "/apps/repsvr-12_5";
> print "SYBASE_DS_12_5\n";
> $dbproc = dblogin("sa", "password", "SYBASE_DS_12_5") or die "Cannot
> connect to SYBASE_DS_12_5\n";
> print "$dbproc\n";
> dbclose($dbproc) if ($dbproc != -1);
> 
> 
> Hippix[sybase]  /apps/sybase-12_5/adm > test.pl
> SYBASE_DS_12_0
> Sybase::DBlib=HASH(0x38cd8)
> SYBASE_DS_12_5
> DB-Library error:
>         Server name not found in interface file.
> -1
> 
> test.pl:  same program as above with first dblogin commented out
> =====
> #!/usr/local/bin/perl -w
> 
> use Sybase::Sybperl;
> 
> my($dbproc) = "-1";
> 
> $ENV{'SYBASE'} = "/apps/sybase-12_0";
> print "SYBASE_DS_12_0\n";
> #$dbproc = dblogin("sa", "password", "SYBASE_DS_12_0");
> print "$dbproc\n";
> dbclose($dbproc) if ($dbproc != -1);
> 
> $ENV{'SYBASE'} = "/apps/repsvr-12_5";
> print "SYBASE_DS_12_5\n";
> $dbproc = dblogin("sa", "password", "SYBASE_DS_12_5") or die "Cannot
> connect to SYBASE_DS_12_5\n";
> print "$dbproc\n";
> dbclose($dbproc) if ($dbproc != -1);
> 
> Hippix[sybase]  /apps/sybase/adm > test.pl
> SYBASE_DS_12_0
> SYBASE_DS_12_5
> Sybase::DBlib=HASH(0x38c60)
> 
> 
> 
> Below you can find the output of building sybperl:
> Hippix[root]  /data01/installation/perl/sybperl-2.17 > env
> _=/usr/bin/env
> MANPATH=/usr/man:/usr/perl5/man:/usr/share/man:/usr/local/man:
> HZ=
> PAGER=less
> SYBASE_SYSAM=SYSAM-1_0
> SYBASE_FTS=EFTS-12_5_2
> PATH=/devtools/SUNWspro/bin:/apps/sybase-12_5/EFTS-12_5_2/bin:/apps/sy
> base-12_5/RPL-12_5/bin:/apps/sybase-12_5/ASEP/bin:/apps/sybase-12_5/JS
> -12_5/bin:/apps/sybase-12_5/OCS-12_5/bin:/apps/sybase-12_5/ASE-12_5/bi
> n:/apps/sybase-12_5/ASE-12_5/install:/apps/sybase-12_5/$SYBASE_FTS/bin
> :/usr/local/bin:/usr/sfw/bin:/etc/switch/bin:/usr/bin:/usr/sbin:/usr/c
> cs/bin:/usr/sbin:/usr/bin:/etc/switch/bin:/etc/switch/adm:/etc/switch/
> cfg
> LM_LICENSE_FILE=/etc/opt/licenses/licenses_combined
> SYBASE_JRE=/apps/sybase-12_5/shared-1_0/JRE-1_3
> LOGNAME=root
> MAIL=/var/mail/root
> SYBASE=/apps/sybase-12_5
> DSQUERY=AMBI_DS_12_5
> CDBHOME=/apps/cdb
> DISPLAY=10.206.2.96:0.0
> SHELL=/usr/bin/ksh
> JAVA_HOME=/usr/jdk/j2sdk1.4.2_05
> SWIHOME=/etc/switch
> HOME=/
> SYBASE_ASE=ASE-12_5
> LD_LIBRARY_PATH=/apps/sybase-12_5/EFTS-12_5_2/lib:/apps/sybase-12_5/EF
> TS-12_5_2/verity/_ssol26/bin:/apps/sybase-12_5/EFTS-12_5_2/verity/_sso
> l26/filters:/apps/sybase-12_5/OCS-12_5/lib:/apps/sybase-12_5/OCS-12_5/
> lib3p64:/apps/sybase-12_5/OCS-12_5/lib3p:/apps/sybase-12_5/EFTS-12_5_2
> /lib:/apps/sybase-12_5/EFTS-12_5_2/verity/_ssol26/bin:/apps/sybase-12_
> 5/EFTS-12_5_2/verity/_ssol26/filters:/apps/sybase-12_5/ASE-12_5/lib:
> TERM=vt100
> ITHOME=/apps/it
> PWD=/data01/installation/perl/sybperl-2.17
> SYBASE_WS=WS-12_5
> TZ=Europe/Brussels
> SYBHOME=/apps/sybase-12_0
> SYBASE_OCS=OCS-12_5
> http_proxy=http://212.35.104.68:8080/
> ftp_proxy=http://212.35.104.68:8080/
> Hippix[root]  /data01/installation/perl/sybperl-2.17 > perl
> Makefile.PL
> Sybase OpenClient 12.5.1 found.
> The sybperl modules need access to a Sybase server to run the tests.
> To clear an entry please enter 'undef'
> Sybase server to use (default: SYBASE): AMBI_DS_12_5_LOAD
> User ID to log in to Sybase (default: sa): sa
> Password (default: undef): Sybase database to use on AMBI_DS_12_5_LOAD
> (default: undef): 
> 
> * Writing login information, including password, to file PWD.
> 
> Checking if your kit is complete...
> Looks good
> Sybase OpenClient 12.5.1 found.
> Writing Makefile for Sybase::BCP
> Writing Makefile for Sybase::BLK
> Writing Makefile for Sybase::CTlib
> Writing Makefile for Sybase::DBlib
> Writing Makefile for Sybase::Sybperl
> Writing Makefile for Sybase
> Hippix[root]  /data01/installation/perl/sybperl-2.17 > make
> cp lib/ctutil.pl blib/lib/ctutil.pl
> cp lib/sql.pl blib/lib/sql.pl
> cp lib/sybutil.pl blib/lib/sybutil.pl
> cp lib/sybperl.pl blib/lib/sybperl.pl
> cp BCP.pm ../blib/lib/Sybase/BCP.pm
> Manifying ../blib/man3/Sybase::BCP.3
> cp BLK.pm ../blib/lib/Sybase/BLK.pm
> Manifying ../blib/man3/Sybase::BLK.3
> cp CTlib.pm ../blib/lib/Sybase/CTlib.pm
> AutoSplitting ../blib/lib/Sybase/CTlib.pm
> (../blib/lib/auto/Sybase/CTlib)
> /usr/local/bin/perl /usr/local/lib/perl5/5.8.5/ExtUtils/xsubpp
> -prototypes -typemap /usr/local/lib/perl5/5.8.5/ExtUtils/typemap
> CTlib.xs > CTlib.xsc && mv CTlib.xsc CTlib.c
> gcc -B/usr/ccs/bin/ -c  -I/apps/sybase-12_5/OCS-12_5/include
> -fno-strict-aliasing -pipe -I/usr/local/include -I/opt/gnu/include
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O    -DVERSION=\"2.17\"
> -DXS_VERSION=\"2.17\" -fPIC "-I/usr/local/lib/perl5/5.8.5/sun4-sol
> LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O    -DVERSION=\"2.17\"
> -DXS_VERSION=\"2.17\" -fPIC
> "-I/usr/local/lib/perl5/5.8.5/sun4-solaris/CORE"  -DCTLIBVS=100
> -DSYBPLVER='"2.17"' -DDO_TIE CTlib.c
> Running Mkbootstrap for Sybase::CTlib ()
> chmod 644 CTlib.bs
> rm -f ../blib/arch/auto/Sybase/CTlib/CTlib.so
> LD_RUN_PATH="/apps/sybase-12_5/OCS-12_5/lib" gcc -B/usr/ccs/bin/
> -L/apps/sybase-12_5/OCS-12_5/lib -G -L/usr/local/lib -L/opt/gnu/li
> LD_RUN_PATH="/apps/sybase-12_5/OCS-12_5/lib" gcc -B/usr/ccs/bin/
> -L/apps/sybase-12_5/OCS-12_5/lib -G -L/usr/local/lib -L/opt/gnu/lib
> CTlib.o  -o ../blib/arch/auto/Sybase/CTlib/CTlib.so
> -L/apps/sybase-12_5/OCS-12_5/lib -lct -lcs -ltcl -lcomn -lintl -lblk
> -lm   
> chmod 755 ../blib/arch/auto/Sybase/CTlib/CTlib.so
> cp CTlib.bs ../blib/arch/auto/Sybase/CTlib/CTlib.bs
> chmod 644 ../blib/arch/auto/Sybase/CTlib/CTlib.bs
> Manifying ../blib/man3/Sybase::CTlib.3
> cp DBlib.pm ../blib/lib/Sybase/DBlib.pm
> AutoSplitting ../blib/lib/Sybase/DBlib.pm
> (../blib/lib/auto/Sybase/DBlib)
> /usr/local/bin/perl /usr/local/lib/perl5/5.8.5/ExtUtils/xsubpp
> -prototypes -typemap /usr/local/lib/perl5/5.8.5/ExtUtils/typemap  DBl
> /usr/local/bin/perl /usr/local/lib/perl5/5.8.5/ExtUtils/xsubpp
> -prototypes -typemap /usr/local/lib/perl5/5.8.5/ExtUtils/typemap
> DBlib.xs > DBlib.xsc && mv DBlib.xsc DBlib.c
> gcc -B/usr/ccs/bin/ -c  -I/apps/sybase-12_5/OCS-12_5/include
> -fno-strict-aliasing -pipe -I/usr/local/include -I/opt/gnu/include -D_
> gcc -B/usr/ccs/bin/ -c  -I/apps/sybase-12_5/OCS-12_5/include
> -fno-strict-aliasing -pipe -I/usr/local/include -I/opt/gnu/include
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O    -DVERSION=\"2.17\"
> -DXS_VERSION=\"2.17\" -fPIC "-I/usr/local/lib/perl5/5.8.5/sun4-sol
> LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O    -DVERSION=\"2.17\"
> -DXS_VERSION=\"2.17\" -fPIC
> "-I/usr/local/lib/perl5/5.8.5/sun4-solaris/CORE"  -DDBLIBVS=1000
> -DSYBPLVER='"2.17"' -DDO_TIE DBlib.c
> Running Mkbootstrap for Sybase::DBlib ()
> chmod 644 DBlib.bs
> rm -f ../blib/arch/auto/Sybase/DBlib/DBlib.so
> LD_RUN_PATH="/apps/sybase-12_5/OCS-12_5/lib" gcc -B/usr/ccs/bin/
> -L/apps/sybase-12_5/OCS-12_5/lib -G -L/usr/local/lib -L/opt/gnu/li
> LD_RUN_PATH="/apps/sybase-12_5/OCS-12_5/lib" gcc -B/usr/ccs/bin/
> -L/apps/sybase-12_5/OCS-12_5/lib -G -L/usr/local/lib -L/opt/gnu/lib
> DBlib.o  -o ../blib/arch/auto/Sybase/DBlib/DBlib.so
> -L/apps/sybase-12_5/OCS-12_5/lib -lsybdb -lm   
> chmod 755 ../blib/arch/auto/Sybase/DBlib/DBlib.so
> cp DBlib.bs ../blib/arch/auto/Sybase/DBlib/DBlib.bs
> chmod 644 ../blib/arch/auto/Sybase/DBlib/DBlib.bs
> Manifying ../blib/man3/Sybase::DBlib.3
> cp Sybperl.pm ../blib/lib/Sybase/Sybperl.pm
> AutoSplitting ../blib/lib/Sybase/Sybperl.pm
> (../blib/lib/auto/Sybase/Sybperl)
> Manifying ../blib/man3/Sybase::Sybperl.3
> Manifying blib/man3/sybperl.3
> Hippix[root]  /data01/installation/perl/sybperl-2.17 > make test
> PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e"
> "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
> t/1_db_dblib...........ok
> 
> t/1_db_money...........ok
> 
> t/2_ct_ctlib...........ok
> 
> t/2_ct_cursor..........ok
> 
> t/2_ct_nsql............ok
> 
> t/2_ct_prepare.........ok
> 
> t/2_ct_xblk............ok
> 
> t/3_bcp................ok
> 
> t/4_blk................ok
> 
> t/5_sybperl............ok
> 
> t/5_sybperl_dbmoney....ok
> 
> All tests successful.
> Files=11, Tests=215,  3 wallclock secs ( 1.44 cusr +  0.38 csys =
> 1.82 CPU)
> No tests defined for Sybase::BCP extension.
> No tests defined for Sybase::BLK extension.
> No tests defined for Sybase::CTlib extension.
> No tests defined for Sybase::DBlib extension.
> No tests defined for Sybase::Sybperl extension.
> Hippix[root]  /data01/installation/perl/sybperl-2.17 > make install
> Installing
> /usr/local/lib/perl5/site_perl/5.8.5/sun4-solaris/auto/Sybase/CTlib/CT
> lib.so
> Installing
> /usr/local/lib/perl5/site_perl/5.8.5/sun4-solaris/auto/Sybase/DBlib/DB
> lib.so
> Files found in blib/arch: installing files in blib/lib into
> architecture dependent library tree
> Installing
> /usr/local/lib/perl5/site_perl/5.8.5/sun4-solaris/sybutil.pl
> Installing /usr/local/share/man/man3/Sybase::CTlib.3
> Installing /usr/local/share/man/man3/Sybase::DBlib.3
> Writing
> /usr/local/lib/perl5/site_perl/5.8.5/sun4-solaris/auto/Sybase/.packlis
> t
> Appending installation info to
> /usr/local/lib/perl5/5.8.5/sun4-solaris/perllocal.pod