Re: disable all RMAN jobs in Grid Contol
From: Mladen Gogala <no_at_email.here.invalid>
Date: Wed, 28 Apr 2010 19:25:47 +0000 (UTC)
Message-ID: <pan.2010.04.28.19.25.46_at_email.here.invalid>
On Wed, 28 Apr 2010 06:52:36 -0700, NetComrade wrote:
begin
for c in csr(upper('&usr')) loop
end;
end loop;
end;
/
Date: Wed, 28 Apr 2010 19:25:47 +0000 (UTC)
Message-ID: <pan.2010.04.28.19.25.46_at_email.here.invalid>
On Wed, 28 Apr 2010 06:52:36 -0700, NetComrade wrote:
> I have multiple databases writing to NFS for backups, and the NFS will
> be going down for MW.
> Is there any way to suspend RMAN jobs w/o downtiming all the databases,
> or w/o suspending individual backup jobs?
I use the following "kill 'em all" snippet:
declare
cursor csr(usr varchar2) is select sid,serial# from v$session
where username=usr and status != 'KILLED';cmd varchar2(40):='alter system kill session '''; err_msg varchar2(80);
begin
for c in csr(upper('&usr')) loop
begin
execute immediate cmd||c.sid||','||c.serial#||''''; exception
when others then dbms_output.put_line('Killing of the SID:'||c.sid||' failed.'); err_msg:=substr(SQLERRM,1,80); dbms_output.put_line(err_msg);
end;
end loop;
end;
/
It shouldn't be a problem to modify it to fit your purpose. I named this little snippet "cnorris.sql" because it delivers the fatal roundhouse kick to the all sessions belonging to the targeted user.
-- http://mgogala.byethost5.comReceived on Wed Apr 28 2010 - 14:25:47 CDT