Rookie restore problem

Rookie restore problem

Post by t.. » Sun, 01 Apr 2001 00:19:44



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

 
 
 

Rookie restore problem

Post by Liz Ree » Sun, 01 Apr 2001 05:55:26



<code snipped>

Quote:> -------------------------

> 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?

What are the error messages?  It's kind of hard to answer if all you say
is it's broke.

Liz

 
 
 

Rookie restore problem

Post by t.. » Mon, 02 Apr 2001 03:52:59


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*this up by not backing up the arc files?

Todd



>What are your steps?

>Reid


>> 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'

- Show quoted text -

Quote:>> 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://www.veryComputer.com/,000+
groups
>>    NewsOne.Net prohibits users from posting spam.  If this or other posts
>> made through NewsOne.Net violate posting guidelines, email


 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://www.veryComputer.com/,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts

 
 
 

Rookie restore problem

Post by Howard J. Roger » Mon, 02 Apr 2001 07:24:57


<t...@nospam.org> wrote in message news:9a592b$tu$1@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

- Show quoted text -

> Todd

> In article <3ABDB15E.F7334...@netvigator.com>, Reid Lai
> <reid...@netvigator.com> writes:
> >What are your steps?

> >Reid

> >t...@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
> ab...@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

ab...@newsone.net
 
 
 

Rookie restore problem

Post by Jose Nicola » Mon, 02 Apr 2001 22:26:08


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?
"Howard J. Rogers" wrote:
> <t...@nospam.org> wrote in message news:9a592b$tu$1@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.F7334...@netvigator.com>, Reid Lai
> > <reid...@netvigator.com> writes:
> > >What are your steps?

> > >Reid

> > >t...@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
> > ab...@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
> ab...@newsone.net

 
 
 

Rookie restore problem

Post by Howard J. Roger » Mon, 02 Apr 2001 17:31:44


"Jose Nicolau" <jose.nico...@clix.pt> wrote in message

news:3AC72C6F.1F8C6C58@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:

> > <t...@nospam.org> wrote in message news:9a592b$tu$1@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.F7334...@netvigator.com>, Reid Lai
> > > <reid...@netvigator.com> writes:
> > > >What are your steps?

> > > >Reid

> > > >t...@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/.

- Show quoted text -

> > > >> 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/.

- Show quoted text -

> > > >> 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/.

- Show quoted text -

> > > >> 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
> > > ab...@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
> > ab...@newsone.net

 
 
 

1. Rookie - Date conversion & SP problem

Help please...... I am somewhat of a rookie and cannot figure out why my
stored procedure is returning too much data.

Basically I have a SP that takes in several parameters and returns a
recordset.  If I send in dates of '3/20/2001' and '3/22/2001' as start and
end dates, my stored procedure is returning records from 3/20/2001 -
3/23/2001.  Now if I copy the SQL part and run the query from the sql rather
than the SP I get the correct results with records only from 3/20/2001 -
3/22/2001.

I know the problem has something to do with my concatenation of the times,
but I have to add the times in the stored procedures to make sure I get all
the records for a day, regardless of the time stamp.  Can someone please
tell me what I am doing wrong.   I have included both the SP and the SQL
below.  Any help would be greatly appreciated.

Deborah






 As
  Select         *
From DayObject
     Inner Join cnDayDevObject On DayObject.ID = cnDayDevObject.DayID
     Inner Join DayTypeBridge On DayObject.ID = DayTypeBridge.ObjectID
     Inner Join DayobjType On DayobjType.ID = DayTypeBridge.TypeID





SQL QUERY - this returns the correct results
SELECT     *
FROM         DayObject INNER JOIN
                      cnDayDevObject ON DayObject.ID = cnDayDevObject.DayID
INNER JOIN
                      DayTypeBridge ON DayObject.ID = DayTypeBridge.ObjectID
INNER JOIN
                      DayObjType ON DayObjType.ID = DayTypeBridge.TypeID
WHERE     (cnDayDevObject.DeviceID = 51) AND (cnDayDevObject.DeviceTypeID =
1) AND (cnDayDevObject.DayTypeID = 14) AND
                      (DayObject.DayDate >= '3/20/2001 12:00:00 AM ') AND
(DayObject.DayDate <= '3/21/2001 11:59:59 PM')

Notice that the SQL has the concatenation and it works just
fine.........giving me the correct results.

2. COleVariant

3. Calculated member problem for rookie

4. Teradata Professionals Wanted

5. Rookie question on SELECT problem

6. Enough of Paradox Bashing

7. DB rookie's problem Help please!!!

8. OO and relational databases

9. Rookie at VC++ - linking problem

10. Urgent Restore problem with SQL Server's restore utility

11. Problem with Restore Table and Restore Database

12. SP5 Problem - Backup/Restore problem

13. Service Pack 5 Problem - Backup/Restore Problem