Skip to main content

Modify parameters

You can modify parameters to make seekdb behave as required by your business. Parameters are divided into dynamic and restart-effective parameters. You can use parameters to control the modules of seekdb.

For more information about parameters, see Parameter management.

Procedure

  1. Log in to seekdb.

    The following example shows how to connect to the database. Please replace the placeholders with your actual environment.

    mysql -h127.xx.xx.xx -P2881 -uroot -p***** -A
  2. Execute the following command to view the value of a parameter.

    Example:

    SHOW PARAMETERS LIKE '%syslog_level%';

    The query result is as follows:

    +--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
    | name | data_type | value | info | edit_level | default_value | isdefault |
    +--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
    | syslog_level | STRING | WDIAG | specifies the current level of logging. There are DEBUG, TRACE, WDIAG, EDIAG, INFO, WARN, ERROR, seven different log levels. | DYNAMIC_EFFECTIVE | WDIAG | 1 |
    +--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
    1 row in set

    For more information about how to view parameters, see View parameters.

  3. Execute the following command to modify the value of a parameter.

    The statement is as follows:

    ALTER SYSTEM [SET] parameter_name = expression 
    [SCOPE = {SPFILE | BOTH}]

    The following table describes the related parameters:

    • expression specifies the new value of the parameter.

    • SCOPE specifies the scope of the parameter modification. The default value is BOTH. The following table describes the options:

      • SPFILE: specifies that the parameter value is modified only in the parameter file. The modification takes effect only after you restart seekdb.

      • BOTH: specifies that the parameter value is modified both in the parameter file and in memory. The modification takes effect immediately and remains effective after you restart seekdb.

    The following examples show how to modify a parameter:

    ALTER SYSTEM SET syslog_level='ERROR' SCOPE = SPFILE;
    ALTER SYSTEM SET syslog_io_bandwidth_limit = '5M';
  4. After the modification is successful, you can use the SHOW PARAMETERS statement to verify whether the value of the parameter has been modified. You can choose to restart seekdb or not, depending on your actual situation.

    SHOW PARAMETERS LIKE '%syslog_level%';

    The query result is as follows:

    +--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
    | name | data_type | value | info | edit_level | default_value | isdefault |
    +--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
    | syslog_level | STRING | ERROR | specifies the current level of logging. There are DEBUG, TRACE, WDIAG, EDIAG, INFO, WARN, ERROR, seven different log levels. | DYNAMIC_EFFECTIVE | WDIAG | 0 |
    +--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
    1 row in set

References