Sybase-common-11.9.2-1.i386.rpm
Sybase-ase-11.9.2-1.i386.rpm
安裝Sybase OpenClIEnt
Sybase-openclIEnt-11.1.1-1.i386.rpm
來源:
http://www.Sybase.com/products/databaseservers/Linux/thankyou1192.Html
方法:
rpm -hiv Sybase-common-11.9.2-1.i386.rpm
rpm -hiv Sybase-ase-11.9.2-1.i386.rpm
rpm -hiv Sybase-openclIEnt-11.1.1-1.i386.rpm
其默認安裝路徑為/opt/sybase-11.9.2 如需重定路徑至/home/Sybase:
rpm --relocate "/opt/sybase-11.9.2"="/home/Sybase" -hiv ...
運行
$HOME/install/sybinstall.sh
$HOME/.profile
其安裝程序為$HOME/bin/srvbuild,需要在XWindows下運行,已包含在.profile中.
安裝後還需設定環境變量
SYBASE=/home/Sybase
DSQUERY=Sybase(servername)
安裝PERL DBI
1 需要的程序包
DBI-1.xx.tar.gz
DBD-Sybase-0.xx.tar.gz
來源:
http://www.perl.com/CPAN-local/authors/Michael_Peppler/
http://www.perl.com/CPAN-local/modules/by-module/DBI/TIMB/
2 安裝方法
gunzip DBI-1.xx.tar.gz
tar xvf DBI-1.xx.tar
perl Makefile.PL
make
make test
make install
gunzip DBD-Sybase-0.xx.tar.gz
tar xvf DBD-Sybase-0.xx.tar
perl Makefile.PL
make
make test
make install
3 基本編程范例:
#!/usr/bin/perl
use DBI;
my $server = "Sybase";
my $dbh = DBI->connect('dbi:Sybase:','sa','',{syb_dbd_server=>$server});
my $sth = $dbh->prepare("sp_help");
$sth->execute();
my $text;
while(($text) = $sth->fetchrow)
{
print $text."\n";
}
exit(0);