[oracle@king01 ~]$ sqlplus / as sysdba
SQL> @user_sessions_all.sql

+------------------------------------------------------------------------+
| Report   : User Sessions (All)                                         |
| Instance : king                                                        |
+------------------------------------------------------------------------+

Instance     SID Serial ID Status    Oracle User        O/S User           O/S PID  Machine    Session Program
-------- ------- --------- --------- ------------------ ------------------ -------- ---------- ------------------------------
king          43        43 INACTIVE  TPCC               oracle             2252     king02     JDBC Thin Client
              49        17 INACTIVE  TPCC               oracle             2250     king02     JDBC Thin Client
              50        41 INACTIVE  TPCC               oracle             2248     king02     JDBC Thin Client
              53      3161 INACTIVE  TPCC               oracle             2246     king02     JDBC Thin Client
              44        29 INACTIVE  TPCC               oracle             2244     king02     JDBC Thin Client
              41        35 INACTIVE  TPCC               oracle             2242     king02     JDBC Thin Client
              30        15 INACTIVE  TPCC               oracle             2240     king02     JDBC Thin Client
              29      1013 INACTIVE  TPCC               oracle             2232     king02     JDBC Thin Client
              48        29 INACTIVE  TPCC               oracle             2238     king02     JDBC Thin Client
              40        25 INACTIVE  TPCC               oracle             2236     king02     JDBC Thin Client
              46        79 INACTIVE  TPCC               oracle             2234     king02     JDBC Thin Client
              20         3 ACTIVE                       oracle             1924     king01     oracle@king01 (ARC0)
              21         1 ACTIVE                       oracle             1926     king01     oracle@king01 (ARC1)
              22         1 ACTIVE                       oracle             1928     king01     oracle@king01 (ARC2)
              23         1 ACTIVE                       oracle             1930     king01     oracle@king01 (ARC3)
              17         9 ACTIVE                       oracle             1956     king01     oracle@king01 (CJQ0)
              12         1 ACTIVE                       oracle             1902     king01     oracle@king01 (CKPT)
               7         1 ACTIVE                       oracle             1892     king01     oracle@king01 (DBRM)
              10         1 ACTIVE                       oracle             1898     king01     oracle@king01 (DBW0)
               8         1 ACTIVE                       oracle             1894     king01     oracle@king01 (DIA0)
               6         1 ACTIVE                       oracle             1890     king01     oracle@king01 (DIAG)
               5         1 ACTIVE                       oracle             1888     king01     oracle@king01 (GEN0)
              11         1 ACTIVE                       oracle             1900     king01     oracle@king01 (LGWR)
               9         1 ACTIVE                       oracle             1896     king01     oracle@king01 (MMAN)
              16         1 ACTIVE                       oracle             1910     king01     oracle@king01 (MMNL)
              15         1 ACTIVE                       oracle             1908     king01     oracle@king01 (MMON)
               2         1 ACTIVE                       oracle             1880     king01     oracle@king01 (PMON)
               3         1 ACTIVE                       oracle             1882     king01     oracle@king01 (PSP0)
              32         1 ACTIVE                       oracle             1936     king01     oracle@king01 (Q000)
              35         1 ACTIVE                       oracle             1940     king01     oracle@king01 (Q002)
              27         1 ACTIVE                       oracle             1932     king01     oracle@king01 (QMNC)
              14         1 ACTIVE                       oracle             1906     king01     oracle@king01 (RECO)
              18         5 ACTIVE                       oracle             1921     king01     oracle@king01 (RVWR)
              34        15 ACTIVE                       oracle             2060     king01     oracle@king01 (SMCO)
              13         1 ACTIVE                       oracle             1904     king01     oracle@king01 (SMON)
               4         1 ACTIVE                       oracle             1884     king01     oracle@king01 (VKTM)
              51       883 ACTIVE                       oracle             2192     king01     oracle@king01 (W000)
               1      2677 ACTIVE    SYS                oracle             2219     king01     sqlplus@king01 (TNS V1-V3)
               
SQL> show parameter user_dump_dest 

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
user_dump_dest                       string                            /u01/app/oracle/diag/rdbms/kin
                                                                       g/king/trace
SQL> exec dbms_monitor.session_trace_enable(49,3,waits=>true,binds=>true);
PL/SQL procedure successfully completed.

SQL> exec dbms_monitor.session_trace_disable(49,3);
PL/SQL procedure successfully completed.

[oracle@king01 ~]$ cd /u01/app/oracle/diag/rdbms/king/king/trace
[oracle@king01 trace]$ tkprof king_ora_1990.trc tpcc01.txt sys=no sort=prsela,exeela,fchela;

SQL>  exec dbms_system.set_ev(46,15,10046,8,'');
PL/SQL procedure successfully completed.

SQL> exec dbms_system.set_ev(46,15,10046,0,'');
PL/SQL procedure successfully completed.

[oracle@king01 ~]$ cd /u01/app/oracle/diag/rdbms/king/king/trace
[oracle@king01 trace]$ tkprof king_ora_1986.trc tpcc02.txt sys=no sort=prsela,exeela,fchela;

SQL> grant alter session to tpcc;
Grant succeeded.

SQL> conn tpcc/tpcc
Connected.

SQL> alter session set events '10046 trace name context forever,level 8';
Session altered.

SQL> alter session set events '10046 trace name context off';
Session altered.

[oracle@king01 ~]$ cd /u01/app/oracle/diag/rdbms/king/king/trace
[oracle@king01 trace]$ tkprof king_ora_2170.trc tpcc03.txt sys=no sort=prsela,exeela,fchela;