The DELETE_SCHEMA_PREFS procedure deletes the statistics preferences of all tables in the specified schema.
Syntax
DBMS_STATS.DELETE_SCHEMA_PREFS (
ownname IN VARCHAR2,
pname IN VARCHAR2);
Parameters
| Parameter | Description |
|---|---|
| ownname | The name of the schema. |
| pname | The name of the preference. |
Exceptions
| Error Code | Description |
|---|---|
| HY000 | The schema does not exist, or the user does not have sufficient privileges, or the input value is invalid or illegal. |
Considerations
To run this procedure, you must connect to the database as the specified user or have the
SYSDBAprivilege.The parameters in this procedure are of the
VARCHAR2type. You must enclose their values in quotation marks.
Examples
Delete the DEGREE preference of the hr schema.
obclient> CALL DBMS_STATS.DELETE_SCHEMA_PREFS('hr', 'DEGREE');
Query OK, 0 rows affected
