gpcheckcat命令

来源:互联网 发布:变魔术软件下载 编辑:程序博客网 时间:2024/06/10 02:16

使用gpcheckcat命令检验你的系统目录的完整性

检查数据库:
nohup $GPHOME/bin/lib/gpcheckcat -p 5432 -v dbname| tee -a /tmp/checkcat.txt &

执行命令:

"$GPHOME/bin/lib/gpcheckcat -A"

查看日志:

cd /home/gpadmin/gpAdminLogs


1) PGOPTIONS='-c gp_session_role=utility' psql -h sdw1 -p 40013 sg
2) create table pg_attr_bkp as select * from pg_attribute where 0=1;
3) copy pg_attr_bkp from '/home/gpadmin/pg_attr_fix.txt';
set allow_system_table_mods = dml;
4) insert into pg_attribute (select * from pg_attr_bkp where not exists (select 1 from pg_attribute where pg_attribute.attrelid=pg_attr_bkp.attrelid));


PGOPTIONS='-c gp_session_role=utility' psql -h sdw1 -p 40013 sg -c "copy pg_attribute from '/home/gpadmin/pg_attr_fix.txt'";
PGOPTIONS='-c gp_session_role=utility' psql -h sdw1 -p 40014 sg -c "copy pg_attribute from '/home/gpadmin/pg_attr_fix.txt'";
 

0 0
原创粉丝点击