Re: DBPITR and ORA-16005 Error: database requires recovery.

From: <fitzjarrell_at_cox.net>
Date: Fri, 2 May 2008 10:26:27 -0700 (PDT)
Message-ID: <9e6b795c-006a-478d-985e-2d818f630109@i76g2000hsf.googlegroups.com>


On May 2, 12:04 pm, "gba..._at_ravenpack.com" <gba..._at_ravenpack.com> wrote:
> Hi,
>
>  I am trying to test database point in time recovery scenarios in
> which I want to Open read-only the database before using RESETLOGS
> clause. The test was ran on a Oracle 10gR2 single instance.
>
> 1) Perform backup using RMAN default channel, no recovery catalog and
> having control file autobackup enabled.
> RUN {
> BACKUP DATABASE;
> BACKUP ARCHIVELOG ALL NOT BACKED UP DELETE ALL INPUT;
>
> }
>
> 2) Get the current SCN from V$DATABASE. Call it SCN1.
>
> 3) DROP a table. Shutdown Immediate and mount the database.
>
> 4) Perform a DBPITR up to SCN1:
> RUN {
> SET UNTIL SCN [SCN1];
> RESTORE DATABASE;
> RECOVER DATABASE;
>
> }
>
> 5) When trying to open the database in read only mode
> RMAN> SQL 'ALTER  DATABASE OPEN READ ONLY'
>  The command fails with ORA-16005: database requires recovery.
>
> I can only open the database read-write using RESETLOGS clause, but
> this leave me without the chance of verifying the data before creating
> a new database incarnation.
>
> Does anyone have any clue about why is this happening?
>
> Thanks for your help.
>
> G. Bahut.

You're probably using CHECKPOINT_CHANGE# for your SCN; try using RESETLOGS_CHANGE# instead, since that is the SCN Oracle will find after an ALTER DATABASE OPEN RESETLOGS; has been executed.

David Fitzjarrell Received on Fri May 02 2008 - 12:26:27 CDT

Original text of this message