Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> You can use Hot Backups to Clone a Database
So why not do it with hot backups? Copy the "hot" backups of the datafiles
to the test machine, and the necessary archived redo logs available. On the
database to be cloned
backup the control file to trace as you normally would. Edit this file
appropriately to
reflect the new instance name and directory structure. You want to mount,
but not open the
"new" database, reset the logs, and then recover the database using backup
controlfile until cancel. You will be prompted for the redo logs to apply.
You'll have to rename them, but that's no big thing. You can apply logs
until your clone is nearly up to date with the
one it is copied from. Once this is done open the database and reset the
logs.
The methodology was not taken from anywhere, but was developed when someone
failed to do the cold cloning, and the production database could not be
shutdown. The issuing of reset logs
before the recover command seems a mistake, but is necessary. Just make
sure you don't open the database until the redo logs are applied.
Good luck.
Ian MacGregor
Stanford Linear Accelerator Center
ian_at_slac.stanford.edu
-----Original Message-----
From: Smith, Ron L. [mailto:rlsmith_at_kmg.com]
Sent: Thursday, May 25, 2000 1:06 PM
To: Multiple recipients of list ORACLE-L
Subject: RE: Re[2]: Big Whoops
Question for everyone. We frequently do cold database copies from production to test, qual, etc... We have 5 hour window. If I took a backup (3 hours) before I did the copy, there would not be enough time remaining to do the copy. Yet if I make a mistake on the copy scripts I could easily lose a datafile. The question is, do I demand time to do it right and make a backup before I start or do I continue taking the chance that I won't make a mistake?
Ron Smith
Database Administration
rlsmith_at_kmg.com
-----Original Message-----
Sent: Thursday, May 25, 2000 2:00 PM
To: Multiple recipients of list ORACLE-L
One time I delete all the online redo files on a production system. And the database crash in front of eyes in minutes.....
I have so many X windows open up, connecting to different server with the same color and the database SID happened to be the same on the test and production.... :<
Now I made all my X windows for different sessions all in different colors! Like a rainbow flying on my desktop!
Winnie :)
"Steve Boyd" <pimaco_oracle_at_hotmail.com> on 05/25/2000 08:38:37 AM
Please respond to ORACLE-L_at_fatcity.com
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> cc: (bcc: Winnie Liu/HQ/ISC)
I'd like to post a question for everyone on the list.
How many of you have ever dropped a table, or done something like that in the wrong database(thinking you were connected to say the test DB), and hosed production?
Steve Boyd
>From: dgoulet_at_vicr.com
>Reply-To: ORACLE-L_at_fatcity.com
>To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
>Subject: Re[2]: Big Whoops
>Date: Thu, 25 May 2000 06:40:46 -0800
>
>A couple of years ago I was trying to create a new instance on one of our
>Unix
>boxes to support an additional manufacturing line. Since the first
>instance was
>well tuned, I copied the init.ora file to a new name & did the little
>editing
>that I believed necessary, like a new db_name. What I forgot was the
>control_file line. You can guess what happen next, yes the control files
>got
>trashed and the original instance terminated with errors. We had to
>recover
>that one from tape since I hadn't backed up the control files to trace for
>some
>time, but I do now at every shutdown. We live & learn from our mistakes,
>hopefully NOT on a production server.
>
>
>BTW: My advice to any new DBA out there is that when an emergency hits
you,
>or
>an AW SH%$. First step in the process is to step back, take a deep breath
>&
>calm down. Adrenaline and instant reaction are your worst enemies.
>
>Dick Goulet
>Senior Oracle DBA
>Vicor Corporation
>
>____________________Reply Separator____________________
>Author: "Rachel Carmichael" <carmichr_at_hotmail.com>
>Date: 5/24/00 6:16 PM
>
>Lisa,
>
>You have backups? Restore from backup. Otherwise..... recreate and import
>is
>the way to go.
>
>I gotta say, the fact that you did this, figured out how to fix it, and
>didn't freak out about it, would impress me MUCH more on an interview than
>the fact that you have your OCP :)
>
>Rachel
>
>
> >From: Lisa_Koivu_at_gelco.com
> >Reply-To: ORACLE-L_at_fatcity.com
> >To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
> >Subject: Big Whoops
> >Date: Wed, 24 May 2000 14:44:29 -0800
> >
> >This is by far the funniest thing I have ever done. I began running the
> >create
> >database scripts (ON A TEST MACHINE) when the $ORACLE_SID was set to a
> >currently
> >running database. It's now completely and totally hosed. I'm just
> >wondering if
> >there is any possible way of recovering from this. I am just recreating
> >the
> >database and reimporting the data - it's not a big deal, but for future
> >reference, I wonder if this really does mean THE END OF THE DATABASE AS
>WE
> >KNOW
> >IT. My gut feel is YES.
> >
> >I just can't stop laughing. I finish my OCP exams and completely TRASH
a
> >large
> >database in the same day (and dump pink ice cream on my white sweater
> >simultaneously)! Like Kirti said, Who *WANTS* to be a DBA? Are you out
>of
> >your
> >mind? you better be!
> >
> >
> >
> >
> >--
> >Author:
> > INET: Lisa_Koivu_at_gelco.com
> >
> >Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> >San Diego, California -- Public Internet access / Mailing Lists
> >--------------------------------------------------------------------
> >To REMOVE yourself from this mailing list, send an E-Mail message
> >to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> >the message BODY, include a line containing: UNSUB ORACLE-L
> >(or the name of mailing list you want to be removed from). You may
> >also send the HELP command for other information (like subscribing).
>
>________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
>--
>Author: Rachel Carmichael
> INET: carmichr_at_hotmail.com
>
>Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
>San Diego, California -- Public Internet access / Mailing Lists
>--------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
>the message BODY, include a line containing: UNSUB ORACLE-L
>(or the name of mailing list you want to be removed from). You may
>also send the HELP command for other information (like subscribing).
>--
>Author:
> INET: dgoulet_at_vicr.com
>
>Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
>San Diego, California -- Public Internet access / Mailing Lists
>--------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
>the message BODY, include a line containing: UNSUB ORACLE-L
>(or the name of mailing list you want to be removed from). You may
>also send the HELP command for other information (like subscribing).
-- Author: Steve Boyd INET: pimaco_oracle_at_hotmail.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Author: INET: Winnie_Liu_at_infonet.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Author: Smith, Ron L. INET: rlsmith_at_kmg.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and inReceived on Thu May 25 2000 - 17:07:27 CDT
![]() |
![]() |