PLS-00201: identifier 'DBMS_LOCK' must be declared Error when compiling invalid object
1. View invalid objects
select * from dba_objects where status!='VALID' and OWNER!='TUOMIN' order by TIMESTAMP DESC;
2. Authorization
grant execute on dbms_lock to 用户;
3. Use the empowerment select of dba_tab
grant select on dba_tab_partitions to 用户;
The tables and users used in the invalid object need to be based on the actual situation. Use the PLSQL tool to query specifically.