grander

回答

grander 回答了问题2018-07-20

集群中根据nodeid计算IP的方法

通过计算器自带的程序员模式,把10进制的数字串贴进去,转换成16进制,根据16进制,以每两个字符为单位进行16进制转化为10进制就能查到nodeid的IP地址,具体如下:例如:nodeid= 3694594570通过计算器转换成16进制则为:DC370A0A0A转换为10进制则为:1037转换为10进制则为:55DC转换为10进制则为:220则转换后的IP地址为:10.10.55.220通过shell ...
浏览24
回答1
grander 回答了问题2018-07-19

扩容coordinator节点报错“fail to execute gcadmin cpcorditbl coorHo...

[align=left][color=#000000]gcadmin[font=宋体]在同步[/font][font=Calibri]coordinator[/font][font=宋体]节点元数据时需要将原有[/font][font=Calibri]coordinator[/font][font=宋体]节点的元数据打包、拷贝到新节点上,然后解压到新[/font][font=Calibri]coordinator[/font][font=宋体]节点上,最后将新[/font][font=Calibri]coordinator[/font][font=宋体]节点的[/font][font=Calibri]gclusterd[/font][font=宋体]进程杀掉重启。出现该问题的原因是可能是由于元数据过多,在打包拷贝的过程中超时造成的。此时可查看[/font][font=Calibri]gcintall.log[/font][font=宋体]中是否有“[/font][font=Calibri]Error cause timeout[/font][font=宋体]”确定。[/font][/color][/align]
浏览35
回答2
grander 回答了问题2018-07-19

扩容coordinator节点报错“fail to execute gcadmin cpcorditbl coorHo...

[quote][size=2][url=forum.php?mod=redirect&goto=findpost&pid=1275&ptid=950][color=#999999]grander 发表于 2018-7-19 11:13[/color][/url][/size] gcadmin在同步coordinator节点元数据时需要将原有coordinator节点的元数据打包、拷贝到新节点上,然后解压 ...[/quote] [align=left][font=宋体][color=#000000]同步元数据超时导致扩容[/color][/font][color=#000000]coordinator[/color][color=#000000][font=宋体]节点失败时,可在执行扩容安装时使用“[/font][font=Calibri]--timeout[/font][font=宋体]”参数设定更大的超时时间,[/font][font=Calibri]gcadmin[/font][font=宋体]默认的超时时间为[/font][font=Calibri]5[/font][font=宋体]分钟。[/font][/color][/align][align=left][color=#000000]gcinstall.py[font=宋体]设定[/font][font=Calibri]timeout[/font][font=宋体]的时间单位为分钟([/font][font=Calibri]minute[/font][font=宋体]),[/font][font=Calibri]help[/font][font=宋体]信息如下所示:[/font][/color][/align][align=left][color=#000000]Usage: gcinstall.py [options][/color][/align][align=left][color=#000000] [/color][/align][align=left][color=#000000]Options:[/color][/align][align=left][color=#000000] -h, --help show this help message and exit[/color][/align][align=left][color=#000000] -U, --upgrade upgrade install[/color][/align][align=left][color=#000000] --silent=SILENTCONFIG[/color][/align][align=left][color=#000000] use the supplied properties file for a 'silent'[/color][/align][align=left][color=#000000] install[/color][/align][align=left][color=#000000] --timeout=TIMEOUT sync coordinator node metadata[/color][/align][align=left][color=#000000] timeout,unit(minute),default 15mins.[/color][/align][align=left][color=#000000] --backup_dir=BACKUP_DIR[/color][/align][align=left][color=#000000] The package path of backup file,default[/color][/align][align=left][color=#000000] /home/$dbaUser.[/color][/align]
浏览35
回答2
grander 回答了问题2018-07-17

错误:exceed max allowed level or nodes 如何解决

具体的sql语句是什么样的(图片没看到),看报错怀疑是start with connect by中有环路,或者层级太多导致。 可以适当调大参数gbase_max_allowed_level再试一下
浏览41
回答2
grander 回答了问题2018-07-17

CTE(common table expression)语法支持

[align=left][font=宋体][color=#000000]打开[/color][/font][color=#000000]_t_gcluster_support_cte [/color][color=#000000][font=宋体]参数,集群支持[/font][font=Calibri]with as[/font][font=宋体]语句。[/font][/color][/align][align=left][color=#000000]with customer_total_return as[/color][/align][align=left][color=#000000] (select sr_customer_sk as ctr_customer_sk,[/color][/align][align=left][color=#000000] sr_store_sk as ctr_store_sk,[/color][/align][align=left][color=#000000] sum(SR_STORE_CREDIT) as ctr_total_return[/color][/align][align=left][color=#000000] from store_returns, date_dim[/color][/align][align=left][color=#000000] where sr_returned_date_sk = d_date_sk[/color][/align][align=left][color=#000000] and d_year = 2000[/color][/align][align=left][color=#000000] group by sr_customer_sk, sr_store_sk)[/color][/align][align=left][color=#000000]select c_customer_id[/color][/align][align=left][color=#000000] from customer_total_return ctr1, store, customer[/color][/align][align=left][color=#000000] where ctr1.ctr_total_return >[/color][/align][align=left][color=#000000] (select avg(ctr_total_return) * 1.2[/color][/align][align=left][color=#000000] from customer_total_return ctr2[/color][/align][align=left][color=#000000] where ctr1.ctr_store_sk = ctr2.ctr_store_sk)[/color][/align][align=left][color=#000000] and s_store_sk = ctr1.ctr_store_sk[/color][/align][align=left][color=#000000] and s_state = 'MI'[/color][/align][align=left][color=#000000] and ctr1.ctr_customer_sk = c_customer_sk[/color][/align][align=left][color=#000000] order by c_customer_id limit 100;[/color][/align]
浏览39
回答1
grander 回答了问题2018-07-16

分级查询表update后start with connect by报错

[align=left][color=#000000]gbase> show variables like '%gbase_fast_update%';[/color][/align][align=left][color=#000000]+-------------------+-------+[/color][/align][align=left][color=#000000]| Variable_name | Value |[/color][/align][align=left][color=#000000]+-------------------+-------+[/color][/align][align=left][color=#000000]| gbase_fast_update | ON |[/color][/align][align=left][color=#000000]+-------------------+-------+[/color][/align][align=left][color=#000000]1 row in set (Elapsed: 00:00:00.01)[/color][/align][align=left][color=#000000]gbase> show variables like '%_gbase_connect_by_support_table_with_deleted_records%';[/color][/align][align=left][color=#000000]+------------------------------------------------------+-------+[/color][/align][align=left][color=#000000]| Variable_name | Value |[/color][/align][align=left][color=#000000]+------------------------------------------------------+-------+[/color][/align][align=left][color=#000000]| _gbase_connect_by_support_table_with_deleted_records | OFF |[/color][/align][align=left][color=#000000]+------------------------------------------------------+-------+[/color][/align][align=left][color=#000000]1 row in set (Elapsed: 00:00:00.00)[/color][/align][align=left][font=宋体][color=#000000]对表进行快速[/color][/font][color=#000000]update[/color][color=#000000][font=宋体],实际采用的是[/font][font=Calibri]delete+insert[/font][font=宋体],在[/font][font=Calibri]_gbase_connect_by_support_table_with_deleted_records[/font][font=宋体]参数关闭的情况下报错。[/font][/color][/align]
浏览30
回答2
grander 回答了问题2018-07-16

分级查询表update后start with connect by报错

[quote][size=2][url=forum.php?mod=redirect&goto=findpost&pid=1262&ptid=943][color=#999999]grander 发表于 2018-7-16 13:22[/color][/url][/size] gbase> show variables like '%gbase_fast_update%';+-------------------+-------+| Variable_name | ...[/quote] [align=left][font=宋体][color=#000000]关闭快速[/color][/font][color=#000000]update[/color][color=#000000][font=宋体]或者打开[/font][font=Calibri]_gbase_connect_by_support_table_with_deleted_records[/font][font=宋体]参数,分级查询支持删除过记录的表。[/font][/color][/align][align=left][color=#000000]gbase> set global _gbase_connect_by_support_table_with_deleted_records=1;[/color][/align][align=left][color=#000000]Query OK, 0 rows affected (Elapsed: 00:00:00.01)[/color][/align][align=left][color=#000000]gbase> show variables like '%_gbase_connect_by_support_table_with_deleted_records%';[/color][/align][align=left][color=#000000]+------------------------------------------------------+-------+[/color][/align][align=left][color=#000000]| Variable_name | Value |[/color][/align][align=left][color=#000000]+------------------------------------------------------+-------+[/color][/align][align=left][color=#000000]| _gbase_connect_by_support_table_with_deleted_records | ON |[/color][/align][align=left][color=#000000]+------------------------------------------------------+-------+[/color][/align][align=left][color=#000000]1 row in set (Elapsed: 00:00:00.00)[/color][/align][align=left][color=#000000]gbase> select * from t connect by prior t.id=t.pid start with pid=0;[/color][/align][align=left][color=#000000]+------+------+------+[/color][/align][align=left][color=#000000]| id | name | pid |[/color][/align][align=left][color=#000000]+------+------+------+[/color][/align][align=left][color=#000000]| 1 | a | 0 |[/color][/align][align=left][color=#000000]| 2 | b | 1 |[/color][/align][align=left][color=#000000]| 3 | abc | 1 |[/color][/align][align=left][color=#000000]+------+------+------+[/color][/align][align=left][color=#000000]3 rows in set (Elapsed: 00:00:00.02)[/color][/align]
浏览30
回答2
grander 回答了问题2018-07-11

GROUP_CONCAT函数引发聚集数据越界

[align=left][font=宋体][color=#000000]更改参数[/color][/font][color=#000000]group_concat_max_len[/color][color=#000000][font=宋体],该参数最大为 [/font][font=Calibri]32767[/font][font=宋体]。[/font][/color][/align]
浏览70
回答1
grander 回答了问题2018-07-11

gbase 数据库管理软件在哪里下载

[quote][size=2][url=forum.php?mod=redirect&goto=findpost&pid=1254&ptid=939][color=#999999]于龙飞 发表于 2018-7-10 18:12[/color][/url][/size] 试用产品我已经申请到了,请问试用版的gbase数据库 有对应的windows版可视化管理工具么? ...[/quote] 可以申请对应的企业管理器
浏览95
回答3