Home » RDBMS Server » Server Administration » Do not answer my question as it is NOT urgent at all - How to kill a SYS session
Do not answer my question as it is NOT urgent at all - How to kill a SYS session [message #245286] Fri, 15 June 2007 14:32 Go to next message
shaseeb
Messages: 113
Registered: April 2007
Location: Madison, WI
Senior Member
What is the command to kill a SYS session? Let's say someone figured out the SYS password and logged in. Now I want to kill the session. What do I do?

The ALTER SYSTEM KILL SESSION 'SID,SERIAL#' does not work.

[Updated on: Fri, 15 June 2007 15:04] by Moderator

Report message to a moderator

Re: URGENT!!! How to kill a SYS session [message #245288 is a reply to message #245286] Fri, 15 June 2007 14:37 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>The ALTER SYSTEM KILL SESSION 'SID,SERIAL#' does not work.

Is this user logged directly onto DB server system?
Is this user connected to the DB over the network?

>URGENT!!!!
Please explain why it is URGENT for me to solve this problem for you.

What is Operating System name & version?
What is Oracle version to 4 decimal places?
Re: URGENT!!! How to kill a SYS session [message #245290 is a reply to message #245286] Fri, 15 June 2007 14:38 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
does not work

This is not an Oracle error.

Regards
Michel
Re: URGENT!!! How to kill a SYS session [message #245292 is a reply to message #245288] Fri, 15 June 2007 14:40 Go to previous messageGo to next message
shaseeb
Messages: 113
Registered: April 2007
Location: Madison, WI
Senior Member
>The ALTER SYSTEM KILL SESSION 'SID,SERIAL#' does not work.

Is this user logged directly onto DB server system?
- He is logged in through sqlplus
Is this user connected to the DB over the network?

>URGENT!!!!
Please explain why it is URGENT for me to solve this problem for you.

- Because he could mess things up.

What is Operating System name & version?
- Oracle 10.2.0.3 RHEL 4 (rh-development.fprc.ophth.wisc.edu)
Re: URGENT!!! How to kill a SYS session [message #245295 is a reply to message #245286] Fri, 15 June 2007 14:44 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
kill -9 {pid}
Re: URGENT!!! How to kill a SYS session [message #245297 is a reply to message #245286] Fri, 15 June 2007 14:49 Go to previous messageGo to next message
shaseeb
Messages: 113
Registered: April 2007
Location: Madison, WI
Senior Member
the pid for sys is not there!!

What UNIX command do you give to find it out??

I did ps -ef|grep sqlplus, but it did not give anything

or if I do pd -ef|grep ora it gives the following:


oracle 2826 1 0 May21 ? 00:01:06 ora_pmon_FPRCDEV
oracle 2828 1 0 May21 ? 00:00:09 ora_psp0_FPRCDEV
oracle 2830 1 0 May21 ? 00:00:02 ora_mman_FPRCDEV
oracle 2832 1 0 May21 ? 00:00:54 ora_dbw0_FPRCDEV
oracle 2834 1 0 May21 ? 00:01:12 ora_dbw1_FPRCDEV
oracle 2836 1 0 May21 ? 00:00:52 ora_dbw2_FPRCDEV
oracle 2838 1 0 May21 ? 00:00:54 ora_dbw3_FPRCDEV
oracle 2840 1 0 May21 ? 00:04:43 ora_lgwr_FPRCDEV
oracle 2842 1 0 May21 ? 00:08:42 ora_ckpt_FPRCDEV
oracle 2844 1 0 May21 ? 00:02:26 ora_smon_FPRCDEV
oracle 2846 1 0 May21 ? 00:00:04 ora_reco_FPRCDEV
oracle 2848 1 0 May21 ? 00:03:52 ora_cjq0_FPRCDEV
oracle 2850 1 0 May21 ? 00:02:18 ora_mmon_FPRCDEV
oracle 2852 1 0 May21 ? 00:02:11 ora_mmnl_FPRCDEV
oracle 2854 1 0 May21 ? 00:00:00 ora_d000_FPRCDEV
oracle 2856 1 0 May21 ? 00:00:00 ora_s000_FPRCDEV
oracle 2864 1 0 May21 ? 00:00:16 ora_arc0_FPRCDEV
oracle 2866 1 0 May21 ? 00:00:25 ora_arc1_FPRCDEV
oracle 2868 1 0 May21 ? 00:00:17 ora_arc2_FPRCDEV
oracle 2870 1 0 May21 ? 00:00:17 ora_arc3_FPRCDEV
oracle 2872 1 0 May21 ? 00:00:00 ora_qmnc_FPRCDEV
oracle 3365 1 0 May21 ? 00:00:32 ora_q000_FPRCDEV
oracle 3368 1 0 May21 ? 00:00:01 ora_q001_FPRCDEV
oracle 12740 1 0 14:58 ? 00:00:00 ora_j001_FPRCDEV
oracle 12902 3910 0 15:04 pts/1 00:00:00 grep ora_

where is the SYS's user's pid???

[Updated on: Fri, 15 June 2007 14:55]

Report message to a moderator

Re: URGENT!!! How to kill a SYS session [message #245299 is a reply to message #245286] Fri, 15 June 2007 14:55 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
> Let's say someone figured out the SYS password and logged in.
What make you think this is the case?

>He is logged in through sqlplus
>I did ps -ef|grep sqlplus, but it did not give anything

How do you reconcile these two contradictory statements?

>What do I do?
Run in circles & scream & shout "The sky is Falling"!

[Updated on: Fri, 15 June 2007 14:55] by Moderator

Report message to a moderator

Re: URGENT!!! How to kill a SYS session [message #245300 is a reply to message #245299] Fri, 15 June 2007 14:58 Go to previous messageGo to next message
shaseeb
Messages: 113
Registered: April 2007
Location: Madison, WI
Senior Member
Ok I don't know if you're trying to be funny or sarcastic, but you don't have to know the reason behind things happening. I just asked How to kill a SYS session. THe command...that's it.

All I am asking is the command please.

Thank you
Re: How to kill a SYS session [message #245301 is a reply to message #245286] Fri, 15 June 2007 15:02 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
ALTER SYSTEM KILL SESSION 'SID,SERIAL#' does work.
This session's status be either "KILLED" or "SNIPED"
This session will stay "in the database" while the associated OS process exists.

[Updated on: Fri, 15 June 2007 15:03] by Moderator

Report message to a moderator

Re: URGENT!!! How to kill a SYS session [message #245305 is a reply to message #245300] Fri, 15 June 2007 15:32 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
you don't have to know the reason behind things happening

And we don't have any reason to help you.

Regards
Michel
Re: Do not answer my question as it is NOT urgent at all - How to kill a SYS session [message #245331 is a reply to message #245286] Sat, 16 June 2007 01:19 Go to previous messageGo to next message
Brayan
Messages: 315
Registered: June 2002
Senior Member
Quote:
The ALTER SYSTEM KILL SESSION 'SID,SERIAL#' does not work.


Its been very difficult to digest Embarassed

Is it giving error? - Post Error
Mention clearly, what is the problem you are facing.

SQL> ALTER SYSTEM KILL SESSION 'sid,serial#';

In some situations the Oracle.exe is not able to kill the session immediately. In these cases the session will be "marked for kill". It will then be killed as soon as possible.

Issuing the ALTER SYSTEM KILL SESSION command is the only safe way to kill an Oracle session. If the marked session persists for some time you may consider killing the process at the operating system level. Witout knowing which process, killing OS processes is dangerous and can lead to instance failures.

It is possible to force the kill by adding the IMMEDIATE keyword:
SQL> ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE;

Hope this helps you,

Brayan.
Re: Do not answer my question as it is NOT urgent at all - How to kill a SYS session [message #245352 is a reply to message #245331] Sat, 16 June 2007 05:34 Go to previous messageGo to next message
pablolee
Messages: 2882
Registered: May 2007
Location: Scotland
Senior Member
This is a dumb question, but are you, by any chance, typing 'sid' and 'serial#' rather than actually typing the values appropriate
e.g. ALTER SYSTEM KILL SESSION '181,2'

(You never know guys) Wink

[Updated on: Sat, 16 June 2007 05:34]

Report message to a moderator

Re: Do not answer my question as it is NOT urgent at all - How to kill a SYS session [message #245704 is a reply to message #245286] Mon, 18 June 2007 10:16 Go to previous messageGo to next message
shaseeb
Messages: 113
Registered: April 2007
Location: Madison, WI
Senior Member
Well...I figured it out. It did kill the session, but afterwards I thought there was another SYS session, which was actually mine Smile and I was trying to kill that Razz . What I found out is that you can't kill your own session from SQL, duh. I apologize for the confusion and chaos I caused. I was very upset as somehow the SYS password got out and I was trying to find out who did it and I was trying to kill any sessions that were trying to connect as SYS. I also ended up changing the password, which would have been much easier in the first place. It's strange how in one company the SYS passsword is guarded with one's life and at another company every other person has it Mad

Sorry for all the craziness
Re: URGENT!!! How to kill a SYS session [message #245816 is a reply to message #245297] Mon, 18 June 2007 21:05 Go to previous message
gkrishn
Messages: 506
Registered: December 2005
Location: Putty a dark screen
Senior Member
shaseeb wrote on Fri, 15 June 2007 14:49
the pid for sys is not there!!

What UNIX command do you give to find it out??





Also, Shaseeb for ur information .
You can get process ID from SPID column of v$process .

#complete query

select
       substr(a.spid,1,9) pid,
       substr(b.sid,1,5) sid,
       substr(b.serial#,1,5) ser#,
       substr(b.machine,1,6) box,
       substr(b.username,1,10) username,
--       b.server,
       substr(b.osuser,1,8) os_user,
       substr(b.program,1,30) program
from v$session b, v$process a
 where
b.paddr = a.addr
and type='USER'
order by spid;

[Updated on: Mon, 18 June 2007 21:06]

Report message to a moderator

Previous Topic: ORA-01536: space quota exceeded for tablespace 'TOOLS'
Next Topic: Shutdown Immediate Timeout
Goto Forum:
  


Current Time: Mon Dec 02 12:24:09 CST 2024