The RESET_PARAM_DEFAULTS procedure restores all parameters set by the SET_PARAM procedure to their database-recommended default values.
This procedure is commonly used for one-click restoration after adjusting statistics collection parameters: parameters set by SET_PARAM (such as CASCADE, METHOD_OPT, ESTIMATE_PERCENT, DEGREE, etc.) apply to all subsequent statistics collection operations. If you want to undo these adjustments and restore the system's default behavior, you can directly call this procedure without having to re-set PARAM for each parameter individually.
Syntax
DBMS_STATS.RESET_PARAM_DEFAULTS;
Considerations
- This procedure has no parameters and only affects parameter-level default values set via
SET_PARAM. It does not affect preferences (Prefs) set viaSET_GLOBAL_PREFSorSET_TABLE_PREFS. - After resetting, you can use
GET_PARAMto query each parameter and confirm that they have been restored to their default values.
Examples
Reset the default values of all parameters and confirm using GET_PARAM.
obclient> CALL DBMS_STATS.RESET_PARAM_DEFAULTS;
obclient> SELECT DBMS_STATS.GET_PARAM('CASCADE');
The result is as follows:
+---------------------------------+
| DBMS_STATS.GET_PARAM('CASCADE') |
+---------------------------------+
| DBMS_STATS.AUTO_CASCADE |
+---------------------------------+
1 row in set