数据库和应用迁移 UGO-以Oracle为源设置GaussDB数据库GUC参数:操作步骤

时间:2024-05-29 09:24:00

操作步骤

  • 以8.0主备版为例
  1. 连接上 GaussDB数据库 ,切换至 GaussDB 的安装用户下。

    su - omm

    "omm"为示例用户,切换时以实际安装用户为准。

  2. 执行以下命令,设置参数

    gs_guc reload -Z coordinator -Z datanode -N all -I all -c "behavior_compat_options='bind_procedure_searchpath,truncate_numeric_tail_zero,plsql_security_definer,proc_outparam_override,aformat_null_test,rownum_type_compat,allow_procedure_compile_check,proc_implicit_for_loop_variable,plstmt_implicit_savepoint,end_month_calculate,disable_rewrite_nesttable,plpgsql_dependency,display_leading_zero,correct_to_number,unbind_divide_bound,convert_string_digit_to_numeric,hide_tailing_zero,return_null_string,aformat_regexp_match,compat_cursor,enable_funcname_with_argsname,tableof_elem_constraints,merge_update_multi'";

    gs_guc reload -Z coordinator -Z datanode -N all -I all -c "plsql_compile_check_options='plsql_expression_check'";

    GaussDB 3.1企业版以及以后版本生效。

    gs_guc reload -Z coordinator -Z datanode -N all -I all -c "a_format_version='10c'";

    gs_guc reload -Z coordinator -Z datanode -N all -I all -c "a_format_dev_version='s4'";

    GaussDB 3.1企业版使用s1,GaussDB 3.2企业版使用s2,GaussDB 3.1企业版使用s3,GaussDB 8.0企业版使用s4。版本号对应参考自建GaussDB内核版本号与UGO界面显示GaussDB版本号对应关系

  • 以8.0分布式为例
  1. 连接上GaussDB数据库,切换至GaussDB的安装用户下。

    su - omm

    "omm"为示例用户,切换时以实际安装用户为准。

  2. 执行以下命令设置参数。

    gs_guc reload -Z coordinator -Z datanode -N all -I all -c "behavior_compat_options='bind_procedure_searchpath,truncate_numeric_tail_zero,plsql_security_definer,proc_outparam_override,aformat_null_test,plstmt_implicit_savepoint,end_month_calculate,disable_rewrite_nesttable,display_leading_zero,correct_to_number,unbind_divide_bound,convert_string_digit_to_numeric,hide_tailing_zero,return_null_string,aformat_regexp_match,enable_funcname_with_argsname,tableof_elem_constraints,merge_update_multi'";

    gs_guc reload -Z coordinator -Z datanode -N all -I all -c "a_format_version='10c'";

    gs_guc reload -Z coordinator -Z datanode -N all -I all -c "a_format_dev_version='s4'";

    503.0版本使用s1,503.1版本使用s2,503.2版本使用s3,505.0版本使用s4。版本号对应参考自建GaussDB内核版本号与UGO界面显示GaussDB版本号对应关系

support.huaweicloud.com/ugo_faq/zh-cn_topic_0000001933493305.html