It is safe to kill idle session?
HelloRecently working on the production environment I've met customer number of connection problem as follows
sqlplus username/password
SQL * more: release 9.2.0.4.0 - Production Wed Feb 25 15:46:31 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
ERROR:
ORA-00020: maximum number of processes (%s) exceeded
After trying several times I connected and identified about 250 idle sessions of the only user of view V$ session.
I have questions about this scenario.
(1) I guess that inactive session consume processes, that triggered this error. Please correct me if I'm wrong.
(2) is it safe to kill these idle without the approval of customers sessions because their status says they are 'INACTIVE '?
(3) if not then, when idle, do these sessions are certain activities of long durations and because of their laziness oracle mark as inactive?
My apologies for being naïve... :) Thanks in advance...
Ashish payet wrote:
(2) is it safe to kill these idle without the approval of customers sessions because their status says they are 'INACTIVE '?
Yes - in a perspective of database instance. Oracle is very robust. It does not choke when a user session suddenly disappear.
Course from the point of view of the customer? Not really. The client may always require this session - it may even have a unique transaction to validate.
From a point of view s/n? Joy. Let me count the ways of contentment by waving the old lead pipe and killing sessions... ;-)
(3) if not then, when idle, do these sessions are certain activities of long durations and because of their laziness oracle mark as inactive?
You can watch the session $ v and that there should be a column that contains the current state of waiting for event time / elapsed (take a look at the Oracle Reference guide). If this wait state is SQL * Net client message or similar and the wait state has quite a long time (you set this number), then it would be wrong to kill the session in order to allow new.
Another option is looking at shared server sessions. Here is the light weight in comparison to the server by default. For example a sessions 100 user may be services by 2 dispatchers and 10 shared - server process that oppose an almost 10 x more charge of a 100 process heavy process.
Tags: Database
Similar Questions
-
Kill the Session procedure file
Hello
I want to develop a process where the user can shoot session by themselves.
Currently I use the following script to kill all idle sessions.
If I try to create a procedure and pass in the form, it gives me an error
EXECUTE IMMEDIATE does not work.
Set serveroutput on
declare
sqlStmt VARCHAR2 (1000);
BEGIN
For x in (SELECT SID, SERIAL # FROM V$ SESSION WHERE STATUS = 'INACTIVE' AND last_call_et > 300) loop
sqlStmt: = ' EDIT the SYSTEM KILL SESSION "' | X.SId | «, » || X.Serial # | " ' ;
dbms_output.put_line (sqlStmt);
EXECUTE IMMEDIATE sqlStmt;
End loop;
end;
Sandy
Dear SPathak ,
Try to add IMMEDIATE too in the KILL statement. So the code will be
declare sqlStmt VARCHAR2(1000); BEGIN For x in (SELECT SID,SERIAL# FROM V$SESSION WHERE STATUS='INACTIVE' AND last_call_et > 300) loop sqlStmt := 'ALTER SYSTEM KILL SESSION ''' || X.SId || ',' || X.Serial# || ''' IMMEDIATE' ; dbms_output.put_line( sqlStmt ); EXECUTE IMMEDIATE sqlStmt; End loop; end;
Manu.
-
Hi all
Can someone please explain me on idle sessions in oracle? I used the following query to get the list of inactive requests:
SELECT the sid, osuser, schemaname, ROUND ((last_call_et) / (60 * 60), 2) inactive_from_hours, program
SESSION $ v
Situation WHERE = "IDLE";
According to the result of this query, I asked the users responsible for killing their sessions. But many of them have complained that their request is completed a long time ago. I'm in a dead end in this situation.
When a session is inactive?
If a query is completed, why he is indicated as inactive?
Closing the window through which the query ran, will solve this problem? This method has something to do with this bad result?
The user connects to the database - a session is open.
Run a query - session been ACTIVE
Ask finishes - session is shown to be INACTIVE.
Disconnect the user from the database - a session does not exist anymore in the session of $ v
HTH,
Pradeep
-
Can someone explain the simultaneous program "Purge idle Sessions".
A bit of my environment:
E-Business R12
Oracle Enterprise DB 10.2.0.4.0
Split Architecture components:
Server 1 / DB Node (Redhat 5.5 32-bit)
2 server / applications node
Throughout the day I have to run the top on my apps server command to identify the runaway form sessions that use 100% cpu. I run a kill-9 on them. I wonder if demand for "Purge idle Sessions" doing something in the same direction?Please see (advice and requests for Session Timeout [402674.1 ID] troubleshooting forms), under '3. Confirm that the good ICX_SESSION is updated. "he explains what this concurrent program. You can also search site MOS Icxdltmp.sql which is called by this concurrent program.
Thank you
Hussein -
Kill a session caused instance bouncing
Our database is 2 CARS db knots. The version is 10.2.0.3. The database servers are windows 2003 servers. Recently, I tried to kill a session using 'alter system kill session..' to kill a user session but caused the corresponding instance bounced. I created a TAR with Oracle and downloaded alert logs, trace files and files of $ORACLE_HOME/log / < name of the node - > /racg directory. But Oracle has not found anything to explain why the instance was restarted. He said that I may have killed an Oracle background process. My questions are:
(1) can you use command 'alter system kill session..' to kill Oracle process? If you can that happen if you had killed a? Just cause the instance to stop and start?
(2) I tried to find the session that I killed in gv$ active_session_history, but they are too old for exist. I was wondering is there anywhere I found this kind of info.
Thanks a lot for your help.
ShirleyI don't think that you can kill a background session with ALTER SYSTEM:
SQL> select * from v$version; BANNER ---------------------------------------------------------------- Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product PL/SQL Release 10.2.0.1.0 - Production CORE 10.2.0.1.0 Production TNS for 32-bit Windows: Version 10.2.0.1.0 - Production NLSRTL Version 10.2.0.1.0 - Production SQL> select sid, serial#, program from v$session where program like '%SMON%'; SID SERIAL# PROGRAM ---------- ---------- ------------------------------ 43 1 ORACLE.EXE (SMON) SQL> alter system kill session '43,1'; alter system kill session '43,1' * ERROR at line 1: ORA-00029: session is not a user session
But you can always kill with a command to the operating system:
1 select spid, osuser, s.program 2 from v$process p , v$session s 3 where p.addr=s.paddr 4* and s.sid=43 SQL> / SPID OSUSER ------------ ------------------------------ PROGRAM ---------------------------------------------------------------- 2620 Système ORACLE.EXE (SMON) SQL> exit Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Produ ction C:\>orakill Usage: orakill sid thread where sid = the Oracle instance to target thread = the thread id of the thread to kill The thread id should be retrieved from the spid column of a query such as: select spid, osuser, s.program from v$process p, v$session s where p.addr=s.paddr C:\>orakill XE 2620 Kill of thread id 2620 in instance XE successfully signalled. C:\>sqlplus / as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on Tue Feb 23 18:47:12 2010 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to an idle instance.
-Online Forum was killed. Alert log says:
Tue Feb 23 18:47:10 2010 Errors in file c:\oraclexe\app\oracle\admin\xe\bdump\xe_pmon_2512.trc: ORA-00474: SMON process terminated with error Tue Feb 23 18:47:10 2010 PMON: terminating instance due to error 474 Tue Feb 23 18:47:10 2010 Errors in file c:\oraclexe\app\oracle\admin\xe\bdump\xe_q001_3208.trc: ORA-00474: SMON process terminated with error Tue Feb 23 18:47:10 2010 Errors in file c:\oraclexe\app\oracle\admin\xe\bdump\xe_ckpt_2580.trc: ORA-00474: SMON process terminated with error Tue Feb 23 18:47:11 2010 Errors in file c:\oraclexe\app\oracle\admin\xe\bdump\xe_dbw0_2556.trc: ORA-00474: SMON process terminated with error Tue Feb 23 18:47:11 2010 Errors in file c:\oraclexe\app\oracle\admin\xe\bdump\xe_lgwr_2572.trc: ORA-00474: SMON process terminated with error Tue Feb 23 18:47:12 2010 Errors in file c:\oraclexe\app\oracle\admin\xe\bdump\xe_reco_2652.trc: ORA-00474: SMON process terminated with error Tue Feb 23 18:47:12 2010 Errors in file c:\oraclexe\app\oracle\admin\xe\bdump\xe_mman_2540.trc: ORA-00474: SMON process terminated with error Tue Feb 23 18:47:12 2010 Errors in file c:\oraclexe\app\oracle\admin\xe\bdump\xe_psp0_2520.trc: ORA-00474: SMON process terminated with error Instance terminated by PMON, pid = 2512
Edited by: P. Forstmann on 23 Feb. 2010 18:50
-
How to kill the session running from work processes
How to kill the session work processes running... What is the process to be programmed
BEGIN
FOR c IN (
SELECT s.sid,
s.serial#
FROM v$session s
WHERE s.username = 'your_user_name'
)
LOOP
EXECUTE IMMEDIATE 'alter system kill session ''' ||
c.sid || ',' || c.serial# || '''';
END LOOP;
END; -
Hi friends,
We see too many idle session in the sessions vCenter tab. Although it should not harm immeidate, we always want to find a way to hollow compensation even some settings build-in if possible.
Article, I came across what suggests to change the vpxdclient configuration file where vSphere client is installed. But in our various teams access infra vcenter from different client computers. Is it possible to clear the list of inactive session of vCenter settings the value?
Thank you!
Kind regards
Hari.
Idle session configured in vSphere client machine and RDP timeout as well through AD.
Thank you!
Hari.
-
kill all sessions owned by a user
Hi guyscan someone help me with the script to kill all sessions belong scott username in a database.
Thank you all in advance
Hello
There you go
create or replace procedure kill_sessions(p_username varchar2) is begin for rec in (select 'ALTER SYSTEM KILL SESSION ''' || sid || ', ' || serial# || '''' txt from v$session where username=p_username) loop execute immediate rec.txt; end loop; end; /
Best regards
Nikolai
-
vCenter connections - Idle sessions hang out
Hello
We use the VI SDK 2.5 to Windows XP SP3 to connect to vCenter to QueryPerf to get data from the perf.
A specific user account to connect to the vCenter.
In some cases, we note that there are a few sessions 'dormant' left hanging out. I see them listed in the console of Administration/Management/Sessions of the vCenter. I think that these "idle sessions" when the application is connected to vCenter using the API and attempts a "logout" and disconnection fails for some reason any. It is also possible, I think that, when the application terminates abnormally. I noticed a case when there is an end to the session "inactive" after 30 minutes of inactivity.
Is there anyway to make the API using the same session or inform not to create a new session, if it already exists for the user? Something similar to a SQL Server how "connection pooling"?
I appreciate any input in this case.
Concerning
I hope my blog can help you understand the session management:
http://www.doublecloud.org/2010/02/the-mythical-sessions-in-vSphere-and-VI/
Steve JIN
Author of VMware VI and vSphere SDK (Prentice Hall)
Open source (VI) vSphere Java APIcreator (tutorial, testimonials, download, samples, Forum)
Blog: DoubleCloud.ORG ( Top 10 best practices[object model: http://www.doublecloud.org/2010/02/Object-Model-of-VMware-vSphere-API-a-Big-Picture-in-2-minutes/,] [common errors |]) http://www.doublecloud.org/2010/01/31/common-mistakes-using-vmware-vi-and-vsphere-sdk/], Tiny REST API, Cloud Application Architecture)
-
Who killed my session and when?
Hi gurus,
Could you tell me how can I check which killed my session and when two days before? Which table should I interview?
Any input will be appreciated.
Thank you.H_innocent wrote:
Hi gurus,Could you tell me how can I check which killed my session and when two days before?
You can't unless you have auditing enabled for ALTER SYSTEM.
Which table should I interview?
There is no table to the query, unless you already had the above verification enabled. In this case, see SYS. AUD$.
Hope that helps,
-Mark
-
Hello
Can you please give me a consultant how to kill a session?
Thanks in adv
SAHello
Pls find out with this query...! and use edit commond to kill a session.
SELECT s.inst_id, s.sid, s.serial#, p.spid, s.username, s.program FROM gv$session s JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id WHERE s.type != 'BACKGROUND' Kill session ************ ALTER SYSTEM KILL SESSION 'sid,serial#@inst_id';
KPR
-
Idle sessions are automatically generated in the database
I am facing a strange problem to get the very large number of idle sessions generated th the database server which leads to closing of connection is.
The error reads as "Failed to check-out a demand account held the failure of connection of the Application Module.»
This happens whenever I execute the following code:
String amDefName = "amendprgo.model.CSDInvFRCAmendPrgoServices";
String configName = "CSDInvFRCAmendPrgoServicesLocal";
ApplicationModule App1 = Configuration.createRootApplicationModule (amDefName, configName);
String voInstanceName = "prgoHdrRO";
ViewObject prgoHdrROVO = app1.createViewObjectFromQueryStmt (voInstanceName, "select * from INV_PRGO_HDR");
prgoHdrROVO.setWhereClause ("PRGO_ID =" + tempRow.getAttribute ("PrgoId") +' and DEPOT_CD = '0' and ITEM_CAT = 'I3' ");
prgoHdrROVO.executeQuery ();
If (prgoHdrROVO.getEstimatedRowCount () > 0) {}
Returns true;
I know there is a process of creating a connection and the View object in part of model in JDeveloper, but I want to know why this problem occurs.As I said before
Configuration.releaseRootApplicationModule(app1 , true);
My advice is to read the links I gave you!
Timo
-
Why can't I kill this session?
DB version: 10.2.0.4
Operating system: Solaris SPARC (5.10)
Number of nodes of CARS: 2
I wanted to kill the session that was connected to the Instance 2 below.
So, I first connected to instance1 tried running the command below.
-Connected to Instance1
Tried running of instance2 and succeeded after removing the part of ID of Instance of KILL commandSQL:orcl1 > ALTER SYSTEM KILL SESSION '586,53926,@2' IMMEDIATE; ALTER SYSTEM KILL SESSION '586,53926,@2' IMMEDIATE * ERROR at line 1: ORA-00026: missing or invalid session ID
-Connected on Instance2 from the
I can't kill a session connected to Instance2 from the 1st Instance using the syntaxSQL:orcl2 > ALTER SYSTEM KILL SESSION '586,53926,@2' IMMEDIATE; ALTER SYSTEM KILL SESSION '586,53926,@2' IMMEDIATE * ERROR at line 1: ORA-00026: missing or invalid session ID SQL:orcl2 > ALTER SYSTEM KILL SESSION '586,53926' immediate; System altered.
?ALTER SYSTEM KILL SESSION 'sid,serial,@inst_id' IMMEDIATE;
Hello
session function kill via. another instance introduced with 11 GR 1 material.
If this does not work in 10.2
Concerning
Sebastian -
How to kill a session by the non privileged user
Hello
I use the oracle 10.2.0.3 version.
I have to give privileged kill session to a user non-preferred, below 2 ways, I know that this can be done with.
1. by giving change the system to this user privilege.
2. by creating a procedure in any user with DBA privileges, which has the statement to execute immediate change the system kill session & by granting execute this procedure to this user.
Apart from the above two ways, I heard that there is a procedure/priviledge etc. also well integrated into Oracle. Which can be granted to individual users.
No idea if there is something of this kind?
Thanks in advance.
Best regards
OratestEach session has a partner gets server process created in OS that Oracle creates (the setting of the dedicated server), so if you kill even the session in Oracle and the corresponding operating system process is not killed, then the session is marked for KILL and do not get killed instantly or marked as snipped.
Also, there is no explicit privilege in Oracle to grant only the ability to kill session, you will need to ALTER SYSTEM privilege and, of course, it gives you much more capacity than to simply kill the session and therefore impossible to give all users who does not keep a database.
-
How to kill the session during the export of data from the database in essbase
Hi all
I actually tried to export all the data for essbase DB but it takes almost 25 hrs still his past.
Please suggest me how to kill this session. I tried to kill him but his does not work...
Really appreciate if somebody gives answer for that...
Thank you...
Me...Your only option is to go to the Task Manager/Unix command line and kill the ESSSVR.exe process. This process is blocked and all of the demolitions that you issue of EAS/MaxL won't fix.
Kind regards
Cameron Lackpour
Maybe you are looking for
-
My pictures leave a track with elements with a game that uses Java
I play animal Bitty of company and it leaves a mark on the points that are animated
-
I got a Apple Watch yesterday and since put in place and paired him and everything, but now I can not unlock it or look at anything on the watch because it won't let me. Any ideas as to what is wrong or what I am doing wrong?
-
8024001 appears when I try to run windows updates. not sure what is originally but can't seem to work around it.
-
Plans for Nvidia NO Cascades Builder?
I do MOST of my development on the go, and as such, I don't have access to a laptop with Intel Graphics (specifically Intel Integrated Graphics Media Accelerator 4500MHD). This graphics card can work very well Fear (original), but also many other 3D
-
Problems with DVD + R DL disc in the optical drive T500
Hi - This is a W7 T500 running (2242CTO) / 64 - I downloaded the last Roxio Creator Business Edition and was able to burn a 4.5 GB file to a DVD + R DL disc using its function as data disc, no problem. After burning, I closed Roxio and inserted the