You are correct, Chris ... my response did not address that issue
because I saw that your response was correct. I was simply offering an
alternative way one might use to kill sessions faster.
However, I did fail to state that your response was correct. I also
failed to state that I was offering an alternative solution. You have
my apology ... and I apologize to the other members for any confusion
this may have caused.
Randy Netz
Oracle DBA
816-860-3921 (work)
816-686-1639 (cell)
-----Original Message-----
From: Chris Weiss
[mailto:oracledba-ezmlmshield-x1126306.[Email address protected]
Sent: Friday, October 29, 2004 3:55 PM
To: LazyDBA Discussion
Subject: RE: How to clear session
The original question was how to purge session "marked for kill." In
other
words, session the dba has killed that don't immediately go away.
Regards,
Chris
-----Original Message-----
From: Netz Randy N
[mailto:oracledba-ezmlmshield-x19304043.[Email address protected]
Sent: Friday, October 29, 2004 4:52 PM
To: LazyDBA Discussion
Subject: RE: How to clear session
Sorry, but the email did not format like I had expected it to. Plain
text emails leave a lot to be desired.
Here is the second script I mentioned laid out much nicer.
define os_user=RNN111
define user_name=SYSTEM
SELECT 'alter system kill session ' || sid || ',' || Serial# || ';'
FROM v$session
WHERE upper(osuser) = upper('&os_user')
AND upper(username)= upper('&user_name');
Randy Netz
Oracle DBA
816-860-3921 (work)
816-686-1639 (cell)
-----Original Message-----
From: Netz Randy N
[mailto:oracledba-ezmlmshield-x2726387.[Email address protected]
Sent: Friday, October 29, 2004 3:49 PM
To: LazyDBA Discussion
Subject: RE: How to clear session
If you are running on a Unix machine, you can kill the session at the
command line, which usually cleans it up very fast.
1. I run this script to get a list of sessions on the machine so that I
can determine which one I want to kill.
SELECT substr(osuser,1,10) osuser,
substr(username,1,10) username
FROM v$session;
The output looks like this:
OSUSER USERNAME
---------- ----------
rnn111 SYSTEM
2. Then I plug that information into the "define" statements of the
script below:
define os_user=RNN111
define user_name=SYSTEM
SELECT 'alter system kill session ' || sid || ',' || Serial# || ';'
FROM v$session
WHERE upper(osuser) = upper('&os_user')
AND upper(username)= upper('&user_name');
The output looks like this:
alter system kill session 20,19458;
3. I then run this at the command line on the Unix machine that hosts
the database.
$> alter system kill session 20,19458;
Randy Netz
Oracle DBA
816-860-3921 (work)
816-686-1639 (cell)
-----Original Message-----
From: Chris Weiss
[mailto:oracledba-ezmlmshield-x35998517.[Email address protected]
Sent: Friday, October 29, 2004 9:20 AM
To: LazyDBA Discussion
Subject: RE: How to clear session
Essentially, you cannot. You can do a shutdown abort of the database,
and
restart it so that it can go into recovery mode and clean up, but that
should be used only for *emergencies*.
Oracle needs time for the session's processes to exit gracefully and
recover.
Good Luck!
Chris
----------------------------------------------------
Chris Weiss, Blueoak Database Engineering, LLC
http://www.blueoakdb.com
PH: 517-381-9305
CELL: 517-974-5634
eFAX: 801-340-0740
-----Original Message-----
From: Amuthamukesh Sivaji
[mailto:oracledba-ezmlmshield-x63233566.[Email address protected]
Sent: Friday, October 29, 2004 10:15 AM
To: LazyDBA Discussion
Subject: How to clear session
Hi
How to clear sessions that marked for Killed.
Mukesh
Information transmitted by this EMAIL is proprietary to iGATE Group of
Companies and is intended for use only by the individual or entity to
whom
it is addressed and may contain information that is privileged,
confidential, or exempt from disclosure under applicable law. If you are
not
the intended recipient of this EMAIL immediately notify the sender at
iGATE
or [Email address protected] and delete this EMAIL including any
attachments.
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
Oracle LazyDBA home page