[20181120]SQLNet break/reset to client.txt
[20181120]SQLNet break/reset to client.txt
--//最近一直在做最佳化工作,最後剩下SQL*Net break/reset to client.排在第5.
--//出現這種情況SQL*Net break/reset to client實際上相關的sql語句根本沒有正確執行,查詢V$sql檢視是無法獲得sql語句的。
--//要查詢底層檢視 x$kglob.
1.環境:
SYSTEM@zzzzzz > @ ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.3.0 Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
SELECT sql_id, COUNT (*)
FROM DBA_HIST_ACTIVE_SESS_HISTORY
WHERE event = 'SQL*Net break/reset to client'
GROUP BY sql_id
ORDER BY 2 DESC;
SQL_ID COUNT(*)
------------- ----------
8gvfr81z8nfs7 151
gftx8vhbhujf3 7
ddd4xgabw2tct 5
c21vhszr9gbdq 1
--//可以發現主要集中在sql_id=8gvfr81z8nfs7.
SYSTEM@zzzzzz > @ sql_id 8gvfr81z8nfs7
no rows selected
--//查詢v$sqlarea檢視沒有發現.
SYSTEM@zzzzzz > @ sql_id gftx8vhbhujf3
SQL_ID SQLTEXT
------------- --------------------------------------------------------------------------
gftx8vhbhujf3 Insert Into GY_XTCS ( CSMC , CSZ , MRZ , BZ ) Values ( :1 , :2 , :3 , :4 )
--//sql_id='gftx8vhbhujf3'可以發現.
2.繼續分析:
SELECT DISTINCT kglnaobj c120 , kglobt03 sql_id
FROM x$kglob
WHERE kglobt03 IN ( SELECT sql_id
FROM DBA_HIST_ACTIVE_SESS_HISTORY
WHERE event = 'SQL*Net break/reset to client'
GROUP BY sql_id);
C120 SQL_ID
------------------------------------------------------------------------------------------------------------------------ -------------
SELECT PBE_NAME,PBE_EDIT,PBE_TYPE,PBE_CNTR,PBE_WORK,PBE_SEQN,PBE_FLAG FROM SYSTEM.PBCATEDT ORDER BY PBE_NAME,PBE_SEQN 8gvfr81z8nfs7
Insert Into GY_XTCS ( CSMC , CSZ , MRZ , BZ ) Values ( :1 , :2 , :3 , :4 ) gftx8vhbhujf3
select count ( :"SYS_B_0" ) from yk_gnt where ypxh =:1 ddd4xgabw2tct
Select csz2 From gy_xtcs where xtxh =:"SYS_B_0" And csmc =:"SYS_B_1" c21vhszr9gbdq
3.問題解決:
--//sql_id='8gvfr81z8nfs7',主要因為SYSTEM.PBCATEDT沒有建立,在應用scahma下有一個相似的表.建立一樣的結構就ok了.
SYSTEM@zzzzzz > create table SYSTEM.PBCATEDT tablespace users as select * from XXXXXX_YYY.PBCATEDT where 1=2;
Table created.
--//sql_id='ddd4xgabw2tct',根本不存在這個表以及物件.
SYSTEM@zzzzzz > select * from dba_objects where object_name='YK_GNT';
no rows selected
--//sql_id=c21vhszr9gbdq
SYSTEM@zzzzzz > select * from dba_objects where object_name='GY_XTCS';
OWNER OBJECT_NAME SUBOBJECT_ OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_TIME TIMESTAMP STATUS T G S NAMESPACE EDITION_NAME
---------- ----------- ---------- ---------- -------------- ----------- ------------------- ------------------- ------------------- ------- - - - ---------- ------------
XXXXXX_YYY GY_XTCS 81538 81538 TABLE 2015-01-28 10:11:59 2018-04-02 14:48:16 2018-04-02:14:48:16 VALID N N N 1
SYSTEM@zzzzzz > @ desc XXXXXX_YYY.gy_xtcs
Name Null? Type
----- -------- ----------------------------
CSMC NOT NULL VARCHAR2(20)
CSZ VARCHAR2(150)
MRZ VARCHAR2(100)
BZ VARCHAR2(80)
--//sql_id=c21vhszr9gbdq,開發寫的什麼語句,csz2欄位根本不存在,xtxh欄位也不存在.無語.什麼驗證的.
--//剩下sql_id='gftx8vhbhujf3',有點奇怪,我給審計跟蹤看看.因為
SYSTEM@zzzzzz > select sql_id,sql_text,executions,rows_processed from v$sqlarea where sql_id='gftx8vhbhujf3';
SQL_ID SQL_TEXT EXECUTIONS ROWS_PROCESSED
------------- -------------------------------------------------------------------------------- ---------- --------------
gftx8vhbhujf3 Insert Into GY_XTCS ( CSMC , CSZ , MRZ , BZ ) Values ( :1 , :2 , :3 , :4 ) 13919 0
--//EXECUTIONS=13919,ROWS_PROCESSED=0? 另外寫一篇.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2220763/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20201214]再遇SQL*Net break/reset to client.txtSQLclient
- [20181120]奇怪的insert語句.txt
- 小議SQLNET.AUTHENTICATION_SERVICESSQL
- Oracle OCP(45):sqlnet.oraOracleSQL
- JavaScript reset 事件JavaScript事件
- git reset 用法Git
- css-resetCSS
- break語句
- break,continue,gotoGo
- [20181120]toad看真實的執行計劃.txt
- [20210115]sqlnet.ora設定sqlnet.expire_time斷開時oracle如何探測.txtSQLOracle
- SQLNET.ORA 的常見用法SQL
- [20180918]等待事件SQL/Net more data from client.txt事件SQLclient
- 在lambda的foreach遍歷中break退出(lambda foreach break)
- IDE Eval Reset 重置IDE
- git reset --hard HEAD^Git
- Reset and Checkout Files in GitGit
- CSS word-breakCSS
- 139. Word Break
- continue、break與gotoGo
- git reset 和 git revertGit
- Simple FSM 3(asynchronous reset)
- Simple FSM 3(synchronous reset)
- Git進階命令-resetGit
- git revert與git resetGit
- break,continue,return區別
- JAVA基礎--break 、continueJava
- Codeforces 1457A. Prison Break
- [20190622]收集SQLNet Message From Client資訊.txtSQLclient
- [20210115]sqlnet.ora設定sqlnet.expire_time與tcp_keepalive_time關係以及一些總結SQLTCP
- CSS3 counter-resetCSSS3
- Simple FSM1(asynchronous reset)
- Simple FSM1(synchronous reset)
- Simple FSM2(asynchronous reset)
- Simple FSM2(synchronous reset)
- HTML input reset 重置按鈕HTML
- git操作之三:git resetGit
- CSS3 word-breakCSSS3