个人总结:informix集群出现:140: ISAM error: operation illegal on a DR Secondary

来源:互联网 发布:海康网络摄像机重量 编辑:程序博客网 时间:2024/06/05 10:26

先介绍一下服务器和客户端的环境:

服务器操作系统:AIX;

本机:win7 安装有SSH Secure File Transfer Client

连接服务器的工具:SSH Secure File Transfer Client

在部署好的informix集群中,使用dbaccess 命令后,执行update statistics for table gongwen 的时候,报如下的错误:

 26097: Operation is not valid on a secondary server.  
 140: ISAM error: operation illegal on a DR Secondary
 

出错原因是:使用SSH访问当前的服务器地址不是主服务器(因为是informix集群,所以会有多台informix服务器),而是从属服务器,

解决这个问题的方法,当然就是使用SSH访问主服务器地址,使用dbaccess后,再执行上面的update statistics for table gongwen 命令就不会出错了。


注:执行update statistics for table gongwen  ,因为

informix 库在批量记录操作后,如果不对表空间的回收以及索引整理会严重影响数据库的处理效率,对此处理方法如下:
        做update statistics,回收空间可以重新建表,或者,可能做一个cluster index或许会有效 
        用了单个表的update statistics [for table 〈table—name〉] 
具体步骤如下:
1、把公文查询相关的SQL找出来,看看用到了那些表;
2、针对这些表,在dbaccess中执行
update statistics for table gongwen;
 
把gongwen换成每个表名,依次执行
3、重新测试SQL执行效率