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.
Shirley
I 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
Tags: Database
Similar Questions
-
It is safe to kill idle session?
Hello
Recently 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.
-
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 -
Hi all
I want to kill session through Toad. What someone has knowledge of the toad that how to kill session from there?
I was using my form if the cause of something its closed and my user is still active then cany help me how to kill the session or active users?
Thanks in advance.
SarahYou must have DBA privileges to perform this activity.
using toad, click Session browser, expand the program to the title of the list of programs, select the process; on the top of the page, click Kill (cross icon)
HTH...
-
is it necessary to explicitly kill sessions marked as "SNIPED"?
I put in the profile for idle less than 2 minutes limit.
After that, the session time is sniped, but rest in GV$ SESSION
as the behaviour is - she gets removed from GV$ SESSION when the user try to access again
but users do not connect through sqlplus,
also the number of notched sessions will affect the total number of sessions allowed (sessions parameter)
instance, and give maximum sessions exceeded error?Check this note in metalink:
DOC - ID: 96170.1Apparently this note says that Yes, you must explicitly kill them.
Based on the documentation:
[SNIPED - Session inactive, waiting on customer | http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2088.htm#REFRN30223]
So I'll wait until they count the sessions and you may have an error on the maximum number of open sessions.
-
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; -
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
-
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
-
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
-
kill v$ session.
HelloW everyone.
I'm looking for help as how to kill v$ session using oracle forms?
any help or if there is no FMB please any help would be greatly appreciated.
Tic Tac ToeTic Tac Toe,
Try,
SELECT UTL_INADDR.GET_HOST_ADDRESS(NVL(TERMINAL, MACHINE)) IP_ADDRESS, LOGON_TIME, STATUS FROM V$SESSION WHERE SID =
Kind regards
Manu.
-
Oralce killed 9i session state
Hi all
Just a quick question on whether or not it is normal for a session to be marked «killed» for more than 24 hours when I interview sessions DB. It was a session hung for a long time and I had to kill him (via TOAD and he succeeded). I understand it is a restore when killed, but why am I still see it after this long?
What to do next?
THXSQL > col format 999999 sid
SQL > col username format a20
SQL > col osuser format a15
SQL > select a.sid, a.serial #, a.username, a.osuser, b.spid
2 session of v$, $ v process b
3 where a.paddr = b.addr
4 and a.sid = '& sid'
5 order by a.sid;
Enter the SID value: 156
4 old: and a.sid = '& sid'
4 News: and a.sid = '156'SID, SERIAL # USERNAME OSUSER SPID
------- ---------- -------------------- --------------- ------------
156 354 SCOTT ASIAPAC\nkumar5 1276
6C:\>orakill prod 1276
Kill thread IDs 1276 correctly with prod pending.
This is the name of the prod instance. serve your sid to 170 and get the SPIDS and kill him with the help of orakill
-
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.
-
Size of session causing Oracle ADF viewScope bloat
I'm sure you know, ADF introduced some additional scopes (pageFlowScope, viewScope and backingBeanScope) on top of the standard JSF ones. Our use of one of the stretches of the ADF, viewScope, seems to be the cause of the size of our session to swell over time.
Objects that are view scope (for example, our Backing Beans) are managed by the ADF and seem to be put in the session in an org.apache.myfaces.trinidadinternal.application.StateManagerImpl object $PageState. The number of these objects when the session is equal to the org.apache.myfaces.trinidad.CLIENT_STATE_MAX_TOKENS in our web.xml configuration file.
Once all the chips are 'used', sailing around the application, one of these objects is removed from the session and (should be) garbage collected at some point. However, the recovery of this space is observed much later, after the end of the session. For this reason, what a load of test the application, we see the use of heap space gradually, increasing before causing the JVM to crash.
Tracking the creation and destruction of our objects is done by adding instructions log in the default constructor and the finalize method (which overrides the finalize on object method). Statements by logging on the creation of objects are visible when we would expect them, but logging of the finalize method statements are seen only after the end of the session. When a garbage collection is triggered using Mission JRocket Oracle control we see the use of heap down significantly, but observe no logging calls the finalize method.
Anyone got any ideas on why the garbage collector would not be able to recover items from sight after having been removed from the session?
Thanks in advance.
P.S. I found already VIEW SCOPE IS NOT RELEASE PROPERLY in ADF which is a closesly related thread, but unfortunately could not use the answers there to solve our problem. I also posted this same question on Stack Overflow (http://stackoverflow.com/questions/13380151/lifetime-of-view-scoped-objects-oracle-adf). I'll try and update the two sons if I find a solution.
Published by: 971217 on November 14, 2012 07:08Hello
I tried to reproduce the problem on JDeveloper 11 GR 2 (11.1.2.3), but after 5 minutes to go back and hard, my server does not crash. However, I did some changes to your code. You can try to replicate using the following minor change?
Instead of
/ * Method to redirect to page two. */
Public Sub goToPageTwo()
{
VR;
{
FacesContext.getCurrentInstance ().getExternalContext.redirect ("pageTwo.jspx");
}
catch (IOException e)
{
e.printStackTrace ();
}
}I changed it to
public String button_action() {}
Return "goPage1";
}where "goPage1" is a case of control flow, I set on my taskflow boundless.
Thank you
Juan Camilo
Maybe you are looking for
-
HP Pro 3400 MT, network controller driver issues.
Hello I recently got a HP 3400 Pro mt (ProductNumber: LH121EA) I installed a fresh Windows7 on the computer. When you start installing drivers, I got stuck on the network controller. It seems that the driver is downloaded from the HP Web site, is not
-
Help with ergonomic 4000 keyboard from microsoft
I cleaned the keyboard with compressed air and I have still two major tones of this intermittent work. The first is the number key "a" and the second is the letter between the letters 'u' and 'w '. What should I do next? I have "_acuumed" also. I
-
I'm under 'Vista Home Premium' and would like to know how to use the performance monitor "" I want to know what I'm looking at everything including how to use it for what it is. Where do you suggest I learn such things or can you help me set up to he
-
If I downgrade to xp professional vista pro I lose my installed programs?
-
Trying to activate downgraded re-installation of Windows 7
My laptop (bought about 18 months ago) came with Windows 8 Pro. I opted for this downgrade to Windows 7 Pro as 8 never worked this well and an attempt to pass to 8.1 has transformed into a very expensive brick that had a weekend to repair. He ran ver