Here is an example from 8.1.7.4
oracle_at_loki:/orabak >rman nocatalog
Recovery Manager: Release 8.1.7.4.0 - Production
RMAN> connect target /
RMAN-06005: connected to target database: LIVL
(DBID=750735866)
RMAN-06009: using target database controlfile instead
of recovery catalog
RMAN> run {
2> allocate channel c1 type disk;
3> set limit channel c1 kbytes=2000000;
4> backup full (database format
'/orabak/tmp/ORA_O_%d_%t_%s_%p_%u');
5> sql "ALTER SYSTEM ARCHIVE LOG CURRENT";
6> change archivelog all crosscheck;
7> backup (archivelog all format
'/orabak/tmp/ORA_A_%d_%t_%s_%p_%u');
8> }
RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: c1
RMAN-08500: channel c1: sid=22 devtype=DISK
RMAN-03022: compiling command: set limit
RMAN-03023: executing command: set limit
RMAN-03022: compiling command: backup
RMAN-03023: executing command: backup
RMAN-08008: channel c1: starting full datafile
backupset
RMAN-08502: set_count=1 set_stamp=474386022
creation_time=04-OCT-02
RMAN-08010: channel c1: specifying datafile(s) in
backupset
RMAN-08522: input datafile fno=00001
name=/oras1/livl/livlsystem01.dbf
RMAN-08011: including current controlfile in backupset
RMAN-08522: input datafile fno=00002
name=/oras3/livl/livlrbs01.dbf
RMAN-08522: input datafile fno=00008
name=/ora03/livl/livlretest01.dbf
RMAN-08522: input datafile fno=00003
name=/ora01/livl/livllivlt01.dbf
RMAN-08522: input datafile fno=00004
name=/ora02/livl/livllivlt02.dbf
RMAN-08522: input datafile fno=00005
name=/ora03/livl/livllivlt03.dbf
RMAN-08522: input datafile fno=00006
name=/orai1/livl/livllivli01.dbf
RMAN-08522: input datafile fno=00007
name=/orai2/livl/livllivli02.dbf
RMAN-08013: channel c1: piece 1 created
RMAN-08503: piece
handle=/orabak/tmp/ORA_O_LIVL_474386022_1_1_01e4d3j6
comment=NONE
RMAN-08525: backup set complete, elapsed time:
00:03:28
RMAN-03022: compiling command: sql
RMAN-06162: sql statement: ALTER SYSTEM ARCHIVE LOG
CURRENT
RMAN-03023: executing command: sql
RMAN-03022: compiling command: backup
RMAN-03023: executing command: backup
RMAN-08009: channel c1: starting archivelog backupset
RMAN-08502: set_count=2 set_stamp=474386265
creation_time=04-OCT-02
RMAN-08014: channel c1: specifying archivelog(s) in
backup set
RMAN-08504: input archivelog thread=1 sequence=586
recid=543 stamp=474386235
RMAN-08013: channel c1: piece 1 created
RMAN-08503: piece
handle=/orabak/tmp/ORA_A_LIVL_474386265_2_1_02e4d3qp
comment=NONE
RMAN-08525: backup set complete, elapsed time:
00:00:08
RMAN-08031: released channel: c1
So I've taken a backup...now can I get the control
file back?
oracle_at_loki:/orabak/tmp >sqlplus internal
SQL*Plus: Release 8.1.7.0.0 - Production on Fri Oct 4
13:58:56 2002
(c) Copyright 2000 Oracle Corporation. All rights
reserved.
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.4.0 -
Production
With the Partitioning option
JServer Release 8.1.7.4.0 - Production
sys_at_livl> DECLARE
2 devtype varchar2(256);
3 done boolean;
4 BEGIN
5 devtype :=
dbms_backup_restore.deviceallocate('',params=>'');
6 dbms_backup_restore.restoresetdatafile;
7
dbms_backup_restore.restorecontrolfileto('/tmp/foo.bar');
8
dbms_backup_restore.restorebackuppiece('/orabak/tmp/ORA_O_LIVL_474386022_1_1_01e4d3j6',done=>done);
9 END;
10 /
PL/SQL procedure successfully completed.
sys_at_livl> exit
Disconnected from Oracle8i Enterprise Edition Release
8.1.7.4.0 - Production
With the Partitioning option
JServer Release 8.1.7.4.0 - Production
you have mail in /var/mail/oracle
oracle_at_loki:/orabak/tmp >ls -l /tmp/foo.bar
-rw-rw---- 1 oracle dba 1908736 Oct 4
14:00 /tmp/foo.bar
hth
connor
- Joe Testa <jtesta_at_dmc-it.com> wrote: > Connor, my
problem(fault) was I didnt make a copy of
> the control
> file(and in 8.1.7, you don't get it backed up by
> default like in 9i,
> right?).
>
> I attempted to bring the db in nomount and restore
> the control file,
> rman reply "no controlfile backup found".
>
> joe
>
>
> Connor McDonald wrote:
>
> >What follows might be all hogwash, you could have
> >tried this:
> >
> >DECLARE
> > devtype varchar2(256);
> > done boolean;
> >BEGIN
> > devtype := dbms_backup_restore.deviceallocate('',
> >params=>'');
> > dbms_backup_restore.restoresetdatafile;
> >
>
>dbms_backup_restore.restorecontrolfileto('/tmp/foo.bar');
> >
>
>dbms_backup_restore.restorebackuppiece('wherever_my_backups_are',done=>done);
> >END;
> >/
> >
> >which drags a copy of the control file that was
> >included in the backup into /tmp/foo.bar.
> (Obviously
> >this has to be run against a different ie "up"
> >database).
> >
> >Then startup nomount the db to be recovered, rman
> the
> >'replicate controlfile' and then restore/recover in
> >the normal way. I think this functionality came in
> >when they allowed a no-catalog mechanism, so if you
> >lost everything, you could still make use of a
> backup.
> >
> >hth
> >connor
> >
> > --- JOE TESTA <JTESTA_at_longaberger.com> wrote: > Ok
> so
> >the qa environment we've been fooling around
> >
> >
> >>with rman for testing backup/recovery.
> >>
> >>tonite they say " we want a backup restored from
> >>rman from 2 incarnations ago(for those of u who
> dont
> >>know what an incarnation is, its a new version of
> >>the database that gets created when you do open
> >>resetlogs <-- if thats wrong please RMAN gurus
> >>correct me.
> >>
> >>So I get out the book, the docs say "in the event
> >>you have to do this, which should be rare", you
> must
> >>do the
> >>"reset database to incarnation" command.
> >>
> >>seems easy enough, fire up rman, startup
> nomount,
> >>reset incarnation and it finds the old backups,
> and
> >>starts the restore.
> >>
> >>so far so good, but then the catch, being a rman
> >>newbie(8.1.7), i forgot to make a controlfile
> >>backup, now if i'd had that, this should have been
> >>cake,restore the control file in nomount mode,
> mount
> >>and restore the datafiles, recover the datafiles
> and
> >>open resetlogs, did i forget to say, this is a
> >>NOARCHIVELOGMODE database.
> >>
> >>Well, for whatever reason, the database wouldnt
> >>open, due to using a newer controlfile.
> >>
> >>hmmm, i've done this before, i'll just dump the
> >>controlfile to trace(yes i did this BEFORE the
> >>restore, just in case of an actual emergency).
> >>
> >>rebuild the control file, try the recover
> again(did
> >>i say we're going to a particular SCN based on the
> >>info from list backup/list incarnation commands),
> no
> >>deal, damn database will not open.
> >>
> >>regroup, wait a minute, rman aint anything
> special,
> >> let's do this:
> >>
> >>restore the files from rman backup again.
> >>exit rman
> >>sqlplus: recover database until scn #######;
> >>alter database open resetlogs;
> >>
> >>rman: <check> resync catalog;
> >>
> >>CHOKE, but i expected that,
> >>rman: reset database;
> >>
> >>full catalog sync AND
> >>
> >>we're good to go.
> >>
> >>Where did go wrong in using RMAN to do the
> >>recover/restore ???
> >>
> >>joe
> >>
> >>
> >>
> >
> >=====
> >Connor McDonald
> >http://www.oracledba.co.uk
> >http://www.oaktable.net
> >
> >"Remember amateurs built the ark - Professionals
> built the Titanic"
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Everything you'll ever need on one web page
> >from News and Sport to Email and Music Charts
> >http://uk.my.yahoo.com
> >
> >
>
> --
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> --
> Author: Joe Testa
> INET: jtesta_at_dmc-it.com
>
> Fat City Network Services -- 858-538-5051
> http://www.fatcity.com
> San Diego, California -- Mailing list and web
> hosting services
>
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from). You may
> also send the HELP command for other information
> (like subscribing).
Connor McDonald
http://www.oracledba.co.uk
http://www.oaktable.net
"Remember amateurs built the ark - Professionals built the Titanic"
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: =?iso-8859-1?q?Connor=20McDonald?=
INET: hamcdc_at_yahoo.co.uk
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Fri Oct 04 2002 - 09:08:32 CDT