OK, solved the issue with my very competent DBA.
Solution to Pro/Engineering issue:
Error at USER end:
Message: ToolKit Error : -4068
Arguments: 0:
ORA-04068: existing state of packages has been discarded
ORA-04063: package body "PDM.PDMSP_TXNMODE_PKG" has errors
ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at line 1
On server side (SQLPlus):
select owner, object_name, object_type, status from dba_objects where owner = ‘PDM’ and object_name = ‘PDMSP_TXNMODE_PKG’;
OUTPUT:
OWNER OBJECT_NAME OBJECT_TYPE STATUS
------- -------------------- ------------ -------------
PDM PDMSP_TXNMODE_PKG PACKAGE VALID
PDM PDMSP_TXNMODE_PKG PACKAGE BODY INVALID
SQL> set serveroutput on;
SQL> alter package PDM.PDMSP_TXNMODE_PKG compile body;
Warning: Package Body altered with compilation errors.
SQL> show errors;
Errors for PACKAGE BODY PDM.PDMSP_TXNMODE_PKG:
LINE/COL ERROR
-------- -----------------------------------------------------------------
71/9 PL/SQL: SQL Statement ignored
72/14 PL/SQL: ORA-00942: table or view does not exist
133/17 PLS-00201: identifier 'DBMS_LOCK' must be declared
133/17 PL/SQL: Statement ignored
Oops, have to do more stuff:
SQL> grant execute on DBMS_LOCK to PDM;
Grant succeeded.
SQL> set serveroutput on;
SQL> alter package PDM.PDMSP_TXNMODE_PKG compile body;
Warning: Package Body altered with compilation errors.
SQL> show errors;
Errors for PACKAGE BODY PDM.PDMSP_TXNMODE_PKG:
LINE/COL ERROR
-------- -----------------------------------------------------------------
71/9 PL/SQL: SQL Statement ignored
72/14 PL/SQL: ORA-00942: table or view does not exist
Getting Closer, another step
More changes:
SQL> grant select any dictionary to PDM;
SQL> grant select any table to PDM;
SQL> set serveroutput on;
SQL> alter package PDM.PDMSP_TXNMODE_PKG compile body;
SQL> show errors;
No errors.
Yes!
Validating:
SQL> select owner, object_name, object_type, status from dba_objects where owner = 'PDM' and object_name = 'PDMSP_TXNMODE_PKG';
OWNER OBJECT_NAME OBJECT_TYPE STATUS
------------------------------ --------------------- ---------------- -------
PDM PDMSP_TXNMODE_PKG PACKAGE VALID
PDM PDMSP_TXNMODE_PKG PACKAGE BODY VALID
Now, check for more surprises:
SQL> exec dbms_utility.compile_schema('PDM',FALSE);
PL/SQL procedure successfully completed.
SQL> select count(*) from dba_objects where owner = 'PDM' and status = 'INVALID';
COUNT(*)
----------
0
All done and users can check in drawings.