The DELETE_SCHEMA_PREFS procedure is used to drop the statistics preferences for all tables in a 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 Prefs. |
Exceptions
Error Code |
Description |
|---|---|
| HY000 | The schema does not exist, or the user has insufficient permissions, or the value is invalid or the input value is illegal. |
Usage instructions
To run this procedure, you must be connected to the database as the specified user or have the
SYSDBAprivilege.All parameters in this process are of the
VARCHAR2type, and their values must be enclosed in quotation marks.
Examples
Delete the DEGREE preference under the hr Schema.
obclient> CALL DBMS_STATS.DELETE_SCHEMA_PREFS('hr', 'DEGREE');
Query OK, 0 rows affected