ORA-20001: Statistics Advisor: Invalid task name for the current user

-- PROBLEM/ISSUE:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_218622"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197

-- WORKAROUND/SOLUTION:
exec dbms_stats.init_package() 

SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled

-- PROBLEM/ISSUE:
SQL> set autotrace traceonly
SP2-0618: Cannot find the Session Identifier.  Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report

-- WORKAROUND/SOLUTION:
-- Ref: %ORACLE_HOME%\sqlplus\admin\plustrce.sql
drop role plustrace;
create role plustrace;

grant select on v_$sesstat to plustrace;
grant select on v_$statname to plustrace;
grant select on v_$mystat to plustrace;
grant plustrace to dba with admin option;

ORA-01591: 锁被未决分布式事务处理35.31.2214412持有

-- Ref: https://www.cnblogs.com/lhrbest/archive/2016/08/04/5738544.html
-- PROBLEM/ISSUE:
ORA-01591: 锁被未决分布式事务处理35.31.2214412持有

-- WORKAROUND/SOLUTION:
SQL> @_ora.prt.sql
Please Give Table Owner:sys
Please Give Table Name:dba_2pc_pending

                                                     MIX ADV TRAN_C                     FORCE                             OS_TER              DB_U
LOCAL_TRAN_ID GLOBAL_TRAN_ID                STATE    ED  ICE OMMENT FAIL_TIME           _TIME RETRY_TIME          OS_USER MINAL  HOST         SER  COMMIT#
------------- ----------------------------- -------- --- --- ------ ------------------- ----- ------------------- ------- ------ ------------ ---- --------------
35.31.2214412 MBODEV.371c825e.10.25.1921655 prepared no             2019-08-27 16:54:00       2019-08-27 17:17:07 oracle         cvporaid03db MBO  13873254226504

SQL> @_ora.prt.sql
Please Give Table Owner:sys
Please Give Table Name:dba_2pc_neighbors

                              DBUSER INTER           SES
LOCAL_TRAN_ID IN_OUT DATABASE _OWNER FACE  DBID       S# BRANCH
------------- ------ -------- ------ ----- -------- ---- ------------------------------------------------------
35.31.2214412 in     MBODEV   MBO    N     371c825e    1 4D424F4445565B31302E32352E313932313635355D5B312E31305D
35.31.2214412 out    MESODS   MBO    C     4cf064bb    1 10

SQL> @_ORA.prt.sql
Please Give Table Owner:sys
Please Give Table Name:pending_trans$

               GLOBAL_T                               GLOBAL_FO TRAN_C          STA HEURIST                             TYP
LOCAL_TRAN_ID   RAN_FMT GLOBAL_ORACLE_ID              REIGN_ID  OMMENT STATE    TUS IC_DFLT SESSION_VECTOR RECO_VECTOR   E# FAIL_TIME
------------- --------- ----------------------------- --------- ------ -------- --- ------- -------------- ----------- ---- -------------------
35.31.2214412    306206 MBODEV.371c825e.10.25.1921655                  prepared P           00000001       00000001       0 2019-08-27 16:54:00

SQL> rollback force '35.31.2214412';

Rollback complete.