ORA-38029: object statistics are locked
Oracle¿Qué significa?
Se rechazó la recopilación/eliminación de estadísticas porque las estadísticas del optimizador de una tabla (o esquema) están bloqueadas. Las estadísticas bloqueadas están protegidas contra su recálculo con DBMS_STATS.
¿Por qué ocurre?
Se llamó antes a DBMS_STATS.LOCK_TABLE_STATS o LOCK_SCHEMA_STATS (p. ej., para mantener fijas las estadísticas), o una importación de Data Pump (sobre todo CONTENT=METADATA_ONLY) dejó las estadísticas bloqueadas sin intención. Ejecutar GATHER_TABLE_STATS mientras están bloqueadas genera este error.
Cómo solucionarlo
Desbloquee las estadísticas: EXEC DBMS_STATS.UNLOCK_TABLE_STATS('APP_SCHEMA','MY_TABLE'); o a nivel de esquema DBMS_STATS.UNLOCK_SCHEMA_STATS('APP_SCHEMA'); Si no quiere quitar el bloqueo pero sí recopilar, use FORCE=>TRUE: EXEC DBMS_STATS.GATHER_TABLE_STATS('APP_SCHEMA','MY_TABLE', force=>TRUE); Para ver el estado del bloqueo: SELECT table_name, stattype_locked FROM dba_tab_statistics WHERE stattype_locked IS NOT NULL;
Más entradas de este motor
- ORA-00376file N cannot be read at this time
- ORA-12520TNS:listener could not find available handler for requested type of server (el listener no encontró un handler disponible para el tipo de servidor solicitado)
- ORA-28001the password has expired
- ORA-00845MEMORY_TARGET not supported on this system (MEMORY_TARGET no es compatible con este sistema)
- ORA-27102out of memory
- ORA-04030out of process memory when trying to allocate N bytes (memoria de proceso agotada al intentar asignar N bytes)
- ORA-12537TNS:connection closed