Re: RMAN help



On Wed, 10 May 2006 21:14:13 -0700, newbie wrote:

This is an excellent reply. I shall definitely implement this.
but first I need to readup on all this from the book you recommended.

Thanks

Well, we're not done yet. Here is the lesson two. We've just had a little
disk problem:

SQL> select file_name from dba_data_files where tablespace_name='SYSTEM';

FILE_NAME
--------------------------------------------------------------------------------
/oradata/oracle/ORACLE/datafile/o1_mf_system_22scjjbr_.dbf

SQL> !
$ rm -f /oradata/oracle/ORACLE/datafile/o1_mf_system_22scjjbr_.dbf
$ sync
$

SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 268435456 bytes
Fixed Size 1260348 bytes
Variable Size 96470212 bytes
Database Buffers 167772160 bytes
Redo Buffers 2932736 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1:
'/oradata/oracle/ORACLE/datafile/o1_mf_system_22scjjbr_.dbf'


SQL>

So, there was a little disk accident and we lost one of
the files from the tablespace SYSTEM. I believe that your question
was: how to recover? Here it goes:

$ rman target=/ nocatalog

Recovery Manager: Release 10.2.0.2.0 - Production on Thu May 11 22:22:14 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.

connected to target database: ORACLE (DBID=1459558253, not open)
using target database control file instead of recovery catalog
RMAN> startup force mount

Oracle instance started
database mounted

Total System Global Area 268435456 bytes

Fixed Size 1260348 bytes
Variable Size 96470212 bytes
Database Buffers 167772160 bytes
Redo Buffers 2932736 bytes

RMAN> recover database;

Starting recover at 11-MAY-06
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=62 devtype=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 05/11/2006 22:22:35
RMAN-06094: datafile 1 must be restored

RMAN> restore datafile 1;

Starting restore at 11-MAY-06
using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /oradata/oracle/ORACLE/datafile/o1_mf_system_22scjjbr_.dbf
channel ORA_DISK_1: reading from backup piece /data/orabck/backup/dbs06hiod9b_1_1.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/data/orabck/backup/dbs06hiod9b_1_1.bak tag=TAG20060510T203554
channel ORA_DISK_1: restore complete, elapsed time: 00:00:55
Finished restore at 11-MAY-06

RMAN> recover database;

Starting recover at 11-MAY-06
using channel ORA_DISK_1

starting media recovery

archive log thread 1 sequence 38 is already on disk as file /data/orabck/arch/arch1_38_586480813.arch
archive log thread 1 sequence 39 is already on disk as file /data/orabck/arch/arch1_39_586480813.arch
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=37
channel ORA_DISK_1: reading from backup piece /data/orabck/backup/dbs08hiodgn_1_1.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/data/orabck/backup/dbs08hiodgn_1_1.bak tag=TAG20060510T203950
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
archive log filename=/data/orabck/arch/arch1_37_586480813.arch thread=1 sequence=37
media recovery complete, elapsed time: 00:00:06
Finished recover at 11-MAY-06

RMAN> alter database open;

database opened

RMAN>

Recovery Manager complete.
$ sqlplus scott/tiger

SQL*Plus: Release 10.2.0.2.0 - Production on Thu May 11 22:25:45 2006

Copyright (c) 1982, 2005, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL>

Of course, the first thing to do now is to perform another backup. This
is, roughly, how you do it. Of course, with a large production database
it may take slightly more then 10 minutes.

--
http://www.mgogala.com

.



Relevant Pages

  • Re: Recovering Inbox Hard Deleted Items
    ... If you can't recover from dumpster, ... that the restored database didn't have any "dumpster" items. ... I need to restore some emails that the user hard deleted from the inbox ...
    (microsoft.public.exchange.admin)
  • Re: WSS Backup Strategy
    ... It works with WSS ... > were forced to recover single users mailboxes for years. ... > capability to restore single documents from its backup. ... >> We have a single Sharepoint server and the database resides in our ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: deletion mistake
    ... Use POINT_IN_TIME restore strategy to recover the tables. ... Take a backup transaction log in current database ... Restore with full backup file with NORECOVERY ...
    (microsoft.public.sqlserver.security)
  • How to retrieve file from _SITE database DOC table
    ... sharepoint portal server. ... Since many other files being updated, I can't restore the database from tape ... Wondering now how can I recover the file from this record? ...
    (microsoft.public.sharepoint.portalserver)
  • Re: RMAN-06031: could not translate database keyword during rman backup/restore
    ... Marco pisze: ... RMAN>restore database; ... Starting restore at 19-SEP-08 ... using channel ORA_DISK_1 ...
    (comp.databases.oracle.server)