Re: RMAN help
- From: Mladen Gogala <gogala@xxxxxxxxxxxxx>
- Date: Fri, 12 May 2006 02:32:22 GMT
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
.
- References:
- RMAN help
- From: newbie
- Re: RMAN help
- From: Mladen Gogala
- Re: RMAN help
- From: newbie
- RMAN help
- Prev by Date: Re: Hit deadlock with 2 threads updating DIFFERENT tables! Why?
- Next by Date: Re: development tool for oracle and sql server
- Previous by thread: Re: RMAN help
- Next by thread: Re: RMAN help
- Index(es):
Relevant Pages
|