sybase错误:JZ006: 捕获到 IO 例外

来源:互联网 发布:有没有免费db2数据 编辑:程序博客网 时间:2024/06/08 10:45

今天遇到在sybase里一个奇怪的问题:

在执行下语句时就没有问题:

select distinct a.nickname,a.id
from userbasicinfo a,groupinfo b
where a.id = b.member
and b.type = 1 and b.groupid = '好的'

执行下语句时里就没有问题时就报错误:JZ006: 捕获到 IO 例外。。。

select distinct a.id ,a.nickname
from userbasicinfo a,groupinfo b
where a.id = b.member
and b.type = 1 and b.groupid = '好的'

结果又发现在userbasicinfo 表加上主建或索引就报错,不加就不会报错,所以确定应该是索引的存储有问题。

解决办法:在sybase数据库上新建一个段newsegment,然后指向一个新设备,重新建下这个表,问题解决。如下代码: