Help Center > > Management Guide> Managing Parameter Templates

Managing Parameter Templates

Updated at: Nov 14, 2019 GMT+08:00

To facilitate database parameter configuration, DWS provides the parameter template function. A parameter template contains some common database parameters. You can manage parameter templates on the DWS management console. After applying a parameter template to a cluster, you can modify parameters on the parameter modification page of the cluster.

The following parts are included in this section:

Parameter Template Overview

A parameter template is a set of parameters applicable to data warehouses. All parameters in the template have default values. The parameters include the session timeout interval, date, and time format. For details, see Parameter Description. You can adjust parameter values to better adapt the database to actual services. When creating a cluster, you can specify a parameter template for it. Parameters in the template will be applied to all databases in the cluster. If you do not specify a parameter template, the system applies the default parameter template to the cluster. After a cluster is created, you can modify the parameters on the Parameter Modifications page. Alternatively, select an existing parameter template or create a parameter template on the Parameter Template Management page and apply it to the cluster.

DWS presets a default parameter template to data warehouses of each version. The default parameter template cannot be deleted and modified. If you want to modify parameter values in the template, create a customized parameter template. The parameters in the customized template can be modified. After a user-defined parameter template is applied to a cluster, it is not associated with the cluster. If you modify the parameter values in the template, the modifications will not be synchronized to the cluster. You need to apply the template to the cluster again, and then the modified parameter values can be applied to the cluster. Similarly, if you modify parameters on the cluster details page, the modifications will not be synchronized to the parameter template.

Parameter Description

Table 1 Parameter description

Parameter

Description

Default Value

session_timeout

Sets the timeout interval of an idle session. The value 0 indicates that the timeout limit is disabled. The unit is second. The value ranges from 0 to 86400.

600

datestyle

Sets the display format for date and time.

ISO,MDY

failed_login_attempts

Sets the number of consecutive incorrect password attempts after which the account is locked. The value 0 indicates that the number of incorrect password attempts is not limited. The value ranges from 0 to 1000.

10

timezone

Sets the time zone displayed in the time stamps.

UTC

log_timezone

Sets the time zone for timestamps in the server log.

UTC

enable_resource_record

Enables or disables the resource recording function.

If the actual execution time of an SQL statement is greater than the value of resource_track_duration (the default value is 60s; customizable), the monitoring information will be archived.

This function will cause storage space expansion and slightly affect system performance. Disable it when it is not required.

NOTE:
  • Archiving: The monitoring information is stored in the history view and archived in the info table. The archiving time is 3 minutes. After the archiving, records in the history view are cleared.
  • History view GS_WLM_SESSION_HISTORY; corresponding info table GS_WLM_SESSION_INFO
  • History view GS_WLM_OPERATOR_HISTORY; corresponding info table GS_WLM_OPERATOR_INFO

off

resource_track_cost

Sets the minimum execution cost for resource monitoring on statements. The value -1 indicates that resource monitoring is disabled (execution cost less than 10). If the value is greater than or equal to 0, and the cost of executing statements exceeds the value and is greater than or equal to 10, resource monitoring is performed.

You can run the SQL command Explain to query the estimated execution cost of an SQL statement.

This parameter is valid only when the cluster version is 1.5.0 or later.

100000

resource_track_duration

Sets the minimum time for archiving executed statements recorded during real-time monitoring.

  • The value 0 indicates that all the statements are archived.
  • If the value is greater than 0, historical statements are archived when the execution time of the statements exceeds this value.

60

password_effect_time

Sets the validity period of the account password. When the password is about to expire or has expired, the system prompts the user to change the password.

The value ranges from 0 to 999, in days. If this parameter is set to 0, the function is disabled.

This parameter is valid only when the cluster version is 1.5.0 or later.

90

update_lockwait_timeout

Sets the maximum duration that a lock waits for concurrent updates on a row to complete. If the lock waiting time exceeds the specified value, an error is reported. The value 0 indicates that an error is reported when there is a lock without waiting for a period of time. The default value is 120000, in milliseconds.

This parameter is valid only when the cluster version is 1.5.100 or later.

120000

Creating a Parameter Template

If parameters in the default parameter template cannot meet service requirements, you can customize a parameter template and modify the parameter values to better adapt to services.

To create a parameter template, perform the following steps:

  1. Log in to the DWS management console.
  2. In the navigation tree on the left, click Parameter Template Management.
  3. Click Create Parameter Template and set the following parameters:

    • Database Engine: Select a database engine.
    • Database Version: Select a database version.
    • Name: Enter the name of the new parameter template.

      Enter 4 to 64 characters. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. The value must start with a letter. Letters are case-insensitive.

    • Description: Enter the description of the new parameter template. This parameter is optional.

      The parameter template description contains 0 to 256 characters and does not support special characters !<>'=&".

    The Database Engine and Database Version selected during parameter template creation must be the same as the cluster type and version of the parameter template to be applied.

    Figure 1 Creating a parameter template

  4. Click OK to start creating the parameter template.

Modifying a Parameter Template

You can modify the parameter values in a user-defined parameter template but cannot modify the parameter values in the default parameter template.

  1. Log in to the DWS management console.
  2. In the navigation tree on the left, click Parameter Template Management.
  3. In the Name column, click the name of the target parameter template. Its parameter table is displayed.
  4. Enter a new value in the Value column of the parameter to be modified. After the modification, click Save.
  5. In the Modification Preview dialog box, confirm the settings and modifications and click Save.

Applying a Parameter Template to the Cluster

After a cluster is created, you can apply a new parameter template to the cluster so that the values of all parameters in the parameter template can take effect in the cluster.

To apply a parameter template, perform the following steps:

  1. Log in to the DWS management console.
  2. In the navigation tree on the left, click Parameter Template Management.
  3. Select the target parameter template and click Apply in the Operation column.
  4. In the Parameter Template Application dialog box that is displayed, select the target cluster.

    You can apply the selected parameter template to the cluster corresponding to the parameter template version.
    Figure 2 Parameter template application

  5. Click OK.

    If some parameter values in the newly applied parameter template are different from the original parameter values in the cluster, the system will prompt the differences.

Deleting a Parameter Template

You can delete an unnecessary parameter template or a parameter template that is no longer used. The default parameter template cannot be deleted. Deleted parameter templates cannot be restored. Exercise caution when performing this operation.

  1. Log in to the DWS management console.
  2. In the navigation tree on the left, click Parameter Template Management.
  3. In the Operation column of the parameter template to be deleted, click Delete.
  4. In the displayed dialog box, click Yes.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel