Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Rookie restore problem

Re: Rookie restore problem

From: Howard J. Rogers <howardjr_at_www.com>
Date: Sun, 1 Apr 2001 18:31:44 +1000
Message-ID: <3ac6e78d@news.iprimus.com.au>

"Jose Nicolau" <jose.nicolau_at_clix.pt> wrote in message news:3AC72C6F.1F8C6C58_at_clix.pt...
> Sorry about, I caught this thread in the midle, but where are the
 important
> 'switch log file' commands at the begining and ending of the script?

Mmmm. In the great scheme of things, I think we can dispense with those. The poster is attempting complete recovery of hot backup'd datafiles without archive logs. I think perhaps we should get our priorities right, don't you?

HJR
>
> "Howard J. Rogers" wrote:
>
> > <todd_at_nospam.org> wrote in message news:9a592b$tu$1_at_news.netmar.com...
> > > This what I have been doing to attempt to restore on a different
 machine:
> > >
> > > Short version
> > > 1) I installed Oracle on new machine (same directory structure)
> > > 2) I created a new control file(s) by issuing: alter database backup
> > > controlfile to trace;
> > > 3) I modify that script to add additional .dbf file that was in the
 old
> > > database (CONTROLROOM.dbf)
> > > 4) I run the script in svrmgrl to create new control files using
 RESETLOGS
> > > instead of NORESETLOGS, because I didn't back the redo logs up
> > > 5) I copy over all the backup .dbf files to new machine
> > > 6) using svrmgrl, connect internal, startup mount
> > > 7) alter database open resetlogs
> > > 8) message about how the system01.dbf file needs recovery
> > > 9) recover database using backup controlfile until cancel;
> > > 10) when prompted for the arc file, I hit enter, but the .arc file
 doesn't
> > > exist.
> > >
> > > Did I screw this up by not backing up the arc files?
> >
> > Yes. You say you are doing this to 'restore on a different machine'.
 How
> > can you possibly restore anything without all available redo (online and
> > archived) being made available to the recovering Instance? In your
 case,
> > it's worse since your backup script takes hot backups -those *must* have
> > redo applied to them to make them internally consistent, otherwise they
 are
> > simply useless.
> >
> > I don't understand why you are having to add a new line to reference a
 file
> > that was 'in the old database'. If it was in the old database, why
 wasn't
> > it in the trace file? Was it backed up? Will the original database's
 redo
> > stream make reference to that file? You're trying to do recovery... get
> > that right first, and then worry about plugging in extra files. If that
> > datafile was not included in the original hot backups, forget it until
> > you've dealt with the recovery of that which *was* there.
> >
> > It also doesn't help that you copied the DBF files *after* running the
> > create controlfile script. They are supposed to be there at the point
 of
> > creating the controlfile, so that Oracle can determine the highest SCN
> > number to place in the header of the new controlfile. How else is it
> > supposed to know the point to which the database should be recovered?
> >
> > And, for the record, if you are ever prompted to supply a piece of redo
> > which you know doesn't exist, the procedure is to allow the current
 recovery
> > to fail, then restart it with a 'recover database until cancel', and
 when
> > prompted for the missing log, to type the word 'cancel'.
> >
> > However: that's not your real problem here. Your real problem is that
 your
> > basic approach is up the spout. What are you trying to achieve? A
 complete
> > recovery of a clone? Then there is no need to issue a resetlogs at all,
> > unless you are also wishing to rename the clone database -and if I were
 you,
> > I'd get the recovery done as one operation, and worry about renaming
 things
> > as a completely separate exercise. You have hot backups -archive logs
 are
> > not optional extras. You need all archives available since the time the
> > first tablespace in your script was put in backup mode. Anything other
 than
> > that just is not going to work.
> >
> > Regards
> > HJR
> >
> > >
> > > Todd
> > >
> > >
> > > In article <3ABDB15E.F7334B42_at_netvigator.com>, Reid Lai
> > > <reidlai_at_netvigator.com> writes:
> > > >What are your steps?
> > > >
> > > >Reid
> > > >
> > > >todd_at_nospam.org wrote:
> > > >
> > > >> I backed up a database using the following script:
> > > >> /*************************************************************/
> > > >> /* Description: Oracle Backup script */
> > > >> /* Usage: Execute in SYSDBA-privileged SQL*Plus session */
> > > >> /*************************************************************/
> > > >>
> > > >> PROMPT Backup up database to jar file
> > > >> PROMPT $ORACLE_BASE/backups/db-backup.tar
> > > >>
> > > >> PROMPT Backing up SYSTEM tablespace ...
> > > >> PROMPT
> > > >> ALTER TABLESPACE system BEGIN BACKUP;
> > > >> HOST cp $ORACLE_BASE/oradata/www/system01.dbf
 $ORACLE_BASE/backups/.
> > > >> ALTER TABLESPACE system END BACKUP;
> > > >>
> > > >> PROMPT SYSTEM tablespace backed up.
> > > >> PROMPT
> > > >>
> > > >> PROMPT Backing up TOOLS tablespace ...
> > > >> PROMPT
> > > >> ALTER TABLESPACE tools BEGIN BACKUP;
> > > >> HOST cp $ORACLE_BASE/oradata/www/tools01.dbf $ORACLE_BASE/backups/.
> > > >> ALTER TABLESPACE tools END BACKUP;
> > > >>
> > > >> PROMPT TOOLS tablespace backed up.
> > > >> PROMPT
> > > >>
> > > >> PROMPT Backing up TEMP tablespace ...
> > > >> PROMPT
> > > >> ALTER TABLESPACE temp BEGIN BACKUP;
> > > >> HOST cp $ORACLE_BASE/oradata/www/temp01.dbf $ORACLE_BASE/backups/.
> > > >> ALTER TABLESPACE temp END BACKUP;
> > > >>
> > > >> PROMPT TEMP tablespace backed up.
> > > >> PROMPT
> > > >>
> > > >> PROMPT Backing up USERS tablespace ...
> > > >> PROMPT
> > > >> ALTER TABLESPACE users BEGIN BACKUP;
> > > >> HOST cp $ORACLE_BASE/oradata/www/users01.dbf $ORACLE_BASE/backups/.
> > > >> ALTER TABLESPACE users END BACKUP;
> > > >>
> > > >> PROMPT USERS tablespace backed up.
> > > >> PROMPT
> > > >>
> > > >> PROMPT Backing up SYSTEM tablespace ...
> > > >> PROMPT
> > > >> ALTER TABLESPACE system BEGIN BACKUP;
> > > >> HOST cp $ORACLE_BASE/oradata/www/system01.dbf
 $ORACLE_BASE/backups/.
> > > >> ALTER TABLESPACE system END BACKUP;
> > > >>
> > > >> PROMPT SYSTEM tablespace backed up.
> > > >> PROMPT
> > > >>
> > > >> PROMPT Backing up RBS tablespace ...
> > > >> PROMPT
> > > >> ALTER TABLESPACE rbs BEGIN BACKUP;
> > > >> HOST cp $ORACLE_BASE/oradata/www/rbs01.dbf $ORACLE_BASE/backups/.
> > > >> ALTER TABLESPACE rbs END BACKUP;
> > > >>
> > > >> PROMPT SYSTEM RBS backed up.
> > > >> PROMPT
> > > >>
> > > >> PROMPT Backing up DRSYS tablespace ...
> > > >> PROMPT
> > > >> ALTER TABLESPACE drsys BEGIN BACKUP;
> > > >> HOST cp $ORACLE_BASE/oradata/www/drsys01.dbf $ORACLE_BASE/backups/.
> > > >> ALTER TABLESPACE DRSYS END BACKUP;
> > > >>
> > > >> PROMPT DRSYS tablespace backed up.
> > > >> PROMPT
> > > >>
> > > >> PROMPT Backing up INDX tablespace ...
> > > >> PROMPT
> > > >> ALTER TABLESPACE indx BEGIN BACKUP;
> > > >> HOST cp $ORACLE_BASE/oradata/www/indx01.dbf $ORACLE_BASE/backups/.
> > > >> ALTER TABLESPACE indx END BACKUP;
> > > >>
> > > >> PROMPT INDX tablespace backed up.
> > > >> PROMPT
> > > >>
> > > >> PROMPT Backing up CONTROLROOM tablespace ...
> > > >> PROMPT
> > > >> ALTER TABLESPACE controlroom BEGIN BACKUP;
> > > >> HOST cp $ORACLE_BASE/oradata/db/CONTROLROOM.dbf
 $ORACLE_BASE/backups/.
> > > >> ALTER TABLESPACE controlroom END BACKUP;
> > > >>
> > > >> PROMPT CONTROLROOM tablespace backed up.
> > > >> PROMPT
> > > >>
> > > >> PROMPT Backing up database control file ....
> > > >> PROMPT
> > > >>
> > > >> ALTER DATABASE BACKUP CONTROLFILE TO
 '$ORACLE_BASE/backups/controlbkup.ctl'
> > > >> REUSE;
> > > >>
> > > >> PROMPT Database Control file backed up.
> > > >> PROMPT
> > > >>
> > > >> PROMPT Backing up misc files.....
> > > >> PROMPT
> > > >>
> > > >> HOST cp $ORACLE_HOME/dbs/initwww.ora $ORACLE_BASE/backups/.
> > > >> HOST cp $ORACLE_HOME/dbs/orapwwww $ORACLE_BASE/backups/.
> > > >> HOST cp $ORACLE_HOME/network/admin/*.ora $ORACLE_BASE/backups/.
> > > >> HOST cp /etc/oratab $ORACLE_BASE/backups/.
> > > >> HOST cp /etc/rc.d/init.d/dbora $ORACLE_BASE/backups/.
> > > >>
> > > >> PROMPT misc files backed up
> > > >> PROMPT
> > > >>
> > > >> -------------------------
> > > >>
> > > >> I have a different box with Oracle installed that I would like to
 restore
 the
> > > >> backup from above. I've tried a few different ways, but I'm not
 having
 any
> > > >> luck. Any suggestions?
> > > >>
> > > >> Thanks,
> > > >> Todd
> > > >>
> > > >> ----- Posted via NewsOne.Net: Free (anonymous) Usenet News via
 the
 Web



> > > >> http://newsone.net/ -- Free reading and anonymous posting to
 60,000+
 groups
> > > >> NewsOne.Net prohibits users from posting spam. If this or other
 posts
> > > >> made through NewsOne.Net violate posting guidelines, email
 abuse_at_newsone.net
> > > >
> > >
> > >
> > > ----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the
 eb -----
> > > http://newsone.net/ -- Free reading and anonymous posting to 60,000+
 groups
> > > NewsOne.Net prohibits users from posting spam. If this or other
 posts
> > > made through NewsOne.Net violate posting guidelines, email
> > abuse_at_newsone.net
>
Received on Sun Apr 01 2001 - 03:31:44 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US