Not sure if I get exactly what you want - but this will kill all the
processes that match the first grep
ps -ef | grep -i "oracleprod" | grep -v grep | awk '{print $2}' | xargs
kill -9
-----Original Message-----
From: Luis Cardenas
[mailto:oracledba-ezmlmshield-x49365488.[Email address protected]
Sent: 28 September 2007 09:32
To: LazyDBA Discussion
Subject: RE: Help please
Not tested it, but along these lines...
-Kill all DB users at unix level
On Unix connect to DB via sqlplus
set heading off
set feedback off
spool kill.sh
select 'kill -9 '||a.spid ||''
from v$process a,v$session b
where b.username is not null
and b.username not like 'SYS%'
and a.addr=b.paddr
/
spool off
EXIT
../kill.sh
-----Original Message-----
From: Mahapatra Himanshu (*IC)
[mailto:oracledba-ezmlmshield-x50167738.[Email address protected]
Sent: 26 September 2007 18:41
To: LazyDBA Discussion
Subject: RE: Help please
select 'alter system kill session '||''''||sid||','||serial#||''''||';'
from v$session where username is not null;
Thanks & Regards,
Himanshu Mahapatra
-----Original Message-----
From: Michael Peel
[mailto:oracledba-ezmlmshield-x79582330.[Email address protected]
Sent: 26 September 2007 13:07
To: LazyDBA Discussion
Subject: RE: Help please
Sorry
Shutdown immediate
Startup
-----Original Message-----
From: Michael Peel
[mailto:oracledba-ezmlmshield-x28873424.[Email address protected]
Sent: 26 September 2007 13:06
To: LazyDBA Discussion
Subject: RE: Help please
Shutdown
Startup
-----Original Message-----
From: FahmeedaD
[mailto:oracledba-ezmlmshield-x9517171.[Email address protected]
Sent: 26 September 2007 12:30
To: LazyDBA Discussion
Subject: RE: Help please
Hi
Does anyone have a unix script to kill all the users on a database?
Many thanx
___________________________________________________________
Important Notice:
Authorised Financial Services Provider
Important restrictions, qualifications and disclaimers
("the Disclaimer") apply to this email. To read this click on the
following address or copy into your Internet browser:
http://www.absa.co.za/disclaimer
The Disclaimer forms part of the content of this email in terms of
section 11 of the Electronic Communications and Transactions
Act, 25 of 2002.
If you are unable to access the Disclaimer, send a blank e-mail
to [Email address protected] and we will send you a copy of the
Disclaimer.
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
**********************************************************************
This e-mail is confidential and may be privileged.
It may only be read, copied and used by the intended recipient.
If you have received it in error please contact the sender immediately
by return e-mail. Please then delete the e-mail and any copies of it
and do not use or disclose its contents to any person.
**********************************************************************
Registered Office: Farncombe House, Broadway, Worcestershire, WR12 7LJ
AccuRead Limited Registered Number: 3076187 England
GSL UK Limited Registered Number: 3333860 England
Global Solutions Limited Registered Number: 3189802 England
**********************************************************************
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
**********************************************************************
This e-mail is confidential and may be privileged.
It may only be read, copied and used by the intended recipient.
If you have received it in error please contact the sender immediately
by return e-mail. Please then delete the e-mail and any copies of it
and do not use or disclose its contents to any person.
**********************************************************************
Registered Office: Farncombe House, Broadway, Worcestershire, WR12 7LJ
AccuRead Limited Registered Number: 3076187 England
GSL UK Limited Registered Number: 3333860 England
Global Solutions Limited Registered Number: 3189802 England
**********************************************************************
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
-----------------------------------------
This e-mail is sent on behalf of Trader Media Group Limited, registered
office: Unit 6, Thatcham Business Village, Colthrop Lane, Thatcham,
Berkshire RG19 4LW (Registered in England No.
4768840). This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the sender. This email message has been swept for the presence of
computer viruses. www.ciphertrust.com
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
--------------------------------------------------------------------------------------------------------------------
'This email and any files transmitted with it are confidential and intended solely for the use of the individual or
entity to whom they are addressed. If you have received this email in error please notify the system manager. Please
note that any views or opinions presented in this email are solely those of the author and do not necessarily
represent those of the Council. Finally, the recipient should check this email and any attachments for the presence
of viruses. The Council accepts no liability for any damage caused by any virus transmitted by this email.'
'Mae'r e-bost yma ag unrhyw ffeiliau trosglwyddwyd ynddi yn gyfrinachol ar gyfer defnydd yr unigolyn neu'r sefydliad
cyfeiriwyd ati yn unig. Os ydych wedi derbyn yr e-bost yma mewn camgymeriad rhowch wybod i reolwr eich system.
Nodwch taw unrhyw sylwadau neu farn soniwyd amdanynt yn yr e-bost yma ydi sylwadau a barn yr awdur ac nid yn
angenrheidiol yn cynrychioli rhai'r Cyngor. I orffen, dylid y person sy'n derbyn yr e-bost sicrhau nad oes firws
ynddi nac mewn unrhyw ddogfen sydd ynghlwm i'r e-bost. Nid yw'r Cyngor yn derbyn unrhyw gyfrifoldeb am unrhyw ddifrod
achoswyd gan unrhyw firws trosglwyddwyd gan yr e-bost yma.'
Oracle LazyDBA home page