Oracle SQL*Net相关的空闲等待事件(2)


  ---session 2:
  select event,total_waits,time_waited from v$session_event where sid=862 and event in ('SQL*Net message from client');
    EVENT                                    TOTAL_WAITS TIME_WAITED
 ---------------------------------------- ----------- -----------
 SQL*Net message from client                      36      230203


  b) client端发起一条命令后无结果返回,事件次数从36->42
      ---session 2:
      select event,total_waits,time_waited from v$session_event where sid=862 and event in ('SQL*Net message from client');
 EVENT                                    TOTAL_WAITS TIME_WAITED
 ---------------------------------------- ----------- -----------
 SQL*Net message from client                      36      230203


  ---session 1:
  SQL> select * from scott.empty_tab1;
 
 USERNAME                          USER_ID CREATED
      ------------------------------ ---------- -----------


  ---session 2:
  select event,total_waits,time_waited from v$session_event where sid=862 and event in ('SQL*Net message from client');
    EVENT                                    TOTAL_WAITS TIME_WAITED
 ---------------------------------------- ----------- -----------
 SQL*Net message from client                      42      263051


  c) client端发起一条语法正确的命令,虽然查询的对象不存在,事件次数还是从42->47
      ---session 2:
        select event,total_waits,time_waited from v$session_event where sid=862 and event in ('SQL*Net message from client');
 EVENT                                    TOTAL_WAITS TIME_WAITED
        ---------------------------------------- ----------- -----------
        SQL*Net message from client                      42      263051


  ---session 1:
  SYS@tstdb1-SQL> select * from notexist1;
 select * from notexist1
              *
 ERROR at line 1:
 ORA-00942: table or view does not exist


  ---session 2:
  SYS@tstdb1-SQL> select event,total_waits,time_waited from v$session_event where sid=862 and event in ('SQL*Net message from client');


    EVENT                                    TOTAL_WAITS TIME_WAITED
 ---------------------------------------- ----------- -----------
 SQL*Net message from client                      47      384038


  d) client端发起得命令语法检查不通过,事件次数还是从63->68,因为命令里包含了select这个命令关键字
      ---session 2:
        SYS@tstdb1-SQL> select event,total_waits,time_waited from v$session_event where sid=862 and event in ('SQL*Net message from client')


 EVENT                                    TOTAL_WAITS TIME_WAITED
 ---------------------------------------- ----------- -----------
 SQL*Net message from client                      63      472134


  ---session 1:
  SQL> select * fro dual;
        select * fro dual
 
 ORA-00923: FROM keyword not found where expected
 
  ---session 2:
  SYS@tstdb1-SQL> select event,total_waits,time_waited from v$session_event where sid=862 and event in ('SQL*Net message from client')

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/78d0dc091b09ee4d1a08af87d100fc3c.html