Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: rman fun :), nightmare and long

Re: rman fun :), nightmare and long

From: Connor McDonald <hamcdc_at_yahoo.co.uk>
Date: Fri, 04 Oct 2002 06:08:32 -0800
Message-ID: <F001.004E0A2A.20021004060832@fatcity.com>


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


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US