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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Hot backups

Re: Hot backups

From: <Charlie_Mengler_at_HomeDepot.com>
Date: Mon, 10 Mar 2003 13:36:06 -0800
Message-ID: <F001.00565424.20030310133606@fatcity.com>

Yes, I believe there is a better way.

  1. Get the current SCN
  2. Update a record in the DB with SCN# & COMMIT;
  3. Get the current SCN;
  4. While #1 SCN <> #3 SCN go to #1
  5. switch logfile
  6. Write #3 SCN out to a file which can be used to decide when to stop applying redo logfiles.
  7. After the DB gets opened, you can verify the SCN# in the datafile matches the DB.
                      "Schauss, Peter"                                                                                                   
                      <pschauss_at_northropg        To:       Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>                   
                      rumman.com>                cc:                                                                                     
                      Sent by:                   Subject:  Hot backups                                                                   
                      root_at_fatcity.com                                                                                                   
                                                                                                                                         
                                                                                                                                         
                      03/10/2003 12:36 PM                                                                                                
                      Please respond to                                                                                                  
                      ORACLE-L                                                                                                           
                                                                                                                                         
                                                                                                                                         




I am implementing hot backups on a small development database using the following approach:

  1. From sqlplus: backup controlfile to '<filename>';
  2. For each tablespace
    • sqlplus: alter tablespace <name> begin backup;
    • shell: copy files for that tablespace
    • sqlplus: alter tablespace <name> end backup;
    • sqlplus: alter system switch logfile;
  3. tar and gzip the tablespace copies and backup control file;

As a test, I am restoring the files to another system by doing the following:

  1. Copied the init.ora file from the backed up database.
  2. Restore the copied tablespaces and control files.
  3. Copy the archived redo logs to the directory specified in the init.ora file.
  4. Note the number on the most recent redo log.
  5. sqlplus internal startup mount recover database until cancel using backup controlfile; (hit return when prompted for the next file until the last redo log noted in step 4 has been processed, then type CANCEL in response to the prompt for the next file.) alter database open reset logs;

The above steps work, but I am wondering is there a better way to handle the control files so that I do not have to use the "until cancel" option.

Thanks,
Peter Schauss
Northrop Grumman Corporation

--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Schauss, Peter
  INET: pschauss_at_northropgrumman.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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).






-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: 
  INET: Charlie_Mengler_at_HomeDepot.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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).
Received on Mon Mar 10 2003 - 15:36:06 CST

Original text of this message

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