Missing logfiles when hot backup is taken using RMAN

Hello All,
I am having the below situation .Please help to clarify.
I have taken hot backup using RMAN. Database is in Archivelog mode. It doesn't take backup of online redo logs. The status of my redo logs are as below. All are not archived.
/u01/app/oracle/oradata/redo01.log ----Active---Not Archived
/u01/app/oracle/oradata/redo03.log ----Active---Not Archived
/u01/app/oracle/oradata/redo03.log----Current---Not Archived
Now, I am using the backup to restore a database on another machine. But as the logs are not archived, I may miss some data.
How can I get the data also?
Regards
VJ..

I have taken hot backup using RMAN. Database is in Archivelog mode. It doesn't take backup of online redo logs. The status of my redo logs are as below. All are not archived.
/u01/app/oracle/oradata/redo01.log ----Active---Not Archived
/u01/app/oracle/oradata/redo03.log ----Active---Not Archived
/u01/app/oracle/oradata/redo03.log----Current---Not Archived
Now, I am using the backup to restore a database on another machine. But as the logs are not archived, I may miss some data.
How can I get the data also?If the redo log status is still "ACTIVE" that mean, still archiving is in progress,
You can give even
SQL> alter system checkpoint;and do you have any idea at what point you want to recover your database? Even though they are in ACTIVE stauts, when you are taking backup. Still you can apply them how much you want. There will be no lost data. But ensure you haven't opened[resetologs] database.

Similar Messages

  • ORA-01291:missing logfile when FlashingBack a Primary DB in logical standby

    OS: Solaris 10 and Windows vista
    Oracle version : 10.2.0.4.0 Enterprise Edition and 10.2.0.3.0 Enterprise Edition
    We are getting ORA-01291: missing logfile when FlashingBack a failed Primary DB into logical standby
    We are following Below procedure for failover and flashback in logical standby.
    Primary and standby database name is as below.
    primary db_name primdb
    standby db_name logicdb
    failover
    From primdb:
    shut abort
    From logicdb:
    select applied_scn,newest_scn from dba_logstdby_progress;
    alter database stop logical standby apply;
    alter database activate logical standby database;
    Flashing Back a Failed Primary Database into a Logical Standby Database
    We are following instructions from below link.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/scenarios.htm#i1050060
    SYS@logicdb> SELECT APPLIED_SCN AS FLASHBACK_SCN FROM V$LOGSTDBY_PROGRESS;
    FLASHBACK_SCN
    302330
    1 row selected.
    SYS@logicdb> SELECT file_NAME FROM DBA_LOGSTDBY_LOG WHERE NEXT_CHANGE# > (SELECT VALUE FROM DBA_LOGSTDBY_PARAMETERS
              WHERE NAME = 'STANDBY_BECAME_PRIMARY_SCN') AND FIRST_CHANGE#<=302330;
    FILE_NAME
    /logs/app/oracle/flash_recovery_area/LOGICDB/archivelog2/logicdb_1_12_729695607.arc
    Note: We have copied above mentioned file to primary archive destination i.e. /logs/app/oracle/flash_recovery_area/PRIMDB/archivelog.
    SYS@primdb> startup mount
    ORACLE instance started.
    Total System Global Area 1073741824 bytes
    Fixed Size 2046056 bytes
    Variable Size 264243096 bytes
    Database Buffers 801112064 bytes
    Redo Buffers 6340608 bytes
    Database mounted.
    SYS@primdb> FLASHBACK DATABASE TO SCN 302330;
    Flashback complete.
    SYS@primdb> ALTER DATABASE OPEN RESETLOGS;
    Database altered.
    SYS@primdb> ALTER DATABASE START LOGICAL STANDBY APPLY NEW PRIMARY logicdb;
    Database altered.
    SYS@primdb> select type,high_scn,status from v$logstdby;
    TYPE HIGH_SCN
    STATUS
    COORDINATOR
    ORA-01291: missing logfile
    Primary database init.ora parameters are as below
    *.db_file_name_convert=('/export/oracle/oradata/primdb/','/export/oracle/oradata/logicdb/')
    *.db_name='primdb'
    *.instance_name=primdb
    *.db_unique_name=primdb
    *.service_names=primdb
    *.db_recovery_file_dest='/logs/app/oracle/flash_recovery_area'
    *.fal_client='LOGICDB'
    *.fal_server='PRIMDB'
    *.log_archive_dest_1='LOCATION=/logs/app/oracle/flash_recovery_area/PRIMDB/archivelog/ VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=primdb'
    *.log_archive_dest_2='SERVICE=logicdb LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=logicdb'
    *.log_archive_dest_3='LOCATION=/logs/app/oracle/flash_recovery_area/PRIMDB/archivelog2/ VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLES) DB_UNIQUE_NAME=primdb'
    *.log_archive_dest_state_1='ENABLE'
    *.log_archive_dest_state_2='ENABLE'
    *.log_archive_dest_state_3='DEFER'
    *.log_archive_format='primdb_%t_%s_%r.arc'
    *.log_archive_max_processes=4
    *.log_file_name_convert=('/export/oracle/oradata/primdb/','/export/oracle/oradata/logicdb/')
    *.standby_file_management='AUTO'
    *.log_archive_config='dg_config=(primdb,logicdb)'
    Standby database init.ora parameters are as below
    *.db_file_name_convert=('/export/oracle/oradata/primdb/','/export/oracle/oradata/logicdb/')
    *.db_name='logicdb'
    *.instance_name=logicdb
    *.db_unique_name=logicdb
    *.service_names=logicdb
    *.db_recovery_file_dest='/logs/app/oracle/flash_recovery_area'
    *.fal_client='LOGICDB'
    *.fal_server='PRIMDB'
    *.log_archive_dest_1='LOCATION=/logs/app/oracle/flash_recovery_area/LOGICDB/archivelog/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=logicdb'
    *.log_archive_dest_2='SERVICE=primdb LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=primdb'
    *.log_archive_dest_3='LOCATION=/logs/app/oracle/flash_recovery_area/LOGICDB/archivelog2/ VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLES) DB_UNIQUE_NAME=logicdb'
    *.log_archive_dest_state_1='ENABLE'
    *.log_archive_dest_state_2='DEFER'
    *.log_archive_dest_state_2='ENABLE'
    *.log_archive_format='logicdb_%t_%s_%r.arc'
    *.log_archive_max_processes=4
    *.log_file_name_convert=('/export/oracle/oradata/primdb/','/export/oracle/oradata/logicdb/')
    *.log_archive_config='dg_config=(primdb,logicdb)'

    Hi ,
    The error shows it is waiting for the Logfile. The Integrated extract mainly needs of the availability of two things.
    1. Archivelogs.
    2. Trail Files.
    Both should be retained to the needed / required level.
    Please execute the below query and check the status of the Extract / Capture process.
    The below query displays the information of each capture process in a database.,
    COLUMN CAPTURE_NAME HEADING 'Capture|Name' FORMAT A7
    COLUMN PROCESS_NAME HEADING 'Capture|Process|Number' FORMAT A7
    COLUMN SID HEADING 'Session|ID' FORMAT 9999
    COLUMN SERIAL# HEADING 'Session|Serial|Number' FORMAT 9999
    COLUMN STATE HEADING 'State' FORMAT A20
    COLUMN TOTAL_MESSAGES_CAPTURED HEADING 'Redo|Entries|Evaluated|In Detail' FORMAT 9999999
    COLUMN TOTAL_MESSAGES_ENQUEUED HEADING 'Total|LCRs|Enqueued' FORMAT 9999999999
    SELECT c.CAPTURE_NAME,
           SUBSTR(s.PROGRAM,INSTR(s.PROGRAM,'(')+1,4) PROCESS_NAME,
           c.SID,
           c.SERIAL#,
           c.STATE,
           c.TOTAL_MESSAGES_CAPTURED,
           c.TOTAL_MESSAGES_ENQUEUED
      FROM V$STREAMS_CAPTURE c, V$SESSION s
      WHERE c.SID = s.SID AND
            c.SERIAL# = s.SERIAL#;
    Also run this query to check, if the capture is waiting for which logfile.,
    COLUMN CONSUMER_NAME HEADING 'Capture|Process|Name' FORMAT A15
    COLUMN SOURCE_DATABASE HEADING 'Source|Database' FORMAT A10
    COLUMN SEQUENCE# HEADING 'Sequence|Number' FORMAT 99999
    COLUMN NAME HEADING 'Required|Archived Redo Log|File Name' FORMAT A40
    SELECT r.CONSUMER_NAME,
           r.SOURCE_DATABASE,
           r.SEQUENCE#,
           r.NAME
      FROM DBA_REGISTERED_ARCHIVED_LOG r, DBA_CAPTURE c
      WHERE r.CONSUMER_NAME =  c.CAPTURE_NAME AND
            r.NEXT_SCN      >= c.REQUIRED_CHECKPOINT_SCN;
    The above query clearly shows for which logfile the Extract / Capture process is waiting. Check if that logfile is available in your system.
    Regards,
    Veera

  • BACKUP AND RECOVERY USING RMAN

    제품 : ORACLE SERVER
    작성날짜 : 2003-08-04
    BACKUP AND RECOVERY USING RMAN
    ==============================
    1. Backup Method
    1.1 backing up in noarchivelog mode
    SVRMGR> shutdown;
    SVRMGR> startup mount
    rman을 가동시킨 후 다음을 수행
    run {
    # backup the database to disk
    allocate channel dev1 type disk;
    backup (database format '/oracle/backups/bp_%s_%p'); }
    1.2 Backing up databases and tablespaces in archivelog mode >
    - database 단위 backup script
    run {
    allocate channel dev1 type 'sbt_tape';
    backup skip offline (database format '/oracle/backups/%d_%u');
    release channel dev1;
    - tablespace 단위 backup script
    run {
    allocate channel dev1 type disk;
    backup
    (tablespace system,tbs_1,tbs_2,tbs_3,tbs_4,tbs_5
    format '/oracle/backups/bp_%s_%p');
    - datafile 단위 backup script
    run { 
    allocate channel dev1 type disk;
    backup
    (datafile '?/dbs/t_dbs1.f'
    format '/oracle/backups/%d_%u');
    - control file backup script
    control file은 system datafile의 첫번째 화일을 백업받을 때 백업되며 다음과
    같은 방법으로도 백업받을 수 있다.
    run {
    allocate channel dev1 type 'sbt_tape';
    backup
    (tablespace tbs_5 include current controlfile
    format '%d_%u');
    - archived logs backup script
    NLS_LANG=american
    NLS_DATE_FORMAT='Mon DD YYYY HH24:MI:SS'
    run {
    allocate channel dev1 type 'sbt_tape';
    backup
    (archivelog from time 'Nov 13 1996 20:57:13'
    until time 'Nov 13 1996 21:06:05'
    all
    format '%d_%u');
    run {
    allocate channel dev1 type 'sbt_tape';
    backup
    (archivelog low logseq 288 high logseq 301 thread 1
    all delete input
    format '%d_%u');
    - copying datafiles
    run {
    allocate channel dev1 type disk;
    copy datafile '?/dbs/tbs_01.f/dbs/tbs_01.f' to '?/copy/temp3.f';
    - incremental backups
    새로운 데이타화일이 추가되거나 테이블스페이스가 추가된다면 level 0의 backup을
    반드시 수행한다.
    run {
    allocate channel dev1 type 'sbt_tape';
    backup incremental level 0
    (database
    format '%d_%u');
    run {
    allocate channel dev1 type 'sbt_tape';
    backup incremental level 1
    (database
    format '&d_%u');
    2. Recovery Method
    - tablespace recovery
    run { 
    allocate channel dev1 type disk;
    allocate channel dev2 type 'sbt_tape';
    sql "alter tablespace tbs_1 offline immediate" ;
    set newname for datafile 'disk7/oracle/tbs11.f'
    to 'disk9/oracle/tbs11.f' ;
    restore (tablespace tbs_1) ;
    switch datafile all ;
    recover tablespace tbs_1 ;
    sql "alter tablespace tbs_1 online" ;
    release channel dev1;
    release channel dev2;
    - point-in-time recovery
    TBS_1 테이블스페이스는 두 개의 데이타 화일 소유. TEMP1은 백업이 없으나 user
    data는 없는 temporary segemnt만 가지고 있음.
    NLS_LANG=american
    NLS_DATE_FORMAT='Mon DD YYYY HH24:MI:SS'
    SVRMGR> shutdown abort;
    SVRMGR> startup nomount;
    run { 
    # recover database until 3pm after restoring tbs_1 to a new location
    allocate channel dev1 type disk;
    allocate channel dev2 type 'sbt_tape';
    set until time 'Nov 15 1996 15:00:00'
    set newname for datafile '/vobs/oracle/dbs/tbs_11.f'
    to '?/dbs/temp1.f' ;
    set newname for datafile '?/dbs/tbs_12.f'
    to '?/dbs/temp2.f' ;
    restore controlfile to '/vobs/oracle/dbs/cf1.f' ;
    replicate controlfile from '/vobs/oracle/dbs/cf1.f';
    sql "alter database mount" ;
    restore database skip tablespace temp1;
    switch datafile all;
    recover database skip tablespace temp1;
    sql "alter database open resetlogs";
    sql "drop tablespace temp1";
    sql "create tablespace temp1 datafile '/vobs/oracle/dbs/temp1.f' size 10M";
    release channel dev1;
    release channel dev2;
    - 전체 데이타베이스를 복구하려 할때
    current redologfile이 존재할때 다음과 같은 작업으로 전체 데이타베이스를 복구할
    수 있다.
    replace script restore_recover_db_cf {
    execute script restore_cf;
    sql 'alter database mount';
    execute script restore_db;
    execute script recover_db;
    sql 'alter database open resetlogs';
    replace script alloc_1_disk {
    allocate channel d1 type disk;
    setlimit channel d1 kbytes 2097150 maxopenfiles 32 readrate 200;
    replace script rel_1_disk {
    release channel d1;
    replace script restore_cf {
    execute script alloc_1_disk;
    restore
    controlfile to '/private/db_files/twih/dbf/ctrl_twih_1.ctl';
    replicate
    controlfile from '/private/db_files/twih/dbf/ctrl_twih_1.ctl';
    execute script rel_1_disk;
    replace script restore_db {
    execute script alloc_1_disk;
    restore
    (database);
    execute script rel_1_disk;
    replace script recover_db {
    execute script alloc_1_disk;
    recover
    database;
    execute script rel_1_disk;
    Reference Documents
    <Note:104796.1>

    Hi Alok,
    why there is a need for standby here? you mean to say standby db?
    what i exactly need is , whether i will be making use of archivelogs which are all archived during that backup period (in mount stage) after some days, if i face any problem with the PRODUCTION Database..

  • Backup from 9i and restore this backup to 10g using RMAN

    Hi all;
    I have a database 9i on SuSE9. And I want to restore another server this database's backupsets to 10g on SuSE10 using RMAN. Then I have run following scripts.
    On 9i Database: (SID=discoden)_
    RMAN > backup database plus archivelog;
    and I have three backupsets (05l87nik_1_1, 06l87nio_1_1, 07l87nml_1_1) and one controlfile backup (c-4279316798-20100310-00). then I copy these backuppieces to new server.
    On 10g Database:_
    +1. I have created udump and bdump folder into $ORACLE_BASE/admin/discoden/+
    +2. I have copied init.ora, pasted initdiscoden.ora in $ORACLE_HOME/dbs folder. And I have changed following parameters+
    db_name = discoden
    shared_pool_size = 350000000
    control_files = (/disk2/oracle/discoden/control01.ctl, /disk2/oracle/discoden/control02.ctl, /disk2/oracle/discoden/control03.ctl)
    user_dump_dest = /opt/oracle/admin/discoden/udump
    background_dump_dest = /opt/oracle/admin/discoden/bdump
    compatible = 10.2.0.3.0
    undo_management = auto
    +3. export ORACLE_SID=discoden+
    +4. cd $ORACLE_HOME/bin+
    +5. ./rman target /+
    +6. RMAN> startup nomount;+
    +7. RMAN> restore controlfile from '/disk2/setup/c-4279316798-20100310-00';+
    +8. RMAN> alter database mount ;+
    +9. RMAN> catalog backuppiece '/disk2/setup/05l87nik_1_1';+
    RMAN> catalog backuppiece '/disk2/setup/06l87nio_1_1';
    RMAN> catalog backuppiece '/disk2/setup/07l87nml_1_1';
    +10. SQL> alter database rename file '/disk2/oracle9i/databases/discoden/redo01.log' to '/disk2/oracle/discoden/redo01.log';+
    SQL> alter database rename file '/disk2/oracle9i/databases/discoden/redo02.log' to '/disk2/oracle/discoden/redo02.log';
    SQL> alter database rename file '/disk2/oracle9i/databases/discoden/redo03.log' to '/disk2/oracle/discoden/redo03.log';
    +11. RMAN > list backup; (With this command, I have learned last sequence number. For example 204)+
    +12. I have run following command on RMAN:+
    +run {+
    set until sequence 204;
    set newname for datafile 1 to '/disk2/oracle/discoden/system01.dbf';
    set newname for datafile 2 to '/disk2/oracle/discoden/undotbs01.dbf';
    set newname for datafile 3 to '/disk2/oracle/discoden/cwmlite01.dbf';
    set newname for datafile 4 to '/disk2/oracle/discoden/drsys01.dbf';
    set newname for datafile 5 to '/disk2/oracle/discoden/example01.dbf';
    set newname for datafile 6 to '/disk2/oracle/discoden/indx01.dbf';
    set newname for datafile 7 to '/disk2/oracle/discoden/odm01.dbf';
    set newname for datafile 8 to '/disk2/oracle/discoden/tools01.dbf';
    set newname for datafile 9 to '/disk2/oracle/discoden/users01.dbf';
    set newname for datafile 10 to '/disk2/oracle/discoden/xdb01.dbf';
    set newname for datafile 11 to '/disk2/oracle/discoden/DATASPACE1.dbf';
    set newname for datafile 12 to '/disk2/oracle/discoden/CARDEM.dbf';
    set newname for datafile 13 to '/disk2/oracle/discoden/MUHASEBE.dbf';
    set newname for datafile 14 to '/disk2/oracle/discoden/ORTAK.dbf';
    set newname for datafile 15 to '/disk2/oracle/discoden/MAGAZA.dbf';
    restore database;
    switch datafile all;
    recover database;
    alter database open resetlogs;
    +}+
    Then I have an error like following lines:
    +..........+
    media recovery complete, elapsed time: 00:00:04
    Finished recover at 06-MAR-10
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00601: fatal error in recovery manager
    RMAN-03004: fatal error during execution of command
    ORA-03114: not connected to ORACLE
    ORA-03114: not connected to ORACLE
    RMAN-03002: failure of alter db command at 03/06/2010 09:00:47
    ORA-01092: ORACLE instance terminated. Disconnection forced
    ORA-00704: bootstrap process failure
    ORA-39700: database must be opened with UPGRADE option
    ORACLE error from target database:
    ORA-03114: not connected to ORACLE
    I don't understand the mistakes. I hope your helps. Thank you.

    Hi,
    You have followed the steps correctly while restoring and recovering the 9i database under 10g home using RMAN except the last step of opening the database.
    Remove 'alter database open resetlogs;' from the rman script and rerun the script. Once the database is restored and recovered, open the database with RESETLOGS & UPGRADE option through SQL*Plus as below.
    SQL> alter database open resetlogs upgrade;
    Once the database is opened, create the SYSAUX tablespace and run $ORACLE_HOME/rdbms/admin/ upgrd.sql catupgrd.sql script to upgrade the database to 10g ( follow the steps for upgrading the database).
    MetaLink Note : 369644.1 - Answers To FAQ For Restoring Or Duplicating Between Different Versions And Platforms
    Regards,
    Vaibhav
    Edited by: Vaibhav on Mar 11, 2010 11:09 AM

  • When to delete archive logs- using rman 10.1.0.5

    Hello,
    I am using rman to backup my database(10.1.0.5) along with backing up the archivelogs delete input. The retention of the backup is set to 1. I am backing the datafiles and archivelogs to disk /backupdata. I noticed that the /backupdata is filling up with a lot of backup archivelogs. Since the retention of the database is set to 1, does that mean that rman will also clean the archivelogs in /backupdata too? What I am asking is, since the retention is set to 1, does rman automatically determine witch archivelogs in the /backupdata to delete if rman determines that the archivelogs is not needed to satisfied the retention 1 condition??? Thank you in advance.

    rman won't automatically purge your backups. Retention policy can be defined to be 1 (what?) redundancy copies or recovery window?
    You may have defined, let's say 1 redundant copy, which means you must have at least one backup to consider the other obsolete, and you will keep one redundant copy. The other backups are not automatically deleted, they are just marked obsolete, and you can delete them.
    I suggest you to manually purge your backups, as they will fill up your storage. issue, from a recovery manager session:
    rman> report obsolete;
    rman > delete noprompt obsolete;
    rman> report obsolete;
    The delete noprompt obsolete will physically purge all backups reported as obsolete by the first command. You can confirm actions from the last command.
    I suggest you to perform a periodic task to purge obsolete backups, schedule last command, it can be done once your regular backup ends.
    If you have Enterprise manager DB Control console enabled, it can be scheduled using the internal scheduler, and it can be monitored from within EM.
    ~ Madrid.

  • Can i backup dedicated server using rman?

    when i try to issure 'register database' under rmank, it report and error:
    RMAN-10035: exception raised in RPC: ORA-19550: cannot use backup/restore functi
    ons while using dispatcher
    RMAN-10031: ORA-19550 occurred during call to DBMS_BACKUP_RESTORE.CFILEUSECURREN
    i configure my oracle using MTS(multi-thread server) mode. When i change it to Dedicated Server mode, it works without error.
    does that rman can only work with dedicated server? How about MTS?
    thanks.

    Here is a section in the RMAN docs that explain MTS and RMAN.
    http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a96566/rcmconfg.htm#450732
    Thanks, Tammy

  • Using RMAN, how do you restore from an old backup file?

    HI,
    I use Oracle 9i on Solaris.
    I'm currently doing incremental level 0 hot backups every night using RMAN in NOCATALOG mode. The controlfile is backed up with the database. I back it up to a file (e.g. "level0_20041225.dmp"). After I back it up, it's backed up to tape using Veritas. Before doing a backup, I delete the old one first.
    I need to restore a copy of the database backup that was taken a month ago. This file is on tape. How do I go about it using RMAN? The documentation is not too clear as it talks more about Restoring the control file and the latest copy of the database.
    How do you restore an old copy of the database from a database file?
    Pls advise
    Thanks

    You can recover to the last committed transaction,
    provided you have the current controlfile, archived
    logs since the backup and the current online logs.
    Here's the procedure in a nutshell:
    a) Restore datafiles from tape.
    b) Recover database using restored files + current
    controlfiles and archived/online logs. RMAN will prompt
    you for the logs it needs for recovery.
    You can also perform this type of recovery using a
    backup controlfile. In this case you would still need
    all logs as above. After recovery, you would have to
    open the database with RESETLOGS because you are using
    a backup controlfile.
    If you don't want/need to recover up to the last
    committed transaction, you use a backup controlfile and
    perform incomplete recovery (time or change based). This
    simply means that you stop the application of redo at
    the time or SCN of your choice.
    Most of the scenarios of interest are documented in
    the following book:
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96566/toc.htm
    Hope this helps.
    Kailash.

  • R12 hot backup

    Hello,
    1) I want to activate archiving on R12.1.2.how can i do this on single or multinode.please tell how can i restore backup after archiving.what is precautions after activating archive or RMAN.
    2) If i have taken completed cold backup of apps and db.after some day i want to take backup.there is necessary to take backup both(apps,db,inst) if i take only db backup..is this possible to restore the backup next time.
    Regards,

    Hi;
    For hot backup u should use rman utulity,check backup
    7 RMAN Backup Concepts
    http://download.oracle.com/docs/cd/B28359_01/backup.111/b28270/rcmcncpt.htm
    For other question check below
    Backup and recovery startegy for EBS
    Re: Backup System
    backup polincy-ebs
    Backup Policy for EBS can
    Regard
    Helios

  • Hot backup : Rman vs. ALTER TABLESPACE...BEGIN BACKUP

    Dear Experts,
    I'm currently using the following statements
    - ALTER TABLESPACE (...) BEGIN BACKUP
    - host ocopy (...)
    - ALTER TABLESPACE (...)END BACKUP state
    I'm going for rman now but I've got 2 questions for those who did that in the past:
    1/ Will rman reduce the size of my hotbackup ?
    2/ Does the hot backup run faster using rman ?
    Thanks.
    Best Regards,
    Jerome

    1/ Will rman reduce the size of my hotbackup ? rman backup only those blocks which get accessed by oracle, means it doesn't copy the empty blocks as a part of backup as your OS copy command does. So yeah, the size of the backup will be smaller if there are huge datafiles but with comparably less data. Moreover if you are on 10g then you can use compressed backupset feature which will compress the backupsets.
    2/ Does the hot backup run faster using rman ?
    By using rman, there is no need to put every tablespace in backup mode, you can run the backup in parallel by allocating multiple channels, on 10g you can use block change tracking feature to speed up your incremental backups AND as explained in point 1 there is no need to copy the whole datafile. These all are the benefits of RMAN and I can't make a state statement that by all this the backup will run faster but will definitely go for it.
    Daljit Singh

  • Using RMAN for creating a Dataguard Standby db.

    Hello,
    I have two 11.2.0.1.0 oracle instances running on two cloned Red Hat Enterprise Linux (rhel98 and rhel99). Linux version:
    Linux rhel99 2.6.32-100.34.1.el6uek.x86_64 #1 SMP Wed May 25 17:46:45 EDT 2011 x86_64 x86_64 x86_64 GNU/LinuxI am trying to perform a "duplicate target database for standby" as part of the list of steps to get a Physical Standby located at the rhel99 server with DB_UNIQUE_NAME ORCL99. But I am missing something because it keeps failing with this error:
    RMAN-05556: not all datafiles have backups that can be recovered to SCN 2818790
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 5 found to restore
    RMAN-06023: no backup or copy of datafile 1 found to restoreI double checked the directory structure on primary (rhel98) and standby (rhel99), and it's the same. As control file is restored during the duplicate process I cannot perform the catalog start with, so the backups were placed on the same locations at rhel98 and 99.
    According to that error message it is not finding any of the datafile backups.
    [oracle@rhel98 ~]$ rman target /
    Recovery Manager: Release 11.2.0.1.0 - Production on Wed May 29 01:36:06 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    connected to target database: ORCL98 (DBID=2386038834)
    RMAN> connect auxiliary sys/*****@ORCL99
    connected to auxiliary database: ORCL98 (not mounted)
    RMAN> run
    2> {    
    3> set until sequence=6 thread=1;
    4> duplicate target database for standby
    5> dorecover;                          
    6> }                                   
    executing command: SET until clause
    Starting Duplicate Db at 29-MAY-13
    using target database control file instead of recovery catalog
    allocated channel: ORA_AUX_DISK_1                            
    channel ORA_AUX_DISK_1: SID=20 device type=DISK              
    contents of Memory Script:
       set until scn  2818790;
       restore clone standby controlfile;
    executing Memory Script             
    executing command: SET until clause
    Starting restore at 29-MAY-13
    using channel ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: starting datafile backup set restore
    channel ORA_AUX_DISK_1: restoring control file             
    channel ORA_AUX_DISK_1: reading from backup piece /oracle/app/oracle/rman_bkp/orcl/0aoa2pd2_1_1
    channel ORA_AUX_DISK_1: piece handle=/oracle/app/oracle/rman_bkp/orcl/0aoa2pd2_1_1 tag=TAG20130520T022122
    channel ORA_AUX_DISK_1: restored backup piece 1                                                         
    channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03                                        
    output file name=/oracle/app/oracle/oradata/standby/control01.ctl                                       
    Finished restore at 29-MAY-13                                                                           
    contents of Memory Script:
       sql clone 'alter database mount standby database';
    executing Memory Script                             
    sql statement: alter database mount standby database
    contents of Memory Script:
       set until scn  2818790;
       set newname for tempfile  1 to
    "/oracle/app/oracle/oradata/standby/temp01.dbf";
       switch clone tempfile all;                   
       set newname for datafile  1 to               
    "/oracle/app/oracle/oradata/standby/system01.dbf";
       set newname for datafile  2 to                 
    "/oracle/app/oracle/oradata/standby/sysaux01.dbf";
       set newname for datafile  3 to                 
    "/oracle/app/oracle/oradata/standby/undotbs01.dbf";
       set newname for datafile  4 to                  
    "/oracle/app/oracle/oradata/standby/users01.dbf"; 
       set newname for datafile  5 to                  
    "/oracle/app/oracle/oradata/standby/example01.dbf";
       set newname for datafile  6 to                  
    "/oracle/app/oracle/oradata/standby/ws_app_data01.dbf";
       set newname for datafile  7 to                      
    "/oracle/app/oracle/oradata/standby/ws_app_idx01.dbf";
       restore                                             
       clone database                                      
    executing Memory Script                                
    executing command: SET until clause
    executing command: SET NEWNAME
    renamed tempfile 1 to /oracle/app/oracle/oradata/standby/temp01.dbf in control file
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    Starting restore at 29-MAY-13
    using channel ORA_AUX_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 05/29/2013 01:40:33
    RMAN-05556: not all datafiles have backups that can be recovered to SCN 2818790
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 5 found to restore
    RMAN-06023: no backup or copy of datafile 4 found to restore
    RMAN-06023: no backup or copy of datafile 3 found to restore
    RMAN-06023: no backup or copy of datafile 2 found to restore
    RMAN-06023: no backup or copy of datafile 1 found to restore
    RMAN>And the backup pieces are located at (where oracle has rw privs and also owns the dirs):
    [oracle@rhel98 orcl]$ ls -ldhtr /oracle/app/oracle/rman_bkp/orcl/
    drwxr-xr-x. 2 oracle oinstall 4.0K May 29 01:16 /oracle/app/oracle/rman_bkp/orcl/
    [oracle@rhel99 orcl]$ ls -ldhtr /oracle/app/oracle/rman_bkp/orcl/
    drwxr-xr-x. 2 oracle oinstall 4.0K May 29 01:57 /oracle/app/oracle/rman_bkp/orcl/Backup was taken using RMAN, by executing a "backup database plus archivelogs" and it was completed with no errors. As you can see backup were taken yesterday and are available.
    [oracle@rhel98 ~]$ rman target /
    Recovery Manager: Release 11.2.0.1.0 - Production on Wed May 29 03:20:54 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    connected to target database: ORCL98 (DBID=2386038834)
    RMAN> list backup summary;
    using target database control file instead of recovery catalog
    List of Backups
    ===============
    Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
    2       B  F  A DISK        20-MAY-13       1       1       NO         TAG20130520T022122
    3       B  F  A DISK        21-MAY-13       1       1       NO         TAG20130521T025112
    4       B  A  A DISK        29-MAY-13       1       1       NO         TAG20130529T010612
    5       B  F  A DISK        29-MAY-13       1       1       NO         TAG20130529T010902
    6       B  F  A DISK        29-MAY-13       1       1       NO         TAG20130529T010902
    7       B  A  A DISK        29-MAY-13       1       1       NO         TAG20130529T011634
    RMAN> list backup completed after '29-MAY-13';
    List of Backup Sets
    ===================
    BS Key  Size       Device Type Elapsed Time Completion Time
    4       669.15M    DISK        00:02:37     29-MAY-13     
            BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: TAG20130529T010612
            Piece Name: /oracle/app/oracle/rman_bkp/orcl/ORCL98_DB_0coaqcc4_12_1 
      List of Archived Logs in backup set 4
      Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
      1    1       2785395    19-MAY-13 2800632    19-MAY-13
      1    2       2800632    19-MAY-13 2814507    20-MAY-13
      1    3       2814507    20-MAY-13 2817219    20-MAY-13
      1    4       2817219    20-MAY-13 2817222    20-MAY-13
      1    5       2817222    20-MAY-13 2818790    20-MAY-13
      1    6       2818790    20-MAY-13 2818794    20-MAY-13
      1    7       2818794    20-MAY-13 2853065    20-MAY-13
      1    8       2853065    20-MAY-13 2885773    25-MAY-13
      1    9       2885773    25-MAY-13 2903820    25-MAY-13
      1    10      2903820    25-MAY-13 2925244    25-MAY-13
      1    11      2925244    25-MAY-13 2934284    25-MAY-13
      1    12      2934284    25-MAY-13 2935793    25-MAY-13
      1    13      2935793    25-MAY-13 2937653    25-MAY-13
      1    14      2937653    25-MAY-13 2939617    25-MAY-13
      1    15      2939617    25-MAY-13 2960715    25-MAY-13
      1    16      2960715    25-MAY-13 2975590    26-MAY-13
      1    17      2975590    26-MAY-13 3013551    27-MAY-13
      1    18      3013551    27-MAY-13 3029786    28-MAY-13
      1    19      3029786    28-MAY-13 3050776    28-MAY-13
      1    20      3050776    28-MAY-13 3088118    28-MAY-13
      1    21      3088118    28-MAY-13 3099950    29-MAY-13
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    5       Full    1.09G      DISK        00:06:53     29-MAY-13     
            BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: TAG20130529T010902
            Piece Name: /oracle/app/oracle/rman_bkp/orcl/ORCL98_DB_0doaqche_13_1 
      List of Datafiles in backup set 5                                          
      File LV Type Ckp SCN    Ckp Time  Name                                     
      1       Full 3100062    29-MAY-13 /oracle/app/oracle/oradata/orcl/system01.dbf
      2       Full 3100062    29-MAY-13 /oracle/app/oracle/oradata/orcl/sysaux01.dbf
      3       Full 3100062    29-MAY-13 /oracle/app/oracle/oradata/orcl/undotbs01.dbf
      4       Full 3100062    29-MAY-13 /oracle/app/oracle/oradata/orcl/users01.dbf 
      5       Full 3100062    29-MAY-13 /oracle/app/oracle/oradata/orcl/example01.dbf
      6       Full 3100062    29-MAY-13 /oracle/app/oracle/oradata/orcl/ws_app_data01.dbf
      7       Full 3100062    29-MAY-13 /oracle/app/oracle/oradata/orcl/ws_app_idx01.dbf
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    6       Full    9.36M      DISK        00:00:09     29-MAY-13
            BP Key: 6   Status: AVAILABLE  Compressed: NO  Tag: TAG20130529T010902
            Piece Name: /oracle/app/oracle/rman_bkp/orcl/ORCL98_DB_0eoaqcue_14_1
      SPFILE Included: Modification time: 29-MAY-13
      SPFILE db_unique_name: ORCL98
      Control File Included: Ckp SCN: 3101140      Ckp time: 29-MAY-13
    BS Key  Size       Device Type Elapsed Time Completion Time
    7       23.06M     DISK        00:00:11     29-MAY-13
            BP Key: 7   Status: AVAILABLE  Compressed: NO  Tag: TAG20130529T011634
            Piece Name: /oracle/app/oracle/rman_bkp/orcl/ORCL98_DB_0foaqcvi_15_1
      List of Archived Logs in backup set 7
      Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
      1    22      3099950    29-MAY-13 3101157    29-MAY-13
    RMAN>db_recovery_file_dest is the same for both ORCL98 and ORCL99:
    *.db_recovery_file_dest='/oracle/app/oracle/flash_recovery_area'
    *.db_recovery_file_dest_size=4070572032If needed I can upload the complete initORCL98.ora and initORCL99.ora files.
    Any suggestion/comments?
    Thanks in advance.
    Edited by: martin.morono on May 29, 2013 8:56 PM

    Thanks Hemant but the issue is the same with sequence 6 or 22. I posted the RMAN log from an old duplicate I ran yesterday using sequence 6, but as you can see below the error is not changing with setting "until sequence 22"
    Hemant K Chitale wrote:
    Your database datafile backups are as of Checkpoint SCN 3100062 which is higher than the archivelogs (and certainly higher than SEQ#6).
    Possibly SEQUENCE#22 will cover the database checkpoint SCN. Therefore, the minimum UNTIL SEQUENCE would be 23 or higher.
    Hemant K Chitale
    [oracle@rhel98 ~]$ rman target /
    Recovery Manager: Release 11.2.0.1.0 - Production on Wed May 29 02:37:51 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    connected to target database: ORCL98 (DBID=2386038834)
    RMAN> connect auxiliary sys/manager@ORCL99
    connected to auxiliary database: ORCL98 (not mounted)
    RMAN> run
    2> {    
    3> set until sequence=22 thread=1;
    4> duplicate target database for standby
    5> backup location '/oracle/app/oracle/rman_bkp/orcl/'
    6> dorecover;                                        
    7> }                                                 
    executing command: SET until clause
    Starting Duplicate Db at 29-MAY-13
    using target database control file instead of recovery catalog
    allocated channel: ORA_AUX_DISK_1                            
    channel ORA_AUX_DISK_1: SID=20 device type=DISK              
    contents of Memory Script:
       set until scn  3099950;
       restore clone standby controlfile;
    executing Memory Script             
    executing command: SET until clause
    Starting restore at 29-MAY-13
    using channel ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: restoring control file
    channel ORA_AUX_DISK_1: copied control file copy
    input file name=/oracle/app/oracle/oradata/orcl/control_standby01.ctl
    output file name=/oracle/app/oracle/oradata/standby/control01.ctl   
    Finished restore at 29-MAY-13                                       
    contents of Memory Script:
       sql clone 'alter database mount standby database';
    executing Memory Script                             
    sql statement: alter database mount standby database
    contents of Memory Script:
       set until scn  3099950;
       set newname for tempfile  1 to
    "/oracle/app/oracle/oradata/standby/temp01.dbf";
       switch clone tempfile all;                   
       set newname for datafile  1 to               
    "/oracle/app/oracle/oradata/standby/system01.dbf";
       set newname for datafile  2 to                 
    "/oracle/app/oracle/oradata/standby/sysaux01.dbf";
       set newname for datafile  3 to                 
    "/oracle/app/oracle/oradata/standby/undotbs01.dbf";
       set newname for datafile  4 to                  
    "/oracle/app/oracle/oradata/standby/users01.dbf"; 
       set newname for datafile  5 to                  
    "/oracle/app/oracle/oradata/standby/example01.dbf";
       set newname for datafile  6 to                  
    "/oracle/app/oracle/oradata/standby/ws_app_data01.dbf";
       set newname for datafile  7 to                      
    "/oracle/app/oracle/oradata/standby/ws_app_idx01.dbf";
       restore                                             
       clone database                                      
    executing Memory Script                                
    executing command: SET until clause
    executing command: SET NEWNAME
    renamed tempfile 1 to /oracle/app/oracle/oradata/standby/temp01.dbf in control file
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    Starting restore at 29-MAY-13
    using channel ORA_AUX_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 05/29/2013 02:40:00    
    RMAN-05556: not all datafiles have backups that can be recovered to SCN 3099950
    RMAN-03015: error occurred in stored script Memory Script                     
    RMAN-06026: some targets not found - aborting restore                         
    RMAN-06023: no backup or copy of datafile 5 found to restore                  
    RMAN-06023: no backup or copy of datafile 4 found to restore                  
    RMAN-06023: no backup or copy of datafile 3 found to restore                  
    RMAN-06023: no backup or copy of datafile 2 found to restore                  
    RMAN-06023: no backup or copy of datafile 1 found to restore                   just in case, the initORCL.ora files:
    initORCL98.ora
    orcl.__db_cache_size=150994944
    ORCL98.__db_cache_size=209715200
    orcl.__java_pool_size=4194304
    ORCL98.__java_pool_size=4194304
    orcl.__large_pool_size=4194304
    ORCL98.__large_pool_size=4194304
    orcl.__oracle_base='/oracle/app/oracle'#ORACLE_BASE set from environment
    ORCL98.__oracle_base='/oracle/app/oracle','/oracle/app/oracle'#ORACLE_BASE set from environment
    orcl.__pga_aggregate_target=226492416
    ORCL98.__pga_aggregate_target=226492416
    orcl.__sga_target=402653184
    ORCL98.__sga_target=402653184
    orcl.__shared_io_pool_size=0
    ORCL98.__shared_io_pool_size=0
    orcl.__shared_pool_size=234881024
    ORCL98.__shared_pool_size=176160768
    orcl.__streams_pool_size=0
    ORCL98.__streams_pool_size=0
    *.audit_file_dest='/oracle/app/oracle/admin/orcl/adump'
    *.audit_trail='DB'
    *.compatible='11.2.0.0.0'
    *.control_files='/oracle/app/oracle/oradata/orcl/control01.ctl','/oracle/app/oracle/flash_recovery_area/orcl/control02.ctl'
    *.db_block_size=8192
    *.db_domain=''
    *.db_name='ORCL98'
    *.db_recovery_file_dest='/oracle/app/oracle/flash_recovery_area'
    *.db_recovery_file_dest_size=4070572032
    *.diagnostic_dest='/oracle/app/oracle'
    *.dispatchers='(protocol=TCP)'
    *.fal_client='ORCL98'
    *.fal_server='ORCL99'
    *.job_queue_processes=1000
    *.log_archive_config='DG_CONFIG=(ORCL98,ORCL99)'
    *.log_archive_dest_1='location=/oracle/app/oracle/archivelog/orcl/ valid_for=(all_logfiles,all_roles) db_unique_name=ORCL98'
    *.log_archive_dest_2='SERVICE=ORCL99 valid_for=(online_logfiles,primary_role) db_unique_name=ORCL99'
    *.log_archive_dest_state_1='ENABLE'
    *.log_archive_dest_state_2='DEFER'
    *.log_archive_format='orcl_%R_%T_%S_%d.arc'
    *.memory_target=629145600
    *.open_cursors=300
    *.processes=150
    *.remote_login_passwordfile='EXCLUSIVE'
    *.sga_max_size=402653184
    *.shared_servers=1
    *.standby_file_management='AUTO'
    *.undo_tablespace='UNDOTBS1'initORCL99.ora
    orcl.__db_cache_size=150994944
    orcl98.__db_cache_size=163577856
    orcl99.__db_cache_size=243269632
    ORCL99.__db_cache_size=218103808
    orcl.__java_pool_size=4194304
    orcl98.__java_pool_size=4194304
    orcl99.__java_pool_size=4194304
    ORCL99.__java_pool_size=4194304
    orcl.__large_pool_size=4194304
    orcl98.__large_pool_size=4194304
    orcl99.__large_pool_size=4194304
    ORCL99.__large_pool_size=4194304
    orcl.__oracle_base='/oracle/app/oracle'#ORACLE_BASE set from environment
    orcl98.__oracle_base='/oracle/app/oracle'#ORACLE_BASE set from environment
    orcl99.__oracle_base='/oracle/app/oracle'#ORACLE_BASE set from environment
    ORCL99.__oracle_base='/oracle/app/oracle'#ORACLE_BASE set from environment
    orcl.__pga_aggregate_target=226492416
    orcl98.__pga_aggregate_target=226492416
    orcl99.__pga_aggregate_target=251658240
    ORCL99.__pga_aggregate_target=251658240
    orcl.__sga_target=402653184
    orcl98.__sga_target=402653184
    orcl99.__sga_target=377487360
    ORCL99.__sga_target=377487360
    orcl.__shared_io_pool_size=0
    orcl98.__shared_io_pool_size=0
    orcl99.__shared_io_pool_size=0
    ORCL99.__shared_io_pool_size=0
    orcl.__shared_pool_size=234881024
    orcl98.__shared_pool_size=222298112
    orcl99.__shared_pool_size=117440512
    ORCL99.__shared_pool_size=142606336
    orcl.__streams_pool_size=0a
    orcl98.__streams_pool_size=0
    orcl99.__streams_pool_size=0
    ORCL99.__streams_pool_size=0
    *.audit_file_dest='/oracle/app/oracle/admin/orcl/adump'
    *.audit_trail='DB'
    *.compatible='11.2.0.0.0'
    *.control_files='/oracle/app/oracle/oradata/standby/control01.ctl'
    #*.control_files='/oracle/app/oracle/oradata/orcl/control_standby01.ctl'
    *.db_block_size=8192
    *.db_domain=''
    *.db_name='ORCL98'
    *.db_unique_name='ORCL99'
    *.db_recovery_file_dest='/oracle/app/oracle/flash_recovery_area'
    *.db_recovery_file_dest_size=4070572032
    *.diagnostic_dest='/oracle/app/oracle'
    *.dispatchers='(protocol=TCP)'
    *.job_queue_processes=1000
    *.log_archive_dest_1='location=/oracle/app/oracle/archivelog/orcl'
    *.log_archive_format='orcl_%R_%T_%S_%d.arc'
    *.memory_target=629145600
    *.open_cursors=300
    *.processes=150
    *.remote_login_passwordfile='EXCLUSIVE'
    *.sga_max_size=402653184
    *.shared_servers=1
    *.undo_tablespace='UNDOTBS1'
    *.db_file_name_convert=('/oracle/app/oracle/oradata/orcl/','/oracle/app/oracle/oradata/standby/')
    *.log_file_name_convert=('/oracle/app/oracle/oradata/orcl/','/oracle/app/oracle/oradata/standby/')Once again, many thanks for your prompt response.
    Thanks in advance.
    Martin

  • Rman hot backup

    hello
    i am using rman hot backup script to take backup database everyday but the problem is it is working but not deleting old backup older than 2 days .
    also i have question .. my database is in archive log mode and everyday about 6-7 .arch files generating in my archive directory.
    it is not deleting the old files but generating new files everyday so adding up to the space.
    SQL> show parameter archive
    NAME TYPE VALUE
    archive_lag_target integer 0
    log_archive_config string
    log_archive_dest string /u03/archive_logs/DEVL
    log_archive_dest_1 string
    also should i set dest_1 as archive location or just log_archive_dest
    whats is the difference.?
    my rman script is
    RMAN Hot backup.unix script
    The RMAN hot backup script rman_backup.sh:
    # !/bin/bash
    # Declare your environment variables
    export ORACLE_SID=DEVL
    export ORACLE_BASE=/u01/app/oracle
    export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
    export PATH=$PATH:${ORACLE_HOME}/bin
    # Start the rman commands
    rman target=/ << EOF
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u03/backup/autobackup_control_file%F';
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 2 DAYS;
    run {
    allocate channel d1 type disk;
    allocate channel d2 type disk;
    allocate channel d3 type disk;
    allocate channel d4 type disk;
    ALLOCATE CHANNEL RMAN_BACK_CH01 TYPE DISK;
    CROSSCHECK BACKUP;
    BACKUP AS COMPRESSED BACKUPSET DATABASE FORMAT '/u03/backup/databasefiles_%d_%u_%s_%T';
    sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
    BACKUP AS COMPRESSED BACKUPSET ARCHIVELOG ALL FORMAT '/u03/backup/archivelogs_%d_%u_%s_%T' DELETE INPUT;
    BACKUP AS COMPRESSED BACKUPSET CURRENT CONTROLFILE FORMAT '/u03/backup/controlfile_%d_%u_%s_%T';
    CROSSCHECK BACKUP;
    DELETE NOPROMPT OBSOLETE;
    DELETE NOPROMPT EXPIRED BACKUP;
    RELEASE CHANNEL RMAN_BACK_CH01;
    EXIT;
    EOF
    thanks

    Ahmer Mansoor wrote:
    RMAN never deletes the Backups unless there is a space pressure in the Recovery Area. Instead it marks the Backups as OBSOLETE based on Retention Policy (in your case it is 2 Days),
    To confirm it SET DB_RECOVERY_FILE_DEST_SIZE to some smaller value, the RMAN will remove all the Obsolete Backups automatically to reclaim space.Be very careful with this. If you generate a LOT of archivelog files and you exceed this size, on the next archivelog switch your database will hang with "cannot continue until archiver freed". RMAN will not automatically remove anything. RMAN only removes stuff when you program it in your script.
    See:
    http://docs.oracle.com/cd/E14072_01/backup.112/e10642/rcmconfb.htm#insertedID4 Retention Policy (recovery window or redundancy)
    things like:
    set retention window and number of copies
    crosscheck backup
    delete obsolete <-- delete old, redundant, no longer necessary backups/archivelogs
    delete expired <-- NOTE: If you manually delete files and do not execute delete expired (missing file), the DB_RECOVERY_FILE_DEST_SIZE remains the same. So, you can clean out the space and oracle will still say the location is "full".
    Understand that if you also set this parameter too small and your backup recovery window/redundancy are incorrectly set, you can also exhaust the "logical" space of this location again, putting your database at risk. Your parameter could be set to 100G on a 400G file system and even though you have 300G available, Oracle will see the limit of this parameter.
    My suggestion, get in a DEV/TEST environment and test to see how to best configure your environment for RMAN database backups/control file, archivelog backups also taking into consideration OS tape backup solutions. I always configure DISK for RMAN backups, then have some other tape backup utility sweep those locations to tape ensuring that I have sufficient backups to reconstitute my database - I also include a copy of the init.ora file, password file as well as the spfile backup in this location.
    >
    In case of Archivelogs, It is better to create and execute a Purge Job to remove Archivelogs after backup them on tape.I almost agree. I try to keep all archivelogs necessary for recovery from last full backup online. I try to keep a full backup online as well. much faster at restoring stuff instead of trying to locate it on tape.

  • Validate backup using RMAN

    Hi,
    This is a 9i RAC environment. RMAN is used to take the backup. The database is running fine and backup is taken using cron 3 times a week. There is no error messages generated when the backup is taken.
    However, in the alert log file I noticed that there are corrupted blocks in the backup files. I tried to validate the backup using (restore database validate) but I ended up with erros. Then, I tried (validate backupset) to check the corruption and I am getting different errors. 2 of the backupsets says that the data file can not be verfied. 1 of the backupset throws ORA-06510: PL/SQL: unhandled user-defined exception
    Can anyone guide me with this problem?
    Thank you in advance

    Sorry,
    but there is one big problem: you don't backup your archivelogs!
    Apart from a series of redundant commands (about the only required command is 'backup database', the rest needs to be relegated to house keeping scripts), this script doesn't result in a valid backup at all!
    What I do is
    ORAENV_ASK="NO"
    export ORACLE_SID=${DB}
    . $ORAENV
    case ${TRACE:-""} in
    T) set -x ;;
    esac
    dg="`date +%a`"
    case "$dg" in
    Mon) LVL=0
    Tue|Wed|Thu|Sat|Sun) LVL=2
    Fri) LVL=1
    *) LVL=2
    esac
    echo $LVL
    exec 1>>$LOGFILE 2>&1 # redirect alle output naar de logfile
    # fase 1, maak een backup van de database. Bail out als dit fout gaat
    rman <<EOD
    connect target ${UID}
    set echo on;
    run
    backup incremental level ${LVL}
    tag="db${TIMESTAMP}" database filesperset=1
    format '${BACKUP_DIR}/${ORACLE_SID}/backup_%d_db_%T_%s_%p.bck'
    plus archivelog tag="arch${TIMESTAMP}"
    skip inaccessible
    format '${BACKUP_DIR}/${ORACLE_SID}/backup_%d_arch_%T_%s_%p.bck'
    restore database validate;
    And in my case I ran
    configure controlfile autobackup on, and I set the format appropiately.
    The main advantage ot this code is you can always use
    list backupset tag="db<yyyymmdd>"
    and you don't need to think about the tag.
    resync catalog is implicit with autobackup on;
    Autobackup is required anyway, as the autobackup saves you from loosing the catalog.
    backup database validate only ensures the database can be backed up (ie the corruption is not in the datafiles). It looks like in your case the corruption is in the backup.
    Obviously, due to legal regulations, I can not post the complete script.
    It is also a bit smarter than I have shown here. When this phase fails, it automatically deletes the backup, using the tag mechanism.
    Sybrand Bakker
    Senior Oracle DBA

  • Hot Backups - Oracle 9i, 10g and 11g

    Are all hot backups run outside of RMAN as an OS file copy? If so, isn't this a very risky exercise.
    I understand that RMAN will check for corruption where as hot backups won't. RMAN can also track backups in a recovery catalog.
    If using a hot backup, it seems like corrupt data could be backed up with the good data.
    What exactly are the advantages of using a hot backup. It is understood that the databases can be up during a hot backup, but can't they also be up with an incremental RMAN backup?

    I think you need to read the documentation again. Check on tahiti.oracle.com
    A cold backup is when the database is shutdown (can be done by file copy or rman)
    A hot backup is when the database is running (can be done by file copy or rman)
    RMAN has the advantages of backing up at block level, and going directly to tape, and compression, and incremental backup, and block checking, and backup from ASM, and catalog ......
    File copy has the advantage of being logically simple (e.g you can see exactly what is happening when you copy a file).

  • Missing images when converting Words 2010 to PDF (Acrobat 9.0)

    Hi,
    I tried to convert documents from docx (2010) to pfd, but some images went missing. When I tried to convert using CutePDF, other images were 'discoloured'!!
    Anyone with the same problem?

    They are missing.. for example, i have this graphics with a few circles within a circle (different tones of blue). The pdf document only shows the 'outer' circle, whereas the inner circles are gone. Another is that I have a blue/grey graphic against a white background, with a text box with words on top of it. When printed, the text box is 'under' the graphic instead (I can see part of the text box on the white background)

  • User hot and Rman hot backup

    During user mode hot backup lots of redo gets generated as the entire block is written when any changes are made to a block which is in hot backup mode.But during Rman hot backup less redo are generated why is this so and whatz the logic invloved? and how oracle recovers the file that has been backed up through Rman.
    Could you please explain me regarding this in detail it will be really helpful.
    kumaresh

    From Article      Note:76736.1 RMAN FAQ: Recovery Manager -- Frequently Asked
    To understand why RMAN does not require extra logging or backup mode,
    you must first understand why those features are required for non-RMAN
    online backups.
    A non-RMAN online backup consists of a non-Oracle tool, such as cp or
    dd, backing up a datafile at the same time that DBWR is updating the
    file. We can't prevent the tool from reading a particular block at the
    exact same time that DBWR is updating that block. When that happens,
    the non-Oracle tool might read a block in a half-updated state, so that
    the block which is copied to the backup media might only have been
    updated in its first half, while the second half contains older data.
    This is called a "fractured block". If this backup needs to be restored
    later, and that block needs to be recovered, recovery will fail because
    that block is not usable.
    The 'alter tablespace begin backup' command is our solution for the
    fractured block problem. When a tablespace is in backup mode, and a
    change is made to a data block, instead of logging just the changed
    bytes to the redo log, we also log a copy of the entire block image
    before the change, so that we can reconstruct this block if media
    recovery finds that this block was fractured. That block image logging
    is what causes extra redo to be generated while files are in backup
    mode.
    The reason that RMAN does not require extra logging is that it
    guarantees that it will never back up a fractured block. We can make
    that guarantee because we know the format of Oracle data blocks, and we
    verify that each block that we read is complete before we copy it to the
    backup. If we read a fractured block, we read the block again to obtain
    a complete block before backing it up. non-Oracle tools are not able to
    do the same thing because they do not know how to verify the contents of
    an Oracle data block.
    Backup mode has another effect, which is to 'freeze' the checkpoint in
    the header of the file until the file is removed from backup mode.
    We do this because we cannot guarantee that the third-party backup
    tool will copy the file header prior to copying the data blocks.
    RMAN does not need to freeze the file header checkpoint because we
    know the order in which we will read the blocks, which enables us to
    capture a known good checkpoint for the file.

Maybe you are looking for