当前位置:网站首页>金仓数据库KingbaseES中的sys_checksums坏块检测功能
金仓数据库KingbaseES中的sys_checksums坏块检测功能
2022-06-11 10:23:00 【沉舟侧畔千帆过_】
关键字:
KingbaseES ,checksum,坏块检测
1. sys_checksums简介
sys_checksums用于检测kingbase存储在磁盘上的数据坏块情况,也可以用于启动数据校验和以及关闭数据校验和。
开启checksum后,kingbase将数据从shared buffer写到磁盘,此时会计算checksum;从磁盘读取block到shared buffer里,同样会计算block的checksum,对比存在page头的checksum是否一致。在shared buffer里面的block,读取、更新时均不需要计算checksum。
2. sys_checksums实操
2.1)./sys_ctl –D ./data stop停止数据库,检查数据库是否开启checksum
./sys_checksums –c ./data

2.2)启用checksum
./sys_checksums -e ./data

2.3)./sys_ctl -D ./data start启动数据库,ksql连接数据库,创建表

2.4)执行select * from sys_relation_filepath('t1');查询表t1对应的物理文件

2.5)停止数据库
2.6)使用vim -b ./data/base/16078/16396打开物理文件 ,然后命令模式下输入:%!xxd,修改块内容,修改后,命令行模式输入:%!xxd -r 恢复二进制格式,保存退出(下图修改7400为7300)

2.7)使用./sys_checksums -c ./data检测坏块

边栏推荐
猜你喜欢
随机推荐
Picture rule page turning
Ugui mouse click diffusion UI effect
Dotween usage
Jedislock redis distributed lock implementation
Can station B make money?
Ugui picture wall
Differences between beanfactory and factorybean
RSA signature issues
rpc的正确打开方式|读懂Go原生net/rpc包
What are the ABAP keywords and syntax that cannot be used in the ABAP cloud environment?
Explain the physical layer consistency test of 2.5g/5g/10g Base-T Ethernet interface in detail!
Differences between beanfactorypostprocessor and beanpostprocessor
Data consistency
【CV基础】颜色:RGB/HSV/Lab
[machine learning theory] true positive, true negative, false positive, false negative concept
Tree topology networking structure of ZigBee module communication protocol
为什么DDRx的电源设计时需要VTT电源
WordPress网站备份
Cas de rectification du CEM rayonné par des équipements électroniques
Use bat to write to the first line of the file








