Document Type | Troubleshooting
Category | Adnimistration
Applicable Product Version | 7FS02
Document Number | TADTI015
Issue
Error 20018 occurs when collecting statistical information, causing the collection to fail.
Note
TBR-20018: Object statistics are locked.
Cause
If the statistics of a specific table are locked, the collection of statistical information fails.
Solutions
1. Lock and Unlock Statistics by Schema
exec DBMS_STATS.LOCK_SCHEMA_STATS('TIBERO'); - Lock collection of all statistics for the TIBERO account
exec DBMS_STATS.UNLOCK_SCHEMA_STATS('TIBERO'); - Unlock collection of all statistics for the TIBERO account
2. Lock and Unlock Statistics by Table
exec DBMS_STATS.LOCK_TABLE_STATS('TIBERO','TEST'); - Lock collection of statistics for the TEST table and indexes in the TIBERO account
exec DBMS_STATS.UNLOCK_TABLE_STATS('TIBERO','TEST'); - Unlock collection of statistics for the TEST table and indexes in the TIBERO account
3. Query Locked Statistics Targets
select b.owner,b.object_name from _dd_tbl a, dba_objects b where a.obj_id=b.object_id and a.status=1;