Re: Error recovering a database with a read-only tablespace

From: David Lord <dlordster_at_gmail.com>
Date: Thu, 17 Apr 2008 09:06:57 +0100
Message-ID: <649030d80804170106g67009a75k2cc23750c8c7c79e@mail.gmail.com>


Riyaj,

Thanks for your reply. I am trying to do an incomplete recovery of the database to a full backup I took a few days ago. Its in noarchivelog mode and I don't want to go past the backup.

The first restore I tried (via enterprise manager - yes I know, I _have_ to press all the buttons) was straightforward and without the check readonly option and it said it was ignoring the read only datafile:

RMAN> run {

2> restore database;
3> recover database noredo;
4> }

...
datafile 13 not processed because file is read-only ...
RMAN> alter database open resetlogs;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 04/15/2008 15:35:19
ORA-01122: database file 13 failed verification check
ORA-01110: data file 13: '/data/oradata/ESDCWTST/ASSETS_21.dbf'
ORA-01206: file is not part of this database - wrong database id

I have tried to take the tablespace offline, but it doesn't let me because the database is not open.

Regards
David Lord

On 16/04/2008, Riyaj Shamsudeen <riyaj.shamsudeen_at_gmail.com> wrote:
> Hi David
>
> I am really not sure what you are trying to do. Can you please clarify?
> If the tablespaces are in read only state at time of recovery, then they
> don't participate in recovery. rman recover database command takes care of
> that. I don't think 'check readonly' option is quite applicable here.
> In sqlplus, you could make those datafiles associated with read only
> tablespaces offline [ or offline drop, don't remember which one ] and
> recover the database, open resetlogs. Then you could just make read only
> tablespace onlline.
>
> Cheers
> Riyaj Shamsudeen
> The Pythian Group
> www.pythian.com
>
> On Wed, Apr 16, 2008 at 10:54 AM, David Lord <dlordster_at_gmail.com> wrote:
>
> >
> > All,
> >
> > I'm running into a problem trying to recover a 9.2.0.8 test database
> > with a read only tablespace ASSETS_21 from an RMAN backup.
> >
> > The restore runs fine and appears to restore the ASSETS_21.dbf
> > datafile (number 13 for the superstitious amongst you):
> >
> > RMAN> restore database check readonly force;
> > ...
> > restoring datafile 00013 to
> /data/oradata/ESDCWTST/ASSETS_21.dbf
> > ...
> > Finished restore at 16-APR-08
> >
> > But when I do the recovery, I get the following error:
> >
> > RMAN> recover database check readonly;
> > ...
> > could not read file header for datafile 13 error reason 9
> > ...
> > RMAN-03002: failure of recover command at 04/16/2008 16:02:16
> > RMAN-06094: datafile 1 must be restored
> >
> > And when I try it from sqlplus I get:
> >
> > SQL> recover database until cancel using backup controlfile;
> > ORA-00283: recovery session canceled due to errors
> > ORA-01110: data file 13:
> '/data/oradata/ESDCWTST/ASSETS_21.dbf'
> > ORA-01122: database file 13 failed verification check
> > ORA-01110: data file 13:
> '/data/oradata/ESDCWTST/ASSETS_21.dbf'
> > ORA-01206: file is not part of this database - wrong database id
> >
> > Has anybody come across this before, or know what to do? I'm probably
> > going to end up cloning a new copy from the live database, but it
> > would be nice to know what the problem was.
> >
> > Regards
> > David Lord
> > --
> > http://www.freelists.org/webpage/oracle-l
> >
> >
> >
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Apr 17 2008 - 03:06:57 CDT

Original text of this message