I used this query to generate unlock statements:
SELECT distinct 'exec dbms_stats.unlock_table_stats('''||owner||''', '''||table_name||''');'You need analyse any table priveleges.
FROM all_tab_statistics
where stattype_locked = 'ALL'
and OWNER not in ( 'SYS' , 'SYSTEM', 'WMSYS')
Till Next Time