Re: Remove datafile from controlfile: recover partial database until time

From: <Laimutis.Nedzinskas_at_seb.lt>
Date: Thu, 10 Nov 2011 08:03:39 +0200
Message-ID: <OFB223D3EB.F18FCBF4-ONC2257944.0020B3E1-C2257944.00214B64_at_seb.lt>



>Unless I'm heavily mistaken, RMAN knows about "skip offline"?

it knows but there is allways a but: documentation states "The RECOVER DATABASE command does not recover any files that are offline normal or read-only at the point in time to which the files are being recovered." I.e. my understanding is RMAN double checks. Which is a good thing. It makes rman recovery more foul proof.
Indeed "alter database datafile 4 offline drop;" for example does not prevent rman from erroring with "datafile 4 needs to be restored"


Please consider the environment before printing this e-mail

                                                                                                                                                   
  From:       Stefan P Knecht <knecht.stefan_at_gmail.com>                                                                                            
                                                                                                                                                   
  To:         "Laimutis.Nedzinskas_at_seb.lt" <Laimutis.Nedzinskas_at_seb.lt>                                                                            
                                                                                                                                                   
  Cc:         "Mark W. Farnham" <mwf_at_rsiz.com>, "oracle-l_at_freelists.org" <oracle-l_at_freelists.org>                                                  
                                                                                                                                                   
  Date:       2011.11.09 21:18                                                                                                                     
                                                                                                                                                   
  Subject:    Re: Remove datafile from controlfile: recover partial database until time                                                            
                                                                                                                                                   





Unless I'm heavily mistaken, RMAN knows about "skip offline"?

On 09.11.2011, at 19:12, Laimutis.Nedzinskas_at_seb.lt wrote:

> yes, exactly. dumping(backing in oracle terms) controlfile to trace gives
> me the "create controlfile" command which I can edit to skip datafiles I
do
> not need to restore.
>
> My question is if this (removing datafile record from control file) can
be
> done by using individual SQL commands.
> My understanding is that this is not possible: the whole tablespace can
be
> dropped together with datafiles but for that the database has to be
opened.
>
> The problem is RMAN: I do not know how to feed into rman what datafiles
to
> skip. RMAN skips at tablespace level only which is fine but the
tablespace
> I deal with is a few TBs in size.
>
> If one looks into alert log while RMAN recovers then it is possible to
see
> that rman builds a list of datafiles to recover but ok, this interface is
> hidden as far as I understand and the least I want is to use hidden
> features unless really necessary. But it looks like RMAN operates at
> tablespace level only (?)
>
>
>
>
>
>
>
>


>
> Please consider the environment before printing this e-mail
>
>
>
> From: "Mark W. Farnham" <mwf_at_rsiz.com>

>
> To: <Laimutis.Nedzinskas_at_seb.lt>, <oracle-l_at_freelists.org>

>
> Date: 2011.11.09 18:33

>
> Subject: RE: Remove datafile from controlfile: recover partial
database until time

>
>
>
>
>
>
> Backing up the controlfile to trace gives you an ascii version you can
edit
> and use to create a controlfile for the partial clone recovery with the
> syntax all conveniently in place. Is that what you're talking about?
>
> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org
]
> On Behalf Of Laimutis.Nedzinskas_at_seb.lt
> Sent: Wednesday, November 09, 2011 8:33 AM
> To: oracle-l_at_freelists.org
> Subject: Remove datafile from controlfile: recover partial database until
> time
>
>
> Hi
>
> Is it possible to remove datafile entry from control file while database
is
> mounted ?
>
> I managed to achieve that by using recreating control file with "CREATE
> CONTROLFILE..."
> Is there another option ?
> "alter database datafile ... offline drop" does not do that. It offlines
> the
> datafile.
>
> If anyone is interested why I need that I can tell:
>
> I develop a procedure to partially recover only some datafiles of
database.
> It all works fine with "alter database datafile ... offline drop" except
> that sqlplus RECOVER UNTIL TIME has to be used instead of RMAN. RMAN does
> not allow such recovery. It works with SKIP TABLESPACES option but my
task
> is more than that: I know which datafiles I have to restore exactly.
> However if controlfile is recreated from scratch and the unneeded files
are
> omitted then RMAN recover works fine. RMAN recover has a few nice options
> like auto restoring of required archive logs and deleting them on a fly.
Of
> course one can guess why I need all that: out of multy TB database only a
> few tabless needs to be restored :-] Sure, the storage space is an
> issue :-]
>
>
>
> Thank you in advance. Laimis N
>
>


>
> -----
>
> Please consider the environment before printing this e-mail
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>
>
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Nov 10 2011 - 00:03:39 CST

Original text of this message