免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 6920 | 回复: 6
打印 上一主题 下一主题

DBS::SYBASE安装问题 [复制链接]

论坛徽章:
0
1 [报告]
发表于 2009-06-08 12:05 |显示全部楼层

回复 #20 ppiqq 的帖子

终于配置好了

自己经过测试,现在终于配置好了,现在拿出来和大家共同参考!有问题可以共同学习和提高。

关于在UNIX下使用Perl连接Sybase的配置

Step 1:安装FreeTDS模块
这是个Sybase的Client端软件,必须安装。可以从www.freetds.org/software.html上下载源文件安装程序FreeTDS-stable.tgz来进行安装。
可能需要在系统上增加如下的环境变量: LD_LIBRARY_PATH中增加/usr/4lib
安装步骤:
安装FreeTDS
#gunzip FreeTDS-stable.tgz
#tar xvf FreeTDS-stable.tar
#cd freetds-0.63     目前版本是0.63
#./configure --prefix=/usr/local/freetds
#make
#make install
配置FreeTDS
#cd /usr/local/freetds/etc
修改配置文件freetds.conf,在其中增加需要连接的Sybase服务器相关信息,如下:
[TEST]
        host=192.168.0.1
        port=4100
        tds version = 5.0

Step 2:安装和配置DBI-1.50 、DBD-Sybase-1.07 、sybperl-2.18等Module即可。可以从www.cpan.org上下载。

连接示例:
#!/usr/bin/perl
#
use DBI;
use Sybase:Blib;
Sybase:Blib:BSETLCHARSET("eucgb";
Sybase:Blib:BSETLNATLANG("chinese";

$dbh = Sybase:Blib->new('root', '1234', 'TEST');
$dbh->dbcmd("select * from test.name;";
$dbh->dbsqlexec;
while($dbh->dbresults != NO_MORE_RESULTS) {
   while(@data = $dbh->dbnextrow) {
          print @data,"\n";
   }
}
$dbh->dbclose;
急求助:如何配置perl使用Sybase?!(页 1) - Perl - ChinaUnix.net - powered by Discuz! Archiver (11 June 2009)
http://bbs.chinaunix.net/archiver/?tid-705009.html

论坛徽章:
0
2 [报告]
发表于 2009-06-08 12:41 |显示全部楼层

回复 #1 ppiqq 的帖子

Unfortunately in DBD::Sybase 1.08 I removed some code that allowed it to
work with older DBI versions.

DBD::Sybase 1.08 requires a fairly recent version of DBI (I haven't check
the exact version). If you upgrade your DBI to the current version you
should have no problems.
http://www.issociate.de/board/po ... ith_CentOS_4.5.html

论坛徽章:
0
3 [报告]
发表于 2009-06-08 14:44 |显示全部楼层
Driver_xst.h:14 贴出来

论坛徽章:
0
4 [报告]
发表于 2009-06-08 14:52 |显示全部楼层

回复 #5 ppiqq 的帖子

So you need to add pTHX/pTHX_ as the first argument in function declarations and aTHX/aTHX_ in the function calls. And eventually these errors will go away. Do not use dTHX, since it reverts things to the way they were before. And as you go eliminate any dTHX calls that you use. For more information please refer to the perlguts manpage, when it talks about: The third, even more efficient way is to ape how it is done within the Perl guts: ...
Re: [apreq2] proper support for ithreads (8 June 2009)
http://mail-archives.apache.org/ ... q-dev/200402.mbox/%

论坛徽章:
0
5 [报告]
发表于 2009-06-08 16:21 |显示全部楼层

回复 #10 ppiqq 的帖子

试验一下。

论坛徽章:
0
6 [报告]
发表于 2009-06-09 15:30 |显示全部楼层
Please set SYBASE in CONFIG, or set the $SYBASE environment variable at ./util/config.pl line 75.
$SYBASE环境变量没有设置。

论坛徽章:
0
7 [报告]
发表于 2009-06-09 16:14 |显示全部楼层

回复 #18 ppiqq 的帖子

可以先指定一个你想安装的位置啊
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP