SET_PARAM

2026-02-02 07:28:28  Updated

The SET_PARAM procedure sets the default value for a parameter of procedures in the DBMS_STATS package. You can call the GET_PARAM function to obtain the current default value of a parameter.

Syntax

DBMS_STATS.SET_PARAM (
  pname      IN    VARCHAR2,
  pval       IN    VARCHAR2);

Parameters

Parameter Description
pname The name of the parameter.
pvalue The value of the parameter.

Exceptions

Error code Description
HY000
  • The object does not exist, or you do not have the required privileges.
  • Input values are invalid.

Considerations

  • To call this procedure, you must have the SYSDBA system privilege.

  • The two parameters of this procedure are of the VARCHAR2 type and their values must be enclosed with parentheses.

  • NULL and 'NULL' are different. NULL specifies to set the parameter to the recommended value and 'NULL' specifies to set the parameter to NULL.

Examples

Set the default value of the DEGREE parameter.

obclient> CALL DBMS_STATS.SET_PARAM('DEGREE','20');
Query OK, 0 rows affected

Contact Us