南大通用数据库巡检脚本说明

1、南大通用GBase数据库运行方式

GBase 8a

只要有南大通用GBase 8a的默认客户端gccli或gbasemysql客户端即可,使用MariaDB的客户端也可以,如下:

-- 使用gccli命令行
gccli -uroot -plhr -h192.168.8.8 -P5258  -f -s  <  DB_GBase8a_HC_lhr_v7.0.0 > lhr_GBase8a_check.html

-- 使用gbase命令行
gbase -uroot -plhr -h192.168.8.8 -P5258  -f -s  <  DB_GBase8a_HC_lhr_v7.0.0 > lhr_GBase8a_check.html


-- Windows上,可以使用MySQL客户端,使用5.7版本,否则会报错:ERROR 1043 (08S01): Bad handshake
D:\db\MySQL\mysql-5.7.30-winx64\bin\mysql -uroot -plhr -h192.168.8.8 -P5258 -f -s  <  DB_GBase8a_HC_lhr_v7.0.0 > lhr_GBase8a_check.html

GBase 8c

需要有GBase 8c的gsql客户端,或PostgreSQL数据库的psql客户端都可以,运行方式如下:

若是GBase 8c或华为的GaussDB数据库的gsql客户端,则执行:

gsql -U gha -h 192.168.8.8 -p 5432 -d postgres -W'lhr@123XXT' -H -f D:\DB_GBase8c_HC_lhr_v7.0.0.sql > d:\GBase8c_health_check.html

若是PostgreSQL数据库的psql客户端,则执行:

psql -U gha -h 192.168.8.8 -p 5432 -d postgres -W -H -f D:\DB_GBase8c_HC_lhr_v7.0.0.sql > d:\GBase8c_health_check.html

psql需要输入密码,回车即可。

注意:

1、该脚本的字符集为utf8,请使用utf8格式打开该文件。

2、建议使用gbase用户在服务器本地跑脚本。

2、html巡检结果

这里只列出部分结果,完整示例请参考:

其它的详细内容可以参考:https://share.weiyun.com/FQY9zcm0

GBase 8a

其它不再列举。

GBase 8c

其它不再列举。

3、所有数据库类型巡检

请参考:https://www.dbaup.com/shujukuxunjianjiaoben.html

Copyright © 小麦苗 2024 修订时间: 2024-09-11 17:07:52

results matching ""

    No results matching ""