oracle遭遇大量SNIPED會話
如果user的profile設定了non-zero的idle time,則以該使用者登入的session在空閒一定時間後會變成SNIPED.
今天生產庫上碰到一個案例,版本10205,processes=1200
客戶說登入不上,以sysdba本地登入,
sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Wed Jul 17 01:41:30 2013
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected.
SQL>
典型的processes滿了,殺死幾個local=no的程式後才成功登陸
SQL> select status,count(*) from v$session group by status order by 2;
STATUS COUNT(*)
-------- ----------
ACTIVE 24
INACTIVE 49
SNIPED 1124
SQL> select USERNAME,status,count(*) from v$session group by USERNAME,status order by 3;
USERNAME STATUS COUNT(*)
------------------------------ -------- ----------
……
SYNCIT SNIPED 1120
12 rows selected.
SQL> select profile from dba_users where username='SYNCIT';
PROFILE
------------------------------
PROFILE_IDLE_TIMEOUT
SQL> select RESOURCE_NAME,LIMIT from dba_profiles where profile='PROFILE_IDLE_TIMEOUT';
RESOURCE_NAME LIMIT
-------------------------------- ----------------------------------------
…
IDLE_TIME 1
…
IDLE_TIME設定為1分鐘
What does 'SNIPED' status in v$session mean?
When IDLE_TIME is set in the users' profiles or the default profile. This will kill the sessions in the database (status in v$session now becomes SNIPED) and they will eventually disconnect. It does not always clean up the Unix session (LOCAL=NO sessions).
At this time all oracle resources are released but the shadow processes remains and OS resources are not released. This shadow process is still counted towards the parameters of init.ora.
This process is killed and entry from v$session is released only when user again tries to do something. Another way of forcing disconnect (if your users come in via SQL*Net) is to put the file sqlnet.ora on every client machine and include the parameter "SQLNET.EXPIRE_TIME" in it to force the close of the SQL*Net session
sqlnet.expire_time
sqlnet.expire_time actually works on a different principle and is used to detect dead connections as opposed to disconnecting(actually 'sniping') a session based on idle_time which the profile accomplishes.
But again, as you mentioned, expire_time works globally while idle_time profile works for that user. You can use both of them to make sure that the client not only gets sniped but also gets disconnected if the user process abnormally terminates.
也可寫個shell指令碼定時kill sniped session
http://askmeapps.blogspot.co.uk/2008/06/sniped-sessions-shadow-processes.html
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15480802/viewspace-766519/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Windows下大量SYSMAN會話超出會話限制Windows會話
- 遭遇大量CF型別的enqueue型別ENQ
- 大量會話出現resmgr:become active等待會話
- 更改SERVICE_NAME導致大量會話被KILL會話
- Oracle 會話(Session)Oracle會話Session
- oracle鎖會話Oracle會話
- 【Oracle】-【v$session】v$session的SNIPED狀態OracleSession
- ?ORACLE會話超時Oracle會話
- Oracle跟蹤會話Oracle會話
- oracle 會話,連線Oracle會話
- 遭遇cursor:pin x等待事件定位阻塞會話診斷過程事件會話
- oracle的會話如何自殺?Oracle會話
- Oracle阻塞會話查詢Oracle會話
- oracle session(會話) 跟蹤OracleSession會話
- 【會話】Oracle kill session系列會話OracleSession
- 【Oracle】-【SNIPED和KILLED】-SPINED和KILLED的session清理流程OracleSession
- oracle 定期清理inactive會話Oracle會話
- oracle中會話的狀態Oracle會話
- oracle實用sql(7)--單個會話或會話間statistics對比OracleSQL會話
- Oracle會話超時退出設定Oracle會話
- oracle 10046當前會話Oracle會話
- Oracle kill會話--sed修改檔案Oracle會話
- oracle會話監控shell指令碼Oracle會話指令碼
- Check_oracle_health 之阻塞會話數Oracle會話
- ORACLE快速徹底Kill掉的會話Oracle會話
- Oracle 查詢當前會話標識Oracle會話
- 修改oracle會話時間表達方式Oracle會話
- -t【Oracle-故障管理】-Trace跟蹤會話和會話執行慢故障分析Oracle會話
- Oracle RMAN備份為什麼會大量使用temp表空間?Oracle
- 谷歌BERT遭遇對手,微軟UniLM AI突破大量文字處理瓶頸谷歌微軟AI
- Oracle 插入大量資料Oracle
- Oracle查詢當前會話的sidOracle會話
- 使用Oracle PROFILE控制會話空閒時間Oracle會話
- oracle 10046其他使用者會話Oracle會話
- oracle 跟蹤當前使用者會話Oracle會話
- oracle10g會話跟蹤處理Oracle會話
- oracle 會話(session)被鎖瞭解決方法Oracle會話Session
- oracle rac遭遇ora-12170Oracle