返回首页

gbase数据、南大通用产品文档:GBase8a创建VC2 和VC2 的distribution

更新日期:2024年09月11日

操作场景
使用多VC 模式。
前提条件

集群运行正常;

root cluster 中存在freenode;

gcadmin 可用。
操作步骤
步骤1

GBase 8a MPP Cluster 产品手册
3 集群安装升级与卸载
文档版本953(2022-09-15)
南大通用数据技术股份有限公司
82
切换到dbaUser 用户(即demo.options 中的dbaUser 用户),进入安装包解压后的
gcinstall 目录下,生成创建VC2 的配置示范文件示例。
示例:
# su - gbase
$ cd /opt/gcinstall
$ gcadmin createvc e create_vc2.xml
$ cat create_vc2.xml











(:wq 保存退出)
说明

vc_name 不能超过64 个字节,comment 信息不能超过60 个字节;

创建VC 的配置文件中的node ip 为Free node 的IP,
多个VC 间不能共享;
步骤2
执行创建vc2 命令。
$ gcadmin createvc create_vc2.xml
执行结果如下:
$ gcadmin createvc create_vc2.xml
parse config file create_vc2.xml
generate vc id: vc00002
add vc information to cluster

GBase 8a MPP Cluster 产品手册
3 集群安装升级与卸载
文档版本953(2022-09-15)
南大通用数据技术股份有限公司
83
add nodes to vc
gcadmin create vc [vc2] successful
步骤3
编辑在vc2 上创建distribution 的配置文件gcChangeInfo_vc2.xml 内容。
示例:
$cd gcinstall
$cp gcChangeInfo.xml gcChangeInfo_vc2.xml
$vi /opt/gcinstall/gcChangeInfo_vc2.xml











步骤4
在安装目录下,执行创建distribution 命令。
执行结果如下:
$ gcadmin distribution gcChangeInfo_vc2.xml p 1 d 1 db_user user_name
db_pwd password vc vc2
gcadmin generate distribution ...
NOTE: node [192.168.146.22] is coordinator node, it shall be data node too
gcadmin generate distribution successful

--------------------------------
---------------------------------------------------------------------------------------
当 BAR_PERFORMANCE 设置为 2 或 3 时,活动报告使用微秒时间戳记(如以下示例
所示):

GBase 8s 备份与恢复指南
南大通用数据技术股份有限公司 - 104 -
图: ON-Bar 活动日志中的样本处理速率(以微秒计)。
2009-06-03 16:34:04 15272 15270 /usr/gbasedbt/bin/onbar_d complete,
returning 0 (0x00)
2009-06-03 16:45:11.608424 17085 17083 /usr/gbasedbt/bin/onbar_d -r -w
2009-06-03 16:46:07.926097 17085 17083 Successfully connected to Storage
Manager.
2009-06-03 16:46:08.590675 17085 17083 Begin salvage for log 311.
2009-06-03 16:48:07.817487 17085 17083 Completed salvage of logical log 311.
2009-06-03 16:48:08.790782 17085 17083 Begin salvage for log 312.
2009-06-03 16:48:10.129534 17085 17083 Completed salvage of logical log 312.
2009-06-03 17:06:00.836390 17085 17083 Successfully connected to Storage
Manager.
...
2009-06-03 17:07:26.357521 17085 17083 Completed cold level 0 restore
datadbs07.
2009-06-03 17:07:28.268562 17085 17083 Begin cold level 0 restore datadbs08
(Storage Manager copy ID: 28122 0).
2009-06-03 17:07:29.378405 17085 17083 Completed cold level 0 restore
datadbs08.

使用本功能,
可以将表数据导成SELECT、INSERT、UPDATE、DELETE、MERGE

GBaseDataStudio 管理工具手册
- 54 -
南大通用数据技术股份有限公司
以及DLL 对应的语句。
在“数据库导航”中,依次展开服务器、
“数据库”

“用户表”节点,右键
单击需要过滤表,选择“生成SQL”,选择SELECT、INSERT、UPDATE、DELETE、
MERGE 或者DLL,会生成对应的SQL 语句。
图5- 379 生成SQL

GBaseDataStudio 管理工具手册
南大通用数据技术股份有限公司
- 55 -
图5- 380 表SQL