Implementing Hot Backups

HI ,
i am new to the idea of hot backups , so need abit of advice on how to implement them by using RMAN and User based techniques
a little bit abt my production environment
Oracle 9.2.0.6
EBS 11.5.10
OS is HP UX 11.11
earlier i used to get downtime of 2 hrs , so iused to cold backups wid RMAN as well OS based techniques , now due to 24 hr system requiremnt
i have to use hotbackups, DB size is 200GB, how can i use hot backups so as my system works efficiently without any extra load

Soli wrote:
Hi,
Each tablespace that needs to be backed-up must be switched into backup mode before copying the files out to secondary storage.
This can be done as shown below:
ALTER TABLESPACE xyz BEGIN BACKUP;
! cp xyfFile1 /backupDir/
ALTER TABLESPACE xyz END BACKUP;
The above would only be for user managed backups, which the OP has no reason to be doing. We should be guiding him in how to use rman, not in how to use obsolete techniques -- <b><i><u>ESPECIALLY</u></i></b> since he is new to the whole subject of backups and would easily be confused by mixing the techniques.
Recovery Manager command:
run {
allocate channel t1 type `SBT_TAPE';
backup
format `df_%s_%t'
(datafile 10);
When Recovery Manager executes the above command, it sends the Oracle backup request to the Oracle server performing the backup.
The Oracle server process identifies the output channel as the type `SBT_TAPE', and requests the Media Management Library to load a tape and write the output specified.
but ther you must ask sysadm which storage you use and how to backup there.
btw.
there is link how to setup RMAN
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/setup004.htm
Regards,
Tom
http://oracledba.cz

Similar Messages

  • Implementing Hot backup strategy

    Hello everyone,
    I am a newbie DBA and now working with an investment bank, their Oracle System is new and I am meant to to implement a backup startegy, the database is meant to be available 24/7, its oracle 9i on Windows Server 2003, it has got 25 tablespace and the data to be backed up is about 10GB.
    I need advice on how to go about it, should I look into scripting or implement RMAN backup, because the backup has to be schduelled about midnight.
    If scripting is the choose could someone advice because i don't know how to script.
    Thanks in advance

    If the data meant to be available for 24/7 , then you do not have any option , but to choose hot backups . Well I happene to be a great fan of RMAN and it's a great tool for backup and recovery purpose . As your database is not that big and it's only about 10 GB . you can consider hot backups through RMAN , as you want to backup it everyday , I would advise you to set retantion policy of 2 days.
    rman > {
    allocate channel device type disk ;
    backup database ;
    backup archivelog all delete input ;
    hare krishna
    Alok

  • Hot backup procedure

    Hello, I have a database that takes in between 80 to 600 transactions per day through an external feed. I need to implement a hot backup that will run once a day. I don't need to do point in time recovery because I can restore from the prior nightly backup and then replay the tlog file from the external feed. What is the best way to implement a hot backup. Is it as simple as running a sql procedure that will loop through all the tablespaces and put them in backup mode and then copy them to another location? I am open to all and any recommendations. The database is Oracle 9.2.0.1 running on Windows 2000 or 2003 server. Please provide any scripts if you can. Thank you and have a great day!
    David

    I wrote a dynamic hot backup script once, you can look into it if you want:
    -- YJAM - Modele backup dynamique
    -- SQL*Plus Env
    SET TIM OFF TIMI OFF ECHO OFF VERIFY OFF FEED OFF TRIMS ON
    -- Variables dépendantes du systeme
    DEFINE DEST_DIR=C:\Backup
    DEFINE DIR_SEP=\  -- win*=\    | unix=/
    DEFINE SH=host    -- win*=host | unix=!
    DEFINE COPIE=copy -- win*=copy | unix=cp
    DEFINE SUPPR=del  -- win*=del  | unix=rm
    DEFINE MARGE_ARCHIVELOGS=10
    -- Preparation pour les archives
    COL FARCH NEW_VALUE FIRST_ARCHIVELOG NOPRINT;
    SELECT MAX(SEQUENCE#)-1  FARCH FROM V$LOG;
    PROMPT *************************************************
    SET SERVEROUTPUT ON SIZE 200000
    SPOOL &DEST_DIR.&DIR_SEP.part1.sql
    DECLARE
         -- Curseur pour recuperer la liste des datafiles
         CURSOR cDatafiles IS SELECT TABLESPACE_NAME, FILE_NAME FROM DBA_DATA_FILES ORDER BY TABLESPACE_NAME;
         REP_BACKUP     VARCHAR2(500 CHAR) := '';     -- Définition du répertoire principal de destination de sauvegarde
         OTN                         VARCHAR2(50 CHAR) := ' ';                                             -- Variable en aiguillde trainante pour le declanchement du mode backup
         PFILE_INFO     VARCHAR2(500 CHAR) := '';                                             -- Variable pour test de type de fichier d'initialisation
    BEGIN
         -- Validation du repertoire de destination
         SELECT INSTANCE_NAME INTO REP_BACKUP FROM V$INSTANCE;
         REP_BACKUP := '&DEST_DIR.&DIR_SEP'||REP_BACKUP||'&DIR_SEP'||TO_CHAR(SYSDATE,'YYYYMMDD')||'&DIR_SEP';
         DBMS_OUTPUT.PUT_LINE('&SH mkdir ' || REP_BACKUP);
         DBMS_OUTPUT.PUT_LINE('--');
         -- Traitement des DATAFILEs
         FOR vDatafiles IN cDatafiles
         LOOP
              -- Si le tablespace parcourru n'est pas le meme que le precedent
              IF (OTN != vDatafiles.TABLESPACE_NAME) THEN
                   -- Si ce n'est pas le premier alors on bascule l'ancien hors du mode backup
                   IF (OTN != ' ') THEN
                        DBMS_OUTPUT.PUT_LINE('ALTER TABLESPACE ' || OTN || ' END BACKUP;');
                   END IF;
                   -- Mise a jour de l'aiguillde trainante et mise en mode backup du tablespace
                   OTN := vDatafiles.TABLESPACE_NAME;
                   DBMS_OUTPUT.PUT_LINE('ALTER TABLESPACE ' || OTN || ' BEGIN BACKUP;');
              END IF;
              -- Il faut sauvegarder les fichiers!
              DBMS_OUTPUT.PUT_LINE('&SH &COPIE ' || vDatafiles.FILE_NAME || ' ' || REP_BACKUP);
         END LOOP;
         -- Evite un effet de bord: sortir le dernier tablespace du mode backup*
         DBMS_OUTPUT.PUT_LINE('ALTER TABLESPACE ' || OTN || ' END BACKUP;');
         DBMS_OUTPUT.PUT_LINE('--');
         -- Sauvegarde du fichier de controle sous forme controlfile et trace
         DBMS_OUTPUT.PUT_LINE('ALTER DATABASE BACKUP CONTROLFILE TO ''' || REP_BACKUP || 'control.ctl'';');
         DBMS_OUTPUT.PUT_LINE('ALTER DATABASE BACKUP CONTROLFILE TO TRACE AS ''' || REP_BACKUP || 'trace.ctl'';');
         DBMS_OUTPUT.PUT_LINE('--');
         -- Vérification du type de fichier d'initialisation
         SELECT VALUE INTO PFILE_INFO FROM V$PARAMETER WHERE NAME='ifile';
         IF (PFILE_INFO IS NULL) THEN
              -- A priori on utilise un fichier de type SPFILE ou le PFILE standard
              SELECT VALUE INTO PFILE_INFO FROM V$PARAMETER WHERE NAME='spfile';
              IF (PFILE_INFO IS NULL) THEN
                   -- On utilise le pfile standard     
                   -- Donc on créée temporairement un spfile pour en faire une sauvegarde)
                   DBMS_OUTPUT.PUT_LINE('CREATE SPFILE=''' || REP_BACKUP || 'spfile.ora'' FROM PFILE;');
                   DBMS_OUTPUT.PUT_LINE('CREATE PFILE=''' || REP_BACKUP || 'pfile.ora'' FROM SPFILE=''' || REP_BACKUP || 'spfile.ora'';');
                   DBMS_OUTPUT.PUT_LINE('&SH &SUPPR ' || REP_BACKUP || 'spfile.ora');
              ELSE
                   -- On utilise un spfile
                   -- Donc on le sauvegarde simplement
                   DBMS_OUTPUT.PUT_LINE('CREATE PFILE=''' || REP_BACKUP || 'pfile.ora'' FROM SPFILE;');
              END IF;
         ELSE
              -- on utilise un pfile specifique
              DBMS_OUTPUT.PUT_LINE('&SH &COPIE ' || PFILE_INFO || ' ' || REP_BACKUP);
         END IF;
         DBMS_OUTPUT.PUT_LINE('--');
    END;
    SPOOL OFF
    @&DEST_DIR.&DIR_SEP.part1.sql
    PROMPT *** Exec part 1
    SPOOL &DEST_DIR.&DIR_SEP.part2.sql
    DECLARE
         -- urseur de parcours de la liste des archivelogs
         CURSOR cListearchive(pLow NUMBER, pHigh NUMBER) IS  SELECT NAME,SEQUENCE#
         FROM V$ARCHIVED_LOG
         WHERE SEQUENCE# BETWEEN pLow AND pHigh
         AND DEST_ID IN
         (SELECT DEST_ID
         FROM V$ARCHIVE_DEST
          WHERE DESTINATION IS NOT NULL
          AND UPPER(DEST_NAME) IN
                    (SELECT UPPER(NAME)
                     FROM V$PARAMETER
                     WHERE VALUE IS NOT NULL
                     AND NAME LIKE '%log_archive_dest_%'
                    AND UPPER(SUBSTR(VALUE,1,8))='LOCATION'
         ORDER BY SEQUENCE#;
         LAST_ARCHIVELOG          NUMBER := 0;
    -- Variables de bornage des archives a sauvegarder
         FIRST_ARCHIVELOG     NUMBER := &FIRST_ARCHIVELOG;
         CURR_ARCHIVELOG          NUMBER := 0;
         REP_BACKUP     VARCHAR2(500 CHAR) := '';
    -- Définition du répertoire principal de destination de sauvegarde
    BEGIN
         -- Validation du repertoire de destination
         SELECT INSTANCE_NAME INTO REP_BACKUP FROM V$INSTANCE;
         REP_BACKUP := '&DEST_DIR.&DIR_SEP'||REP_BACKUP||'&DIR_SEP'||TO_CHAR(SYSDATE,'YYYYMMDD')||'&DIR_SEP';
         -- Marge de travail sur les fichiers archivelogs
         EXECUTE IMMEDIATE 'ALTER SYSTEM SWITCH LOGFILE';
         -- On va savegarder les &MARGE_ARCHIVELOGS derniers archivelogs.
         SELECT MAX(SEQUENCE#)-1 INTO LAST_ARCHIVELOG FROM V$LOG;
         FIRST_ARCHIVELOG := FIRST_ARCHIVELOG - &MARGE_ARCHIVELOGS;
         DBMS_OUTPUT.PUT_LINE('-- tranche: ' || FIRST_ARCHIVELOG || ' a ' || LAST_ARCHIVELOG);
         -- Parcours de la liste des elements archives concernes
         FOR vListearchive IN cListearchive(FIRST_ARCHIVELOG,LAST_ARCHIVELOG)
         LOOP
              -- Traite t'on une nouvelle archive?
              IF (CURR_ARCHIVELOG != vListearchive.SEQUENCE#) THEN
                   DBMS_OUTPUT.PUT_LINE('&SH &COPIE  ' || vListearchive.NAME || ' ' || REP_BACKUP);
                   CURR_ARCHIVELOG := vListearchive.SEQUENCE#;
              END IF;
              -- si non il n'y a rien à faire.
         END LOOP;
    END;
    SPOOL OFF
    PROMPT *** Exec part 2
    @&DEST_DIR.&DIR_SEP.part2.sql
    PROMPT *************************************************But it's provided without guarantee. It's been a long time i've not used it! And it might have bugs. Up to you to test it, backup is not a matter where you trust people :-)
    Of course, you could also use a simple RMAN script, depending on what you are trying to achieve exactly:
    RUN
      allocate channel c01 type disk format 'c:\backup\%d%U';
      backup database;
      backup archivelog all delete input;
    }This is just a sample. And you need to choose how you'll use RMAN.
    Yoann.
    Edited to clean up the code from unnecessary blank lines...
    Message was edited by:
    Yoann Mainguy

  • Automating refreshing one system with the rman hot backup copy from another

    Hi Apps DBAs,
    Right now we have two systems: production (OPEBSN) and production support (FINSUP).
    I implemented a cronjob, which can refresh FINSUP every night from the cold backup of production. We shutdown the production system at night.
    But our istore on production will go live soon and our production system will run 24*7.
    The production is already hot backed up from RMAN.
    Is it possible to do the following?
    Automating refreshing FINSUP from the RMAN hot backup of OPEBSN?
    If it is possible, would you please outline the general idea or give me a reference documentation?
    If it is not possible, is there any other way to realize our purpose?
    Thank you in advance!
    Lily

    There is some discussion about this topic in the belwo askTom thread.
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:21934468026100
    Sam
    http://appstech-sam.blogspot.com

  • Can I use cp or dd to perform hot backup?

    Hi,
    I am wondering whether we can use 'cp' or 'dd' to do hot backup for bdb. IS it safe enough?
    If so, why bdb still need to supply the utility tool db_hotbackup?
    Thanks.
    -Yuan

    The behavior/implementation of 'cp' is different from system to system. In Solaris in particular it doesn't work as you might expect. db_hotbackup was written to give you a supported, reliable way to do a hot (live) backup of the database. You don't have to ship the utility, you're free to copy the code from the utility into your application itself. Would that work?
    -greg

  • Creating RAC database thru RMAN hot backup

    Hi Guys,
    I am having ERP PROD database on 2 nodes 116 and 117(RAC) server. We have a scheduled RMAN HOT backup of this database
    WE also have ASM implemented.
    We have another 2 servers named 36 and 37(RAC and ASM) which has ERP Test Database and the thing is that we want to refresh this
    test database using ERP PROD RMAN backup.
    Can someone please post the proper steps to restore the RMAN backup to ERP Test database as ASM is alos there.
    As it is little urgent for us.
    help will be appreciated.
    Regards,
    Milan Rathod

    1. take the backup of production database
    rman connect target /
    backup as compressed backupset database plus archivelog format '/u01/db/backup/%d_%I_%s_%T';
    move the backup to test server (same location /u01/db/backup/ bcoz rman checks for backupset in the same location only)
    add the below two lines in the test database-- initTEST.ora file
    comment cluster_ parameters in initTEST.ora file
    eg:-
    DB_FILE_NAME_CONVERT = (+EBAOUATDATADG1/prod/,/u01/db/app/admin/test/)
    LOG_FILE_NAME_CONVERT = (+EBAOUATDATADG1/prod/,/u01/db/app/admin/test/)
    check the connectivity between prod and test database.
    from test
    $tnsping PROD
    from prod machine
    $tnsping TEST
    in test server
    startup nomount
    rman target sys@proddb auxiliary /
    duplicate target database to test;
    after completion of duplicate/clone step convert the single instance test to rac instance by uncomment the cluster_ parameters in initTEST.ora parameter
    startup mount the second node in TEST
    ALTER DATABASE ENABLE PUBLIC THREAD 2 ;
    alter database open;
    hope, this will helps you.
    Good Luck

  • Frequency of Hot backups using RMAN

    Hello.
    After years of running various inhouse utilities to backup our Oracle databases we are now going to implement RMAN in our shop. We are running Oracle 10.2.0.4 EE databases on Solaris servers in Archivelog mode, so we'd like to perform "hot" backups. A caveat to this is that we also have "standby" databases that we manually manage via a series of scripts that works rather well and helps our CIO sleep at night.
    So what we're trying to do is tackle one obstacle at a time. We'd like to implement RMAN hot backups (including archivelogs) without having RMAN remove the archivelog backups that are out there. We simply want RMAN to backup the archivelog files, we'll manage their movement and removal ourselves for the time being.
    The script I have put together simply issues: Backup database plus archivelog format='/dumps/rman/F_Database_%d_set%s_%T_%U';
    The configuration settngs (we want at least a 2 day recovery period) are:
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 2 DAYS;
    CONFIGURE BACKUP OPTIMIZATION ON;
    CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/dumps/rman/controlfiles/%F';
    CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/dumps/rman/W_Database_%d_set%s_%T_%U';
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/xora01/app/oracle/product/10g/dbs/snapcf_glprd.f'; # default
    We are using an RMAN catalog.
    So my question is, if I perform the backup of the database (using the above command) once or twice a week and back-up only the archivelogs on a daily basis, would I be covered and save space at the same time? I think this might cover me as far as the archivelogs are concerned as well until my management is more comfortable with RMAN and allows us to install/use Data Guard.
    Thanks for you opinions/suggestions...

    Hi,
    So my question is, if I perform the backup of the database (using the above command) once or twice a week and back-up only the archivelogs on a daily basis, would I be covered and save space at the same time? I think this might cover me as far as the archivelogs are concerned as well until my management is more comfortable with RMAN and allows us to install/use Data Guard.Your idea also not bad to save disk space. it is also depends on database size and space availability on your server.
    or else you can go for weekly once fulll backup, remaining days incremental backups & archivelog backups.
    rman incremental backups take only chanegd blocks so it wont occupy much space
    1) sunday - full backup - level 0
    2) monday - inc1 & arch
    3) tuesday - inc2 & arch
    4) wednesday - inc1 & arch
    5) thursday - inc2 & arch
    6) friday - inc1 & arch
    7) saturday - inc2 & arch... & so on...
    Thanks

  • How to take a Hot backup of Oracle database

    1: put the db in archive log mode
    2: set the db_sid to correct one
    3: login to sqlplus
    4: verify the name of the db that you are connected to
    select name from v$database;
    5: check if the db is in archive log made
    select log_mode from v$database;
    if not in archive log mode
    another command to check
    archive log list;
    6: find where on disk oracle writes archive log when it is in archive log mode
    sql> show parameter log_archive_dest_1;
    if the value is found to be 0, that means no values will be recorded, so we need to change it
    sql> alter system set log_archive_dest_1='LOCATION=c:\database\oradata\finance\archived_logs\'
    scope=spfile;
    7: shutdown immediate; < this is done just to prepare the db for hot backups >
    8: startup the db in mount mode
    startup mount;
    ( 3 startup types : nomount - just starts the instance, mount - locates the control files and open up according to the values, open - finds the datafiles from the control files and opens up the db )
    9: put the db in archive log mode
    alter database archivelog;
    10: open the database
    alter database open;
    11: check the status of the db
    select log_mode from v$database;
    SQL> archive log list;
    12: create a directory for archived log
    check if its empty, if empty we need to switch
    sql> alter system archive log current;
    run it 5 times < need to put / and enter > , then check the archive log dir , we will find files
    13: make a table in the database and insert data in it
    create table employees (fname varchar(2));
    check the table
    desc employees;
    insert values
    insert into employees values ('Mica');
    14: tablespace must be in hot backup mode
    check the status
    select * from v$backup;
    if found not active, then we need to change
    we cannot put the db in hot backup mode, unless it is archive log mode
    change to hot backup mode
    alter database begin backup;
    check the status
    select * from v$backup;
    15: now we can only COPY DBF FILES
    copy *dbf <distination location>
    16: need to take the db out to hot backup mode
    alter database end backup;
    17: need to make another archive log switch
    alter system archive log current;
    18: need to copy control files now, need to do a binary bckup
    alter database backup controlfile to '<location>\controlbackup';
    19: insert more values to the table
    insert into employess values ('NASH')
    COMMIT;
    make another archive log switch : alter system archive log current;
    do the same process for more values
    20 : backup all the archive logs to a new location
    21: shutdown the db and simulate a hw error, delete all the files from the database folder
    22: try to start the sqlplus and db ::: error
    23: copy all the backups to the db dir
    need to copy the control files, rename the binary backup of the control file and make the copies as needed
    24: try to mount the db, error < must use reset logs or noreset logs >
    25: need to do a recovering of the database
    shutdown
    restore the archive logs
    startup mount;
    recover database until cancel using backup controlfile;
    it will ask for a log file :
    yes for recovery
    cancel for cancelling recovery
    26: check status: open the database in readonly
    alter database open read only;
    check the tables to see the data
    shutdown immediate
    shartup mount;
    recover again : recover database until cancel using backup controlfile;
    if oracle is asking for a log that do nto exist , all we have to do is type cancel
    27: open the database
    alter database open;
    need to do reset logs
    alter database open resetlogs;
    28: check the db that you are connected, check the tables
    thanks and regards
    VKN
    site admin
    http://www.nitrofuture.com

    A very long list ... let me make it shorter.
    SQL> archive log list;If I see this:
    Database log mode              No Archive ModeI put the database into archivelog mode and leave it there forever.
    If it is in archivelog mode:
    RMAN> TARGET SYS/<password>@<service_name> NOCATALOG
    RMAN> BACKUP DATABASE PLUS ARCHIVELOG;Though there are a lot of things one could do better such as incrementals with block change tracking, creating an RMAN catalog, etc.

  • Unique Error while doing hot backup Cloning!

    Dear All,
    I am using EBS 11.5.10.2 with DB 9.2.0.6.
    I am doing hot backup cloning by referring *[Cloning Oracle Application 11i /R12 with Rapid Clone - Database (9i/10g/11g) Using Hot Backup on Open Database|https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=760772.1]*
    I am facing a unique issue, when I run adcfgclone.pl dbconfig <my_context_file>, application of my Production Server start misbehaving and it gives me an error:
    Node Id does not exist for the current application server id.When I check the FND_NODE table I found that there server id was empty in it.
    I have to run than run the following steps as the resolution:
    1. Shutdown all the services.
    2. EXEC FND_CONC_CLONE.SETUP_CLEAN;
    3. COMMIT;
    4. Run AutoConfig on all tiers, firstly on the DB tier and then the APPS tiers,to repopulate the required system tables.
    5.start all the services and verify the issue.
    Than application behaves normally.
    Is there any additional step to be followed while Hot Backup Cloning other than mentioned in the above mentioned ML Doc?
    Please suggest,
    Anchorage :)

    I am facing a unique issue, when I run adcfgclone.pl dbconfig <my_context_file>, application of my Production Server start misbehaving and it gives me an error:
    Node Id does not exist for the current application server id.Where did you get this error?
    This is very strange, how come this happens in Production, when you are doing cloning in TEST/DEV instance.
    Is there any additional step to be followed while Hot Backup Cloning other than mentioned in the above mentioned ML Doc?I feel there are no other additional steps, as I Recently did successfully hotbackup cloning using the same document.

  • How to find out which archived logs needed to recover a hot backup?

    I'm using Oracle 11gR2 (11.2.0.1.0).
    I have backed up a database when it is online using the following backup script through RMAN
    connect target /
    run {
    allocate channel d1 type disk;
    backup
    incremental level=0 cumulative
    filesperset 4
    format '/san/u01/app/backup/DB_%d_%T_%u_%c.rman'
    database
    }The backup set contains the backup of datafiles and control file. I have copied all the backup pieces to another server where I will restore/recover the database but I don't know which archived logs are needed in order to restore/recover the database to a consistent state.
    I have not deleted any archived log.
    How can I find out which archived logs are needed to recover the hot backup to a consistent state? Can this be done by querying V$BACKUP_DATAFILE and V$ARCHIVED_LOG? If yes, which columns should I query?
    Thanks for any help.

    A few ways :
    1a. Get the timestamps when the BACKUP ... DATABASE began and ended.
    1b. Review the alert.log of the database that was backed up.
    1c. From the alert.log identify the first Archivelog that was generated after the begin of the BACKUP ... DATABASE and the first Archivelog that was generated after the end of the BACKUP .. DATABASE.
    1d. These (from 1c) are the minimal Archivelogs that you need to RECOVER with. You can choose to apply additional Archivelogs that were generated at the source database to contininue to "roll-forward"
    2a. Do a RESTORE DATABASE alone.
    2b. Query V$DATAFILE on the restored database for the lowest CHECKPOINT_CHANGE# and CHECKPOINT_TIME. Also query for the highest CHECKPOINT_CHANGE# and CHECKPOINT_TIME.
    2c. Go back to the source database and query V$ARCHIVED_LOG (FIRST_CHANGE#) to identify the first Archivelog that has a higher SCN (FIRST_CHANGE#) than the lowest CHECKPOINT_CHANGE# from 2b above. Also query for the first Archivelog that has a higher SCN (FIRST_CHANGE#) than the highest CHECKPOINT_CHANGE# from 2b above.
    2d. These (from 2c) are the minimal Archivelogs that you need to RECOVER with.
    (why do you need to query V$ARCHIVED_LOG at the source ? If RESTORE a controlfile backup that was generated after the first Archivelog switch after the end of the BACKUP ... DATABASE, you would be able to query V$ARCHIVED_LOG at the restored database as well. That is why it is important to force an archivelog (log switch) after a BACKUP ... DATABASE and then backup the controlfile after this -- i.e. last. That way, the controlfile that you have restored to the new server has all the information needed).
    3. RESTORE DATABASE PREVIEW in RMAN if you have the archivelogs and subsequent controlfile in the backup itself !
    Hemant K Chitale

  • Question on recovery from Hot backup

    Whenever I tried to recover from my hot backup using recover database untill cancel (or any other until option)..
    I get messages similar to the following :
    SQL> recover database using backup controlfile until cancel ;
    ORA-00279: change 212733060 generated at 11/18/2008 23:50:58 needed for thread
    1
    ORA-00289: suggestion : /d01/oradata/devl/arc/1_282_667362770.dbf
    ORA-00280: change 212733060 for thread 1 is in sequence #282
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    /d01/oradata/devl/arc/1_282_667362770.dbf
    ORA-00279: change 212733060 generated at needed for thread 2
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    /d01/oradata/devl/arc/2_257_667362770.dbf
    ORA-00279: change 212733060 generated at needed for thread 3
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    /d01/oradata/devl/arc/3_258_667362770.dbf
    ORA-00279: change 212733060 generated at needed for thread 4
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    I have all my archive files in the archive dest location.
    Is there any way to prevent this warning messages and let oracle find all the archive files?
    As you can see from the messages, Oracle is finding the correct file, then why there is an error message and why we have to provide the file names one-by one.
    Please help !!!

    Oracle will look for needed archive logfile from your log archive destination.
    If you are sure all these files are under /d01/oradata/devl/arc/, you can input AUTO, Oracle will work down the list until done.

  • Complete Recovery from HOT BACKUP

    One of our server had media failuer. We are rebuilding new server and reinstalling oracle on it. I have hot backup of instance which I would like to recover.
    Can I have steps please. I will appreciate your help...!

    Hi,
    What is the OS and version of Oracle?
    Do you have all the archivelogs after the hot backup? Is the backup a valid backup? Is it a RMAN backup or normal file system backup of the datafiles?
    Regards,
    Badri.

  • Recovery from hot backup

    I have a problem with recovery hot backup from production database to test database and open it to use.
    I have 'hot backup' without temporary tablespace and roll tablespace, I cant shut down production database (24x7), please give me a regulations how to recover database from hot backup, without online redo logs, temp tablespace, roll tablespace only with archive logs, and.....after this ..rename database sid.
    Every time when I recovered database, it's still want to recover...and recover from archive logs and I cant open it, it's still inconsistent.Please send me an answer for [email protected]
    thanks!

    Hi,
    What is the OS and version of Oracle?
    Do you have all the archivelogs after the hot backup? Is the backup a valid backup? Is it a RMAN backup or normal file system backup of the datafiles?
    Regards,
    Badri.

  • Consistent hot backup possible

    Is a consistent hot backup possible?
    I would like to perform hot backups while the database is in basically a read only state. I am currently using Oracle recommended backups via OEM, for example.
    run {
    allocate channel oem_disk_backup device type disk;
    recover copy of database with tag 'ORA$OEM_LEVEL_0';
    backup incremental level 1 cumulative copies=1 for recover of copy with tag 'ORA$OEM_LEVEL_0' database;
    release channel oem_disk_backup;
    allocate channel oem_sbt_backup1 type 'SBT_TAPE' format '%U';
    backup recovery area;
    Would executing the sql command "alter database begin backup;" before running the above RMAN script accomplish this task? Then off course when completed execute sql "alter database end backup;".
    My basic concern is this type of RMAN hot backup usable in a disaster situation, i.e recreated on another server from tape backup.
    I am open to any other ideas.
    Thanks for your help in advance.
    Ed - Wasilla, Alaska
    Edited by: evankrevelen on Sep 11, 2008 10:18 PM

    Thanks everyone who replied to this thread.
    Just to clarify my complete backup strategy, there are two RMAN scripts run on daily and weekly basis. The daily does pickup the archivelogs. I had shown the weekly when first opening this thread. Here is the daily.
    run {
    allocate channel oem_disk_backup device type disk;
    recover copy of database with tag 'ORA$OEM_LEVEL_0';
    backup incremental level 1 cumulative copies=1 for recover of copy with tag 'ORA$OEM_LEVEL_0' database;
    release channel oem_disk_backup;
    allocate channel oem_sbt_backup1 type 'SBT_TAPE' format '%U';
    backup archivelog all not backed up;
    backup backupset all not backed up since time 'SYSDATE-1';
    My question now is what RMAN does in the increments. It appears to be updating the original level 0 copies of datafiles with changed blocks only. Is the new copy of the datafile now a level 0 type file?
    Here is a transcript from one of the daily backups.
    Starting recover at 11-SEP-08
    channel oem_disk_backup: starting incremental datafile backupset restore
    channel oem_disk_backup: specifying datafile copies to recover
    recovering datafile copy fno=00001 name=+DEVRVYG1/landesk/datafile/system.2576.616107783
    recovering datafile copy fno=00002 name=+DEVRVYG1/landesk/datafile/undotbs1.2574.616107865
    recovering datafile copy fno=00003 name=+DEVRVYG1/landesk/datafile/sysaux.2575.616107829
    recovering datafile copy fno=00004 name=+DEVRVYG1/landesk/datafile/users.2572.616107871
    recovering datafile copy fno=00005 name=+DEVRVYG1/landesk/datafile/landesk.2914.616107643
    channel oem_disk_backup: reading from backup piece +DEVRVYG1/landesk/backupset/2008_09_10/nnndn1_tag20080910t220150_0.12330.665100189
    channel oem_disk_backup: restored backup piece 1
    piece handle=+DEVRVYG1/landesk/backupset/2008_09_10/nnndn1_tag20080910t220150_0.12330.665100189 tag=TAG20080910T220150
    channel oem_disk_backup: restore complete, elapsed time: 00:05:16
    Finished recover at 11-SEP-08
    Starting backup at 11-SEP-08
    channel oem_disk_backup: starting incremental level 1 datafile backupset
    channel oem_disk_backup: specifying datafile(s) in backupset
    input datafile fno=00005 name=+DEVG1/landesk/datafile/landesk.374.614072207
    input datafile fno=00003 name=+DEVG1/landesk/datafile/sysaux.384.614002027
    input datafile fno=00001 name=+DEVG1/landesk/datafile/system.383.614002025
    input datafile fno=00002 name=+DEVG1/landesk/datafile/undotbs1.385.614002027
    input datafile fno=00004 name=+DEVG1/landesk/datafile/users.386.614002027
    channel oem_disk_backup: starting piece 1 at 11-SEP-08
    channel oem_disk_backup: finished piece 1 at 11-SEP-08
    piece handle=+DEVRVYG1/landesk/backupset/2008_09_11/nnndn1_tag20080911t220708_0.12999.665186835 tag=TAG20080911T220708 comment=NONE
    channel oem_disk_backup: backup set complete, elapsed time: 00:02:26
    channel oem_disk_backup: starting incremental level 1 datafile backupset
    channel oem_disk_backup: specifying datafile(s) in backupset
    including current control file in backupset
    including current SPFILE in backupset
    channel oem_disk_backup: starting piece 1 at 11-SEP-08
    channel oem_disk_backup: finished piece 1 at 11-SEP-08
    piece handle=+DEVRVYG1/landesk/backupset/2008_09_11/ncsnn1_tag20080911t220708_0.2301.665186983 tag=TAG20080911T220708 comment=NONE
    channel oem_disk_backup: backup set complete, elapsed time: 00:00:21
    Finished backup at 11-SEP-08
    It appears to be updating the previous copy with updated blocks thus rolling forward the datafile copy to a new level 0 copy.
    Then to restore from the backup RMAN would first use this new copy of the datafile and then apply any archivelogs to them to bring the database to the point in time the incremental backup was taken.
    Are these assumptions true?
    Thanks for your help,
    ED

  • When to use REUSE/SET, NO-ARCHIVELOGS in create controlfile in HOT BACKUP?

    I am a trainee Oracle DBA and have the following queries. Kindly reply with detailed explanation as I want to get my concepts cleared!
    Q1>> While doing a user managed hot backup, when we are creating a control file(CREATE CONTROLFILE) from trace for recovery when do we use the create control file with the following options:
    *1. REUSE / SET*
    *2. ARCHIVELOGS / NOARCHIVELOGS*
    Q2>> In what scenarios do we re-create the control file while recovering datafiles from a hot backup??
    Thanks a tonne!
    Regards,
    Bhavi

    Hemant K Chitale wrote:
    1.1 It is not "REUSE/SET". These are two very different clauses.
    REUSE is when you want the CREATE to overwrite the existing controlfile(s). If the controlfile(s) {as named in the instance parameter file, initSID.ora or spfileSID.ora} is/are already present, the CREATE fails unless REUSE is specified.
    SET is when you want to change the database name. Oracle then creates the controlfile(s) with the specified database name and updates the headers of all the datafiles. If you run a CREATE with a database name that is different from that in the datafile headers, the CREATE fails unless you include a SET to specify that the name must be changed. Note that this also means that the name in the instance parameter file must already have been updated.
    1.2 ARCHIVELOG/NOARCHIVELOG is to set the database state. The same is achieved by issuing an "ALTER DATABASE ARCHIVELOG/NOARCHIVELOG" when the database is MOUNTed but not OPEN.
    2. You'd run the CREATE CONTROLFILE if you do not have a binary backup of the controlfile.
    Optionally, you can also use CREATE CONTROLFILE to rename all the datafiles by specifying the new locations of the datafiles -- the datafiles must already be present in the new locations, else the CREATE fails if it doesn't find a datafile that is included in the list of datafiles included in the CREATE statement.
    RMAN is the correct way to run Backups. User Managed Backup scripts are used in cases like Storage-based Snapshots / SnapClones / BCV.
    Hemant K ChitaleThanks that was really helpful..One last question when to use the resetlogs/noresetlogs clause in the create controlfile statement. I have noticed that at times it accepts resetlog while at times it accepts noresetlogs

Maybe you are looking for