The SET_GLOBAL_PREFS procedure sets global statistics preferences.
Syntax
DBMS_STATS.SET_GLOBAL_PREFS (
pname IN VARCHAR2,
pvalue IN VARCHAR2);
Parameters
| Parameter | Description |
|---|---|
| pname | The name of the preference. |
| pvalue | The value of the preference. |
Exceptions
| Error code | Description |
|---|---|
| ORA-20000 | You do not have the required privilege. |
| ORA-20001 | Input values are invalid. |
Considerations
To call this procedure, you must have the
SYSDBAsystem privilege.The two parameters of this procedure are of the
VARCHAR2type and their values must be enclosed with parentheses.
Examples
Set the default value of the global-level APPROXIMATE_NDV parameter to FALSE.
obclient> CALL DBMS_STATS.SET_GLOBAL_PREFS ('APPROXIMATE_NDV', 'FALSE');
Query OK, 0 rows affected