My problem is that I have a schema where the statistics of all tables are locked.
I found on the Internet that I can unlock using the DBMS_STATS.UNLOCK_TABLE_STATS (SCHEMA_NAME)
procedure.
What I need to know is the how Oracle determines when the statistics are going to be locked and when not, to avoiding these kind of situations.