SE 4.10 bcheck <filename>,SE 2.10 bcheck <filename.ext>和其他bcheck异常</filename.ext> </filename>

时间:2010-07-22 05:05:22

标签: informix

ISQL-SE 4.10.DD6(DOS 6.22):

BCHECK  C-ISAM B-tree Checker version 4.10.DD6  

C-ISAM File: c:\dbfiles.dbs\*.*

ERROR: cannot open C-ISAM file

在SE2.10中,它与wilcards *。*一起用于所有文件,但在SE4.10中却没有。我有一个SQL脚本,我的用户定期运行该脚本来重组客户和事务表。然后我有一个FIX.BAT DOS脚本[bcheck -y *。*]作为我的用户的实用程序选项,以防任何表被搞砸。由于运行reorg的用户现在会增加表版本号,例如:CUSTO102,110,...现在我将不得不设法从.DBS目录中剥离.DAT扩展并将其提供给BCHECK。在此之前,我的reorg将始终使用CREATE TABLE客户IN“C:\ DBFILES.DBS \ CUSTOMER”重新创建一个静态CUSTOMER.DAT;但这造成了写权限问题,不得不恢复到SE的默认数据文件日记......

在CUSTO102上运行BCHECK之前,其.IDX文件大小为22,089字节,其.DAT大小为882,832字节。

在CUSTO102上运行BCHECK后,其.IDX大小增加到122,561字节,但创建了一个新的.IDY文件,其中包含88,430字节..

什么是.IDY文件???

C:\DBFILES.DBS> bcheck –y CUSTO102

BCHECK  C-ISAM B-tree Checker version 4.10.DD6  

C-ISAM File: c:\dbfiles.dbs\CUSTO102

Checking dictionary and file sizes.
Index file node size = 512
Current C-ISAM index file node size = 512
Checking data file records.
Checking indexes and key descriptions.
Index 1 = unique key  
    0 index node(s) used -- 1 index b-tree level(s) used
Index 2 = duplicates  (2,30,0) 
    42 index node(s) used -- 3 index b-tree level(s) used
Index 3 = unique key  (32,5,0) 
    29 index node(s) used -- 2 index b-tree level(s) used
Index 4 = duplicates  (242,4,2) 
    37 index node(s) used -- 2 index b-tree level(s) used
Index 5 = duplicates  (241,1,0) 
    36 index node(s) used -- 2 index b-tree level(s) used
Index 6 = duplicates  (46,4,2) 
    38 index node(s) used -- 2 index b-tree level(s) used
Checking data record and index node free lists.

ERROR: 177 missing index node pointer(s)
Fix index node free list ? yes

Recreating index node free list.
Recreating index 6.
Recreating index 5.
Recreating index 4.
Recreating index 3.
Recreating index 2.
Recreating index 1.
184 index node(s) used, 177 free -- 1083 data record(s) used, 0 free

1 个答案:

答案 0 :(得分:1)

使用外卡的问题更可能是用于运行 bcheck 的命令解释程序而不是 bcheck 本身的问题。如果你给 bcheck 一个文件名列表(例如'abc def.dat def.idx',那么它将处理C-ISAM文件对(abc.dat,abc.idx),(def。 dat,def.idx)和(def.dat,def.idx - 再次)。由于它抱怨无法打开'c:\dbfiles.dbs\*.*',这意味着命令解释器没有扩展'{{1} }',或者没有任何东西可以扩展到。

我希望'*.*'文件是在重建表索引时使用的中间件。我不知道为什么没有清理 - 也许这个过程没有完成。

关于大小,我认为你的表有大约55,000行,每行368个字节(SE可能会说367;差异是结尾的记录状态字节,要么是'.IDY'要删除,要么' \0'为当前)。对于大约1000个索引节点,CHAR(5)列(索引3)上的唯一索引要求每个条目9个字节,或每个索引节点大约56个密钥。重复索引难以调整大小;您需要空间用于键值以及重复项的4字节数字列表,所有这些都打包成512字节的页面。 22 KB索引文件缺少大量信息。修订后的索引文件大小合适。请注意,索引1是'ROWID'索引;它不占用任何空间。 (索引1也是为什么虽然SE创建的每个表都存储在C-ISAM文件中,但并非所有C-ISAM文件都必须与SE兼容。)