Skip to main content
Version: V1.0.0

SET_PARAM

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

Syntax

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

Parameters

ParameterDescription
pnameThe name of the parameter.
pvalueThe value of the parameter.

Exceptions

Error CodeDescription
HY000
  • The object does not exist or the user does not have sufficient privileges.
  • Invalid value or illegal input value.

Usage Notes

  • You must have the SYSDBA privilege to execute this procedure.

  • Both parameters of this procedure are of the VARCHAR2 type. You must enclose their values in quotation marks.

  • NULL and 'NULL' are different. When NULL is not enclosed in quotation marks, it indicates that the parameter will be set to its recommended value. However, when 'NULL' is used, it indicates that the parameter will be set to NULL.

Examples

Set the default value of the DEGREE parameter.

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