---
slug: /reset-parameters
---

# Reset parameters

After you modify the value of a parameter, you can use the `ALTER SYSTEM RESET` statement to reset the parameter to its default value as needed.

## Procedure

1. Log in to seekdb.

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

   ```shell
   mysql -h127.xx.xx.xx -P2881 -uroot -p***** -A
   ```

2. Execute the following command to view the parameter value.

   ```sql
   SHOW PARAMETERS LIKE '%enable_sql_audit%';
   ```

   The query result is as follows:

   ```shell
   +------------------+-----------+-------+---------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
   | name             | data_type | value | info                                                                                                          | edit_level        | default_value | isdefault |
   +------------------+-----------+-------+---------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
   | enable_sql_audit | BOOL      | False | specifies whether SQL audit is turned on. The default value is TRUE. Value: TRUE: turned on FALSE: turned off | DYNAMIC_EFFECTIVE | true          |         0 |
   +------------------+-----------+-------+---------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
   1 row in set
   ```

3. Execute the following command to reset the parameter value.

   The statement is as follows:

   ```shell
   ALTER SYSTEM RESET
       parameter_name [SCOPE = {SPFILE | BOTH}]
   ```

   The following table describes the related parameters.

   * `SCOPE` specifies the scope of the parameter reset. The default value is `BOTH`. `SPFILE` and `BOTH` are described as follows:

     * `SPFILE`: specifies to reset only the parameter value in the parameter table. The reset value takes effect only after seekdb is restarted.

     * `BOTH`: specifies to reset both the parameter value in the parameter table and the memory value. The reset value takes effect immediately and remains effective after seekdb is restarted.

    Example:

    * Reset the parameter value

      ```sql
      ALTER SYSTEM RESET enable_sql_audit;
      ```

4. After the reset is successful, you can use the `SHOW PARAMETERS` statement to verify whether the parameter value is reset, depending on the actual situation (whether to restart seekdb or not).

   ```sql
   SHOW PARAMETERS LIKE '%enable_sql_audit%';
   ```

   The result is as follows:

   ```shell
   +------------------+-----------+-------+---------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
   | name             | data_type | value | info                                                                                                          | edit_level        | default_value | isdefault |
   +------------------+-----------+-------+---------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
   | enable_sql_audit | BOOL      | True  | specifies whether SQL audit is turned on. The default value is TRUE. Value: TRUE: turned on FALSE: turned off | DYNAMIC_EFFECTIVE | true          |         1 |
   +------------------+-----------+-------+---------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
   1 row in set
   ```

## References

* [Overview of parameters](100.configuration-items-overview.md)

* [View parameters](200.view-parameters.md)

* [Modify parameters](300.modify-parameters.md)

* [Overview of system variables](../300.system-variable/100.system-variable-overview.md)