The SET_SCHEMA_PREFS procedure sets a statistics preference for the specified user.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.
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 logon username is used by default. |
| pname | The name of the preference. |
| pvalue | The value of the preference. |
Exceptions
| Error code | Description |
|---|---|
| ORA-20000 | The object does not exist, or you do not have the required privileges. |
| ORA-20001 | Input values are invalid. |
Considerations
To call this procedure, you must connect to the database as the specified user, or have the
SYSDBAprivilege.The parameters of this procedure are of the
VARCHAR2type and their values must be enclosed with parentheses.
Examples
obclient> CALL DBMS_STATS.SET_SCHEMA_PREFS('hr', 'DEGREE','10');
Query OK, 0 rows affected