Re: disable all RMAN jobs in Grid Contol
From: NetComrade <netcomrade_at_gmail.com>
Date: Wed, 28 Apr 2010 13:40:21 -0700 (PDT)
Message-ID: <08b3c5e3-2418-4d56-9645-e04bec5eb896_at_a16g2000vbr.googlegroups.com>
On Apr 28, 3:25 pm, Mladen Gogala <n..._at_email.here.invalid> wrote:
> 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.com
Date: Wed, 28 Apr 2010 13:40:21 -0700 (PDT)
Message-ID: <08b3c5e3-2418-4d56-9645-e04bec5eb896_at_a16g2000vbr.googlegroups.com>
On Apr 28, 3:25 pm, Mladen Gogala <n..._at_email.here.invalid> wrote:
> 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.com
Well, this is killing sessions per a certain criteria. What I want to do is suspend all jobs.. I guess downtiming databases will be the way to go, or identifying all jobs that should run during a MW Received on Wed Apr 28 2010 - 15:40:21 CDT