473,513 Members | 2,620 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sure-fire "kill"

There is a setting in INIT.ORA that has the unintended side-effect of
making sure the ALTER SYSTEM KILL SESSION command has immediate affect.
Without this setting, I've seen some instances where the session reports
as being KILLED in V$SESSION but is not physically removed until the
instance is bounced. Does anyone remember this value offhand?
Jul 19 '05 #1
10 9736
Possibly you are referring to a session where the Oracle side of things has
ceased to exist, but where the client is still alive.
In this case you need to do a kill -9, or CTRL-ALT-DEL to kill the client
process.

Session will remain in KILLED status until the client has disconnected from
Oracle.

--

OpenVMS 7.3-1, Oracle 8.1.7.4

Syltrem
http://pages.infinit.net/syltrem (OpenVMS related web site - en français)
To reply to me directly, remove zulu from my address

"Fred" <no***@jose.com> a écrit dans le message de
news:no*************************@vienna7.his.com.. .
There is a setting in INIT.ORA that has the unintended side-effect of
making sure the ALTER SYSTEM KILL SESSION command has immediate affect.
Without this setting, I've seen some instances where the session reports
as being KILLED in V$SESSION but is not physically removed until the
instance is bounced. Does anyone remember this value offhand?

Jul 19 '05 #2
Syltrem wrote:
Possibly you are referring to a session where the Oracle side of things has
ceased to exist, but where the client is still alive.
In this case you need to do a kill -9, or CTRL-ALT-DEL to kill the client
process.

Session will remain in KILLED status until the client has disconnected from
Oracle.

--

OpenVMS 7.3-1, Oracle 8.1.7.4

Syltrem
http://pages.infinit.net/syltrem (OpenVMS related web site - en français)
To reply to me directly, remove zulu from my address

"Fred" <no***@jose.com> a écrit dans le message de
news:no*************************@vienna7.his.com.. .
There is a setting in INIT.ORA that has the unintended side-effect of
making sure the ALTER SYSTEM KILL SESSION command has immediate affect.
Without this setting, I've seen some instances where the session reports
as being KILLED in V$SESSION but is not physically removed until the
instance is bounced. Does anyone remember this value offhand?


I think what the OP is referring to is the time between when a kill is issued
and the session shows as killed in v_$session.

This time is the time Oracle uses to clean up the mess the session left behind.

And, as I said, if there is someway to avoid it I am not aware of it and would
advise against using it.
--
Daniel Morgan
http://www.outreach.washington.edu/e...ad/oad_crs.asp
da******@x.washington.edu
(replace 'x' with a 'u' to reply)
Jul 19 '05 #3
Fred <no***@jose.com> wrote in message news:<no*************************@vienna7.his.com> ...
There is a setting in INIT.ORA that has the unintended side-effect of
making sure the ALTER SYSTEM KILL SESSION command has immediate affect.
Without this setting, I've seen some instances where the session reports
as being KILLED in V$SESSION but is not physically removed until the
instance is bounced. Does anyone remember this value offhand?


I would like to know this if true. It's my understanding that the
alter system kill command tells SMON to kill things, which SMON may or
may not do depending on it's mood. For example, I'm having issues
with an imp hanging, and alter session kill has no effect, since imp
is off spinning the cpu and ignoring the database entirely. So I have
the long-time habit of killing processes with the OS and letting PMON
clean up.

jg
--
@home.com is bogus.
If a tree falls in the forrest and no one is around, does it make a
sound? No, but all the squirrels screeming "EEEEEEEH!" do.
Jul 19 '05 #4
Daniel Morgan <da******@exxesolutions.com> wrote in message news:<3F***************@exxesolutions.com>...
Joel Garry wrote:
Fred <no***@jose.com> wrote in message news:<no*************************@vienna7.his.com> ...
There is a setting in INIT.ORA that has the unintended side-effect of
making sure the ALTER SYSTEM KILL SESSION command has immediate affect.
Without this setting, I've seen some instances where the session reports
as being KILLED in V$SESSION but is not physically removed until the
instance is bounced. Does anyone remember this value offhand?


I would like to know this if true. It's my understanding that the
alter system kill command tells SMON to kill things, which SMON may or
may not do depending on it's mood. For example, I'm having issues
with an imp hanging, and alter session kill has no effect, since imp
is off spinning the cpu and ignoring the database entirely. So I have
the long-time habit of killing processes with the OS and letting PMON
clean up.

jg
--
@home.com is bogus.
If a tree falls in the forrest and no one is around, does it make a
sound? No, but all the squirrels screeming "EEEEEEEH!" do.


Source: Oracle9i SQL Reference / Release 2 (9.2) / Part Number A96540-02
http://download-west.oracle.com/docs...3a.htm#2065113

KILL SESSION Clause

The KILL SESSION clause lets you mark a session as terminated, roll back ongoing transactions,
release all session locks, and partially recover session resources. To use this clause, your
instance must have the database open, and your session and the session to be killed must be on
the same instance. You must identify the session with both of the following values from the
V$SESSION view:

For integer1, specify the value of the SID column.
For integer2, specify the value of the SERIAL# column.

If the session is performing some activity that must be completed, such as waiting for a reply
from a remote database or rolling back a transaction, then Oracle waits for this activity to
complete, marks the session as terminated, and then returns control to you. If the waiting lasts
a minute, then Oracle marks the session to be killed and returns control to you with a message
that the session is marked to be killed. The PMON background process then marks the session as
terminated when the activity is complete.

Whether or not the session has an ongoing transaction, Oracle does not recover the entire
session state until the session user issues a request to the session and receives a message that
the session has been killed.

But most imporantly ... the following paragraph:

IMMEDIATE

Specify IMMEDIATE to instruct Oracle to roll back ongoing transactions, release all session
locks, recover the entire session state, and return control to you immediately.


Well, as Anton posted in the other thread, this doesn't have much
effect. And if whatever it is you are trying to kill doesn't bother
to listen to Oracle, the session entry will stay there until you
bounce the db.

This used to be a big frustrating issue on some platforms, certainly
in the V7 time frame. Some process would run away with a processor,
until you OS kill it - and sometimes not even then, and unix sysadmins
really don't like being told a reboot is necessary. Sometimes the
process would be SMON, which is why I get so skittish every time I see
something else has been added to its duties, seems like architectural
abuse to me. Fortunately it doesn't happen too much any more, or at
least support can give some actual reasons for it to be so busy.

jg
--
@home.com is bogus. "One day in 1965: The future Joe Strummer buys
his first Chuck Berry single, "Rock 'n' Roll Music," while visiting
his father in Tehran, Iran's capital. He is surprised, he says later,
that the Beatles didn't write it. He duly memorizes the Berry
songbook." - Peter S. Scholtes
Jul 19 '05 #5
Joel Garry wrote:
Daniel Morgan <da******@exxesolutions.com> wrote in message news:<3F***************@exxesolutions.com>...
Joel Garry wrote:
Fred <no***@jose.com> wrote in message news:<no*************************@vienna7.his.com> ...
> There is a setting in INIT.ORA that has the unintended side-effect of
> making sure the ALTER SYSTEM KILL SESSION command has immediate affect.
> Without this setting, I've seen some instances where the session reports
> as being KILLED in V$SESSION but is not physically removed until the
> instance is bounced. Does anyone remember this value offhand?

I would like to know this if true. It's my understanding that the
alter system kill command tells SMON to kill things, which SMON may or
may not do depending on it's mood. For example, I'm having issues
with an imp hanging, and alter session kill has no effect, since imp
is off spinning the cpu and ignoring the database entirely. So I have
the long-time habit of killing processes with the OS and letting PMON
clean up.

jg
--
@home.com is bogus.
If a tree falls in the forrest and no one is around, does it make a
sound? No, but all the squirrels screeming "EEEEEEEH!" do.


Source: Oracle9i SQL Reference / Release 2 (9.2) / Part Number A96540-02
http://download-west.oracle.com/docs...3a.htm#2065113

KILL SESSION Clause

The KILL SESSION clause lets you mark a session as terminated, roll back ongoing transactions,
release all session locks, and partially recover session resources. To use this clause, your
instance must have the database open, and your session and the session to be killed must be on
the same instance. You must identify the session with both of the following values from the
V$SESSION view:

For integer1, specify the value of the SID column.
For integer2, specify the value of the SERIAL# column.

If the session is performing some activity that must be completed, such as waiting for a reply
from a remote database or rolling back a transaction, then Oracle waits for this activity to
complete, marks the session as terminated, and then returns control to you. If the waiting lasts
a minute, then Oracle marks the session to be killed and returns control to you with a message
that the session is marked to be killed. The PMON background process then marks the session as
terminated when the activity is complete.

Whether or not the session has an ongoing transaction, Oracle does not recover the entire
session state until the session user issues a request to the session and receives a message that
the session has been killed.

But most imporantly ... the following paragraph:

IMMEDIATE

Specify IMMEDIATE to instruct Oracle to roll back ongoing transactions, release all session
locks, recover the entire session state, and return control to you immediately.


Well, as Anton posted in the other thread, this doesn't have much
effect. And if whatever it is you are trying to kill doesn't bother
to listen to Oracle, the session entry will stay there until you
bounce the db.

This used to be a big frustrating issue on some platforms, certainly
in the V7 time frame. Some process would run away with a processor,
until you OS kill it - and sometimes not even then, and unix sysadmins
really don't like being told a reboot is necessary. Sometimes the
process would be SMON, which is why I get so skittish every time I see
something else has been added to its duties, seems like architectural
abuse to me. Fortunately it doesn't happen too much any more, or at
least support can give some actual reasons for it to be so busy.

jg
--
@home.com is bogus. "One day in 1965: The future Joe Strummer buys
his first Chuck Berry single, "Rock 'n' Roll Music," while visiting
his father in Tehran, Iran's capital. He is surprised, he says later,
that the Beatles didn't write it. He duly memorizes the Berry
songbook." - Peter S. Scholtes


I have yet to see kill -9 not kill a process.

Looking at v_$session is not a reliable indication of whether a session has been killed.

--
Daniel Morgan
http://www.outreach.washington.edu/e...ad/oad_crs.asp
da******@x.washington.edu
(replace 'x' with a 'u' to reply)
Jul 19 '05 #6
Daniel Morgan <da******@exxesolutions.com> wrote in message news:<3F***************@exxesolutions.com>...
Joel Garry wrote:
I have yet to see kill -9 not kill a process.

Looking at v_$session is not a reliable indication of whether a session has been killed.


Daniel, From experience I can confirm that there are circumstances
where UNIX kill -9 commands will in fact fail. But that is a UNIX
issue that is not caused by Oracle though I think the issue can affect
Oracle. We have experienced the problem on both the Pyramid and
Sequent platforms. But I believe it is secondary and think the
information you posted will solve the problem most of the time.

Also from a logical point of view it would seem to me that v$session
should be a reliable indicator of a session being killed. The status
should reflect the current state of the session or the session entry
should be removed. Logically for the view to reflect any other state
would indicate a failure in Oracle's design logic or code.

-- Mark D Powell --
Jul 19 '05 #7
Mark D Powell wrote:
Daniel Morgan <da******@exxesolutions.com> wrote in message news:<3F***************@exxesolutions.com>...
Joel Garry wrote:
I have yet to see kill -9 not kill a process.

Looking at v_$session is not a reliable indication of whether a session has been killed.


Daniel, From experience I can confirm that there are circumstances
where UNIX kill -9 commands will in fact fail. But that is a UNIX
issue that is not caused by Oracle though I think the issue can affect
Oracle. We have experienced the problem on both the Pyramid and
Sequent platforms. But I believe it is secondary and think the
information you posted will solve the problem most of the time.

Also from a logical point of view it would seem to me that v$session
should be a reliable indicator of a session being killed. The status
should reflect the current state of the session or the session entry
should be removed. Logically for the view to reflect any other state
would indicate a failure in Oracle's design logic or code.

-- Mark D Powell --


What I meant by my statement was that there is a period of time during which a killed session remains in
v_$session
while Oracle cleans up the mess. The fact that an entry remains behind does not mean that the kill did not do
what it
was intended to accomplish. I should have chosen my words more carefully.

--
Daniel Morgan
http://www.outreach.washington.edu/e...ad/oad_crs.asp
da******@x.washington.edu
(replace 'x' with a 'u' to reply)
Jul 19 '05 #8
Daniel Morgan <da******@exxesolutions.com> wrote in message news:<3F***************@exxesolutions.com>...

I have yet to see kill -9 not kill a process.
I have. That is what a zombie is. But I wasn't talking about that.

Looking at v_$session is not a reliable indication of whether a session has been killed.


Fair enough. What would be a reliable indication of whether a session
has been killed? Are you saying Oracle doesn't know?

jg
--
@home.com is bogus.
http://groups.google.com/groups?q=zo...inc.com&rnum=5
Jul 19 '05 #9
Joel Garry wrote:
Daniel Morgan <da******@exxesolutions.com> wrote in message news:<3F***************@exxesolutions.com>...

I have yet to see kill -9 not kill a process.


I have. That is what a zombie is. But I wasn't talking about that.

Looking at v_$session is not a reliable indication of whether a session has been killed.


Fair enough. What would be a reliable indication of whether a session
has been killed? Are you saying Oracle doesn't know?

jg
--
@home.com is bogus.
http://groups.google.com/groups?q=zo...inc.com&rnum=5


And attempt to do anything new with the session after the kill should indicate, immediately, that the session has been killed. The fact that
information related to the session remains in the v_$ views does not.

--
Daniel Morgan
http://www.outreach.washington.edu/e...ad/oad_crs.asp
da******@x.washington.edu
(replace 'x' with a 'u' to reply)
Jul 19 '05 #10
Daniel Morgan <da******@exxesolutions.com> wrote in message news:<3F***************@exxesolutions.com>...
Joel Garry wrote:
Daniel Morgan <da******@exxesolutions.com> wrote in message news:<3F***************@exxesolutions.com>...

I have yet to see kill -9 not kill a process.


I have. That is what a zombie is. But I wasn't talking about that.

Looking at v_$session is not a reliable indication of whether a session has been killed.


Fair enough. What would be a reliable indication of whether a session
has been killed? Are you saying Oracle doesn't know?

jg
--
@home.com is bogus.
http://groups.google.com/groups?q=zo...inc.com&rnum=5


And attempt to do anything new with the session after the kill should indicate, immediately, that the session has been killed. The fact that
information related to the session remains in the v_$ views does not.


The idea is to get correct information without actually trying to
connect to the session. A plus would be actually being able to manage
Oracle sessions with OEM.

Why would you care about doing anything new with a killed session?
More often, one cares about why the computer is still being impacted
long after killing the session.

jg
--
@home.com is bogus.
http://www.signonsandiego.com/news/f...ure-bambi.html
Jul 19 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
1950
by: michaaal | last post by:
I realize this is not solely an ASP question, but I thought you guys might know the answer and I couldn't find anywhere else to post this. If you have suggestions for this I am more than happy to post somewhere else. How can I, using ASP code, validate whether or not an email address is a real one? For example, if I have the email address...
3
1839
by: Louis Frolio | last post by:
All, if I were to write an app that has one task, determine whether or not an SQL Instance is running, what would be the easist method for this? I personally think that a query against the masterdb would do the trick. I would appreciate any feedback you can provide. L
13
6335
by: Nige | last post by:
To save me re-inventing the wheel, does anyone have a function to capitalise each word in form data? I was thinking along the lines of capitalise the first letter of the string, then any other letter after a space or hyphen. So many users seem to think that just because they are online they can use names like "mr john smith" and so I have...
7
1321
by: Sascha Crescionini | last post by:
Hello ng Is there a way to resize and/or close the IE search pane using javascript? Any ideas? Greets Sascha
16
1349
by: Lorem Ipsum | last post by:
I am preparing to hire a general web programmer and in the process talked to one who said something that surprised me. He laughed and said, "Nobody codes anything from scratch. We all take code from other pages out there and put 'em together. It's crazy to code from scratch!" Is it true?
9
1588
by: raphael | last post by:
How can i conceal the the code for a web page
54
10958
by: zhaoyandong | last post by:
In one of my interview, some people asked me why C is faster C++, and tell me to illustrate at least two reasons. I can't find the answer in the web. I'll appreciate any suggestion on this. Thank you.
0
1573
by: Gavin | last post by:
Hi guys, I'm currently developing a forum system as a personal project and I've been having some troubles coming up with a good way to display only the posts on a specific page. I was wondering if any of you can give me some good tips regarding efficient database setups for storing and retrieving post information, and if there are any surefire,...
10
2102
by: PengYu.UT | last post by:
Hi, Maybe this is an simple question. How can I insure that the objects of a class must be allocated in the heap? Thanks, Peng
24
22557
by: deko | last post by:
I'm trying to log error messages and sometimes (no telling when or where) the message contains a string with double quotes. Is there a way get the query to insert the string with the double quotes? Do I need to use code to scrub each string and remove or escape the double quotes before using it in a query? The error I get is this: ...
0
7178
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7125
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7543
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5703
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4757
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3252
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3239
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
813
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.