[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
- SQL*Net break/reset to clientSQLclient
- SQL*Net break/reset to client等待SQLclient
- warning:reset()[function.reset]:passedvariableisnotanarrayorobjectFunctionObject
- sqlnet.ora的SQLNET.AUTHENTICATION_SERVICESSQL
- jQuery :resetjQuery
- css resetCSS
- sqlnet.ora SQLNET.AUTHENTICATION_SERVICES 引數SQL
- SQLNET.RECV_TIMEOUT & SQLNET.SEND_TIMEOUTSQL
- JavaScript reset 事件JavaScript事件
- git reset 用法Git
- css-resetCSS
- CSS word-breakCSS
- break,continue,gotoGo
- sqlnet.oraSQL
- sqlnet跟蹤SQL
- RESET MASTER和RESET SLAVE使用場景和說明AST
- continue、break與gotoGo
- Leetcode Word BreakLeetCode
- Reset and Checkout Files in GitGit
- gc/Agent passwd resetGC
- SQLNET.AUTHENTICATION_SERVICESSQL
- sqlnet.ora作用SQL
- The Impact of the Sqlnet Settings on Database Security (sqlnet.ora Security Parameters and Wallet LoSQLDatabase
- [20151110]Oracle Direct NFS Client.txtOracleNFSclient
- switch不加break情況分析
- break,continue,return區別
- CSS3 word-breakCSSS3
- LeetCode-Word BreakLeetCode
- Word Break leetcode javaLeetCodeJava
- CSS文字:word-break(轉)CSS
- JAVA基礎--break 、continueJava
- git reset 和 git revertGit
- git revert與git resetGit
- css Reset程式碼分享CSS
- CSS-reset&規範CSS
- reset database的用處Database
- How to Reset the MySQL Root PasswordMySql