The SET_SCHEMA_PREFS procedure sets the statistics preferences for a specified user.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this.
Syntax
DBMS_STATS.SET_SCHEMA_PREFS (
ownname IN VARCHAR2,
pname IN VARCHAR2,
pvalue IN VARCHAR2);
Parameters
| Parameter | Description |
|---|---|
| ownname | The username. If the username is set to NULL, the current login username is used by default. |
| pname | The name of the preference. |
| pvalue | The value of the preference. |
Exceptions
| Error code | Description |
|---|---|
| OBE-20000 | The object does not exist or the privileges are insufficient. |
| OBE-20001 | Invalid value or illegal input value. |
Considerations
To run this procedure, you must connect as the specified user or have the
SYSDBAprivilege.The parameters in this procedure are of the
VARCHAR2type, and their values must be enclosed in quotation marks.
Examples
obclient> CALL DBMS_STATS.SET_SCHEMA_PREFS('hr', 'DEGREE','10');
Query OK, 0 rows affected
