RMAN Level 0 backup script

Hi All,
Required level 0 backup script.
We have 10gR2 [10.2.0.4] Production instance, for backup required level 0 script.
Regards
Shaik

Shaik wrote:
Hi All,
Required level 0 backup script.
We have 10gR2 [10.2.0.4] Production instance, for backup required level 0 script.
Regards
ShaikHi shaik
RMAN>run {
backup incremental level 0 database plus archivelog ;
delete noprompt obsolete ;
for manual allocation channel for tape
RMAN > RUN {
ALLOCATE CHANNEL tape1 DEVICE TYPE sbt;
BACKUP DATABASE PLUS ARCHIVELOG;
RELEASE CHANNEL;
--neeraj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • RMAN Cold backup script

    DB version :10.2.0.4
    Do you find anything wrong in the below mentioned RMAN cold backup script? Any enhancements, corrections required?
    shutdown immediate;
    startup mount;
    backup database including current controlfile tag='full_bkp';
    startup;
    crosscheck backup;
    delete noprompt obsolete device type disk;
    resync catalog;
    }

    Since you are doing a SHUTDOWN IMMEDIATE and STARTUP MOUNT before the BACKUP, there will be no ArchiveLogs generated while the backup is running --- as the database is not OPEN.
    However, the PLUS ARCHIVELOG can include ArchiveLogs that had been generated from the previous STARTUP or ALTER DATABASE OPEN.
    (In that case, I would suggest an SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT' before the SHUTDOWN IMMEDIATE).
    Is your database running in ARCHIVELOG mode ? If not, then this discussion is moot.
    If yes, the next question is, obviously : Why not take a Hot Backup while the database is running (in which case you MUST backup archivelogs !)
    Hemant K Chitale

  • Rman hot backup script  gives error in R12.

    hi experts
    i m facing following prob when run the backup script. 1 day before the same script runs correctily but now  it gives me error at the allocatioion of channel rest of command run correctly.
    [root@testerp rman_log]# cat UAT_daily_rman_hot_bkp_01-11-14_140301.log
    -bash: /root/.bash_profile: Permission denied
    Recovery Manager: Release 11.1.0.7.0 - Production on Sat Jan 11 14:03:01 2014
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    connected to target database: UAT (DBID=2855851979)
    connected to recovery catalog database
    RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12>
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "end-of-file": expecting one of: "allocate, alter, advise, backup, beginline, blockrecover, catalog, change, copy, convert, crosscheck, configure, duplicate, debug, delete, execute, endinline, flashback, host, mount, open, plsql, recover, release, replicate, report, restore, resync, repair, }, set, setlimit, sql, switch, startup, shutdown, send, show, transport, validate"
    RMAN-01007: at line 12 column 1 file: standard input
    RMAN>
    RMAN>
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "identifier": expecting one of: "for"
    RMAN-01008: the bad identifier was: c2
    RMAN-01007: at line 1 column 18 file: standard input
    RMAN>
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "identifier": expecting one of: "for"
    RMAN-01008: the bad identifier was: c3
    RMAN-01007: at line 1 column 18 file: standard input
    RMAN>
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "identifier": expecting one of: "for"
    RMAN-01008: the bad identifier was: c4
    RMAN-01007: at line 1 column 18 file: standard input
    RMAN>
    Starting backup at 11-JAN-14
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=362 device type=DISK
    channel ORA_DISK_1: starting incremental level 1 datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    input datafile file number=00021 name=/d06/UAT/proddata/a_txn_data06.dbf
    input datafile file number=00392 name=/d06/UAT/db/apps_st/data/a_txn_data01.dbf
    input datafile file number=00401 name=/d06/UAT/db/apps_st/data/a_txn_data02.dbf
    input datafile file number=00402 name=/d06/UAT/db/apps_st/data/a_txn_data03.dbf
    input datafile file number=00022 name=/d06/UAT/proddata/a_txn_data07.dbf
    input datafile file number=00014 name=/d06/UAT/db/apps_st/data/a_txn_data04.dbf
    input datafile file number=00020 name=/d06/UAT/proddata/a_txn_data05.dbf
    input datafile file number=00011 name=/d06/UAT/db/apps_st/data/sysaux01.dbf
    input datafile file number=00018 name=/d06/UAT/db/apps_st/data/sysaux02.dbf
    input datafile file number=00023 name=/d06/UAT/proddata/a_txn_data08.dbf
    input datafile file number=00379 name=/d06/UAT/db/apps_st/data/undo01.dbf
    input datafile file number=00024 name=/d06/UAT/proddata/sysaux03.dbf
    input datafile file number=00025 name=/d06/UAT/proddata/sysaux04.dbf
    input datafile file number=00033 name=/d06/UAT/proddata/a_txn_ind11.dbf
    input datafile file number=00029 name=/d06/UAT/proddata/a_txn_ind09.dbf
    input datafile file number=00030 name=/d06/UAT/proddata/a_txn_ind10.dbf
    input datafile file number=00015 name=/d06/UAT/db/apps_st/data/a_txn_ind06.dbf
    input datafile file number=00026 name=/d06/UAT/db/apps_st/data/a_txn_ind07.dbf
    input datafile file number=00028 name=/d06/UAT/db/apps_st/data/a_txn_ind08.dbf
    input datafile file number=00393 name=/d06/UAT/db/apps_st/data/a_txn_ind01.dbf
    input datafile file number=00403 name=/d06/UAT/db/apps_st/data/a_txn_ind02.dbf
    input datafile file number=00404 name=/d06/UAT/db/apps_st/data/a_txn_ind03.dbf
    input datafile file number=00405 name=/d06/UAT/db/apps_st/data/a_txn_ind04.dbf
    input datafile file number=00406 name=/d06/UAT/db/apps_st/data/a_txn_ind05.dbf
    input datafile file number=00400 name=/d06/UAT/db/apps_st/data/a_media01.dbf
    input datafile file number=00353 name=/d06/UAT/db/apps_st/data/system08.dbf
    input datafile file number=00013 name=/d06/UAT/db/apps_st/data/system12.dbf
    input datafile file number=00352 name=/d06/UAT/db/apps_st/data/system09.dbf
    input datafile file number=00394 name=/d06/UAT/db/apps_st/data/a_ref01.dbf
    input datafile file number=00407 name=/d06/UAT/db/apps_st/data/a_ref02.dbf
    input datafile file number=00396 name=/d06/UAT/db/apps_st/data/a_summ01.dbf
    input datafile file number=00395 name=/d06/UAT/db/apps_st/data/a_int01.dbf
    input datafile file number=00008 name=/d06/UAT/db/apps_st/data/a_queue02.dbf
    input datafile file number=00027 name=/d06/UAT/db/apps_st/data/a_queue03.dbf
    input datafile file number=00031 name=/d06/UAT/db/apps_st/data/a_queue04.dbf
    input datafile file number=00399 name=/d06/UAT/db/apps_st/data/a_queue01.dbf
    input datafile file number=00001 name=/d06/UAT/db/apps_st/data/system01.dbf
    input datafile file number=00002 name=/d06/UAT/db/apps_st/data/system02.dbf
    input datafile file number=00003 name=/d06/UAT/db/apps_st/data/system03.dbf
    input datafile file number=00004 name=/d06/UAT/db/apps_st/data/system04.dbf
    input datafile file number=00005 name=/d06/UAT/db/apps_st/data/system05.dbf
    input datafile file number=00398 name=/d06/UAT/db/apps_st/data/a_archive01.dbf
    input datafile file number=00295 name=/d06/UAT/db/apps_st/data/system06.dbf
    input datafile file number=00351 name=/d06/UAT/db/apps_st/data/system07.dbf
    input datafile file number=00354 name=/d06/UAT/db/apps_st/data/system11.dbf
    input datafile file number=00288 name=/d06/UAT/db/apps_st/data/system10.dbf
    input datafile file number=00012 name=/d06/UAT/db/apps_st/data/apps_ts_tools01.dbf
    input datafile file number=00016 name=/d06/UAT/db/apps_st/data/a_ref03.dbf
    input datafile file number=00019 name=/d06/UAT/db/apps_st/data/MLSEIGL01.dbf
    input datafile file number=00032 name=/d06/UAT/db/apps_st/data/RMAN01.dbf
    input datafile file number=00397 name=/d06/UAT/db/apps_st/data/a_nolog01.dbf
    input datafile file number=00314 name=/d06/UAT/db/apps_st/data/portal01.dbf
    input datafile file number=00017 name=/d06/UAT/db/apps_st/data/a_int02.dbf
    input datafile file number=00006 name=/d06/UAT/db/apps_st/data/ctxd01.dbf
    input datafile file number=00010 name=/d06/UAT/db/apps_st/data/olap.dbf
    input datafile file number=00009 name=/d06/UAT/db/apps_st/data/odm.dbf
    input datafile file number=00007 name=/d06/UAT/db/apps_st/data/owad01.dbf
    channel ORA_DISK_1: starting piece 1 at 11-JAN-14
    [root@testerp rman_log]#
    backup script is below:
    in this script it returns error only at the channel allocaition rest of all backup command i run manually or with scirpt it runs correctly.4
    i m not able to know why it returns error only at challnel allocation 1 day before it runs correctly.
    [orauat@testerp rman_script]$ cat rman_backup.sh
    #!/bin/sh
    #ORACLE_SID=UAT
    #BACKUP_START_TIME='date +"%y""%m""%d"_"%H""%M""%S"'
    #ORACLE_HOME=/d06/UAT/db/tech_st/11.1.0
    #PATH=$PATH:${ORACLE_HOME}:${ORACLE_HOME}/bin
    #export ORACLE_SID
    #export ORACLE_HOME
    #export PATH
    /d06/UAT/db/tech_st/11.1.0/bin/rman catalog rman/rman007 target sys/sysuat <<EOF
    run
    allocate channel c1 device type disk format '/d06/UAT/rman_hot_backup/Daily_backup%d_Arch_%c_%U';
    sql 'alter system switch logfile';
    sql 'alter system switch logfile';
    sql 'alter system archive log current';
    delete expired archivelog all;
    crosscheck archivelog all;
    backup archivelog all;
    delete noprompt archivelog all completed before 'sysdate-4' backed up 1 times to disk;
    allocate channel c2 device type disk format '/d06/UAT/rman_hot_backup/Daily_backup%d_DB_%c_%U';
    allocate channel c3 device type disk format '/d06/UAT/rman_hot_backup/Daily_backup%d_DB_%c_%U';
    allocate channel c4 device type disk format '/d06/UAT/rman_hot_backup/Daily_backup%d_DB_%c_%U';
    backup incremental level 1 database;
    delete expired backup device type disk;
    delete obsolete device type disk;
    release channel c1;
    release channel c2;
    release channel c3;
    release channel c4;
    exit
    EOF
    regards
    pritesh ranjan

    yes the script is edited
    i have add some command line and edit it for take the full backup level=0 on the same directory with different formant name but location is same.
    can i take full backup level 0 and incremental backup level 1 in the same directory with the different format name.
    for exp:
    allocate channel c2 device type disk format '/d06/UAT/rman_hot_backup/Daily_backup%d_DB_%c_%U';
    allocate channel c3 device type disk format '/d06/UAT/rman_hot_backup/Daily_backup%d_DB_%c_%U';
    allocate channel c4 device type disk format '/d06/UAT/rman_hot_backup/Daily_backup%d_DB_%c_%U';
    i allocate these three channel for incremental level 1 backup;
    the backup is done successfully without any error.
    after that i have change
    allocate channel c2 device type disk format '/d06/UAT/rman_hot_backup/Weekly_backup%d_DB_%c_%U';
    allocate channel c3 device type disk format '/d06/UAT/rman_hot_backup/Weekly_backup%d_DB_%c_%U';
    allocate channel c4 device type disk format '/d06/UAT/rman_hot_backup/Weekly_backup%d_DB_%c_%U';
    backup  database incremental level 0
    after doing the above changes it get the error. with the channel location.
    i have to schedule daily incremental backup level 1 and weekly full backup level 0.
    plz suggest me i have to take incremental 1 and full incremental level 0 backup on seperate directory for different format name.
    regards
    pritesh ranjan

  • Rman tablespace backup script required

    Dear Guru,
    Thanks a lot, it start working...as the policy has set to 7 days retention period...
    i have another issue if you can help me, i have whole apps running on only two tablespace docv,docvindex
    rest by using this script i have to take backup every day entire database that occupied unncessary space, can you help me to revised the script..thank you in advanced sir
    connect target sys/sys@ORCL;
    run
    allocate channel h1 type disk format="E:\bkup_orcl\%t_%u";
    allocate channel h2 type disk format="E:\bkup_orcl\%t_%u";
    backup database tag=dailybak;
    backup current controlfile tag=ctlbak;
    sql 'alter system archive log current';
    backup archivelog all ;
    release channel h1;
    release channel h2;
    regards,
    salim shahzad

    Kuljeet Pal Singh wrote:
    cat db_rman.sh
    <<all oracle environment variable>>
    CUR_DATE=`date +%d%m%y`
    export CUR_DATE
    DT=`date +%d%m%y_%H-%M`
    export DT
    LOG_DEST=/u02/backup/TAPE_Backup_Log
    export LOG_DEST
    rman target / catalog db_cat/password@rmanprod log=$LOG_DEST/RMAN_$DT.log <<EOF
    run {
    backup archivelog all to destination '/oracle/oracle/.Arch_bkp/';
    delete archivelog until 'sysdate-10';
    }I am in nocatalogue database.
    exit
    EOF

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

  • Need Advice on RMAN backup script

    Hi;
    Can any one advice if any error or guide to make RMAN backup proper :
    Backup Policy are:
    1.     0 level backup
    2.     current log file is arvhived before backing up
    3.     backup whole database (datafiles)
    4.     backup separate control file
    5.     backup is done on disk
    6.     control file auto backup ON
    7.     only 7 days archive log are need to be preserve ; old need to be deleted
    ### one time paramters seting
    RMAN> CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
    RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'O:\rman\backup\Auto_Ctrl_weekly_%F';
    RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
    ### Command for weekly 0 level backup
    run {
    allocate channel c1 type disk;
    sql 'alter system archive log current';
    backup incremental level 0 tag = weekly_database format 'o:\rman\backup\full_weekly_%d_%s_%p_%t'(database);
    release channel c1;
    configure controlfile autobackup format for device type disk to 'o:\rman\backup\auto_ctrl_weekly_%f';
    allocate channel c1 type disk;
    backup tag = weekly_arch archivelog until time 'sysdate-7' format 'o:\rman\backup\archive_weekly_%d_%s_%p_%t';
    delete archivelog until time 'sysdate-7';
    release channel c1;
    Regards
    Smith

    Dear Pierre F.;
    Actually, I just added in my backup plan to have daily backup through RMAN, instead of COLD backup.
    I have planned to take cold backup once a week. here is the side of data:
    *** datafile 410
    *** size of database : 86 GM
    *** relog files size : 250MB
    *** daily archive logs are : 250MB * 4(number of files) = 1GM aprox.
    yes, time constraint is there; just because of the size of database. and we r going for 24/7
    Is this script going to run only one per week ?
    Ans: no I this was level 0 backup; i will take level 1 incremental backup with same script daily too.
    Do you have any other RMAN script ?
    ANS: no, I will modify same script for incremental.
    after local copy of backup all backup files (RMAN) will be copy over network to backup server or we can install LTO tape device to copy directly from database server.
    kindly advise me I am new in RMAN.
    regards;
    SMITH

  • RMAN 0 level backup failed while releasing channels at end.

    In RMAN 0 level backup, when it's about to finish, reports an error as releasing channels. It backed up about 98% datafiles.
    Is this backup is usable. As we can not affort to take backup again as it's a big terabyte databse.
    Please suggest.
    Thanks in advance.
    Aj.

    Do you have release stmts in the script
    From 9i onwards oracle Release the channels automatically upon backing up, so you can remove the release channel lines if you have and try it

  • RMAN Backup Script not running in cron tab

    Hi,
    I am having rman backup script which is being executed successfully through shell.
    but when scheduled in cron the script is being called but RMAN commands are not getting executed.
    i have scheduled cron using oracle user.
    Attached below the rman script for taking LEVEL 1 backup
    #! /bin/ksh
    DATE=`date +%Y-%m-%d`
    export ORACLE_SID=ACIDC
    export ORACLE_BASE='/home/app/oracle/product/10.2.0'
    PATH=$PATH:${ORACLE_HOME}/bin
    export PATH
    export ULIMIT=unlimited
    export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib
    export LIBPATH=$LD_LIBRARY_PATH:/usr/lib
    export TNS_ADMIN=$ORACLE_HOME/network/admin
    cd $ORACLE_HOME/bin
    rman TARGET= / << EOF > /oraclebkp/rmanlogs/ACIDC/$DATE.log
    backup incremental level 1 database;
    report obsolete;
    delete noprompt obsolete;
    exit;
    EOF
    exit 0
    Attached cron script
    SHELL=/bin/sh
    PATH=:/usr/ucb:/bin:/usr/bin
    10 17 * * 2 /oraclebkp/rmanscripts/rmandclvl1.sh 2>&1 >/oraclebkp/cronlogs/delobs.log
    Files delobs.log
    and oraclebkp/rmanlogs/ACIDC/$DATE.log are being created but with 0 bytes .
    Thanks in Advance
    HariPriya,

    rman TARGET= / << EOF > /oraclebkp/rmanlogs/ACIDC/$DATE.log Change this line to and try..
    $ORACLE_HOME/bin/rman TARGET= / << EOF > /oraclebkp/rmanlogs/ACIDC/$DATE.log

  • RMAN level 0 backup

    Is an RMAN level 0 backup consistent (database in MOUNT code), or inconsistent (database is open)?
    -Chuck

    PLease copy here the entire error stack. RMAN never gives just a sngle line error message. Its a series of error messages and looking all of them would be helpful to say something useful.
    As Nayab asked, please post the db version as well.
    HTH
    Aman....

  • Got error when creating a standby DB from rman:  no backup or copy... Why?

    We try to create standby database from a production DB on another server (10.2.0.4). The RMAN backup is in the nfs file system which is also mounted to the target server (the DR box). So, the access path for the rman backup is the same look from primary DB server and DR DB server. I started the RMAN run:
    RMAN> RUN
    2> {
    3> ALLOCATE AUXILIARY CHANNEL aux1 DEVICE TYPE DISK;
    4> ALLOCATE AUXILIARY CHANNEL aux2 DEVICE TYPE DISK;
    5> DUPLICATE TARGET DATABASE for standby
    6> nofilenamecheck
    7> dorecover;
    8> }
    9>
    10> exit
    using target database control file instead of recovery catalog
    allocated channel: aux1
    channel aux1: sid=582 devtype=DISK
    allocated channel: aux2
    channel aux2: sid=584 devtype=DISK
    Starting Duplicate Db at 21-JUN-12
    contents of Memory Script:
    set until scn 12198261770353;
    restore clone standby controlfile;
    sql clone 'alter database mount standby database';
    executing Memory Script
    executing command: SET until clause
    Starting restore at 21-JUN-12
    released channel: aux1
    released channel: aux2
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 06/21/2012 16:33:36
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06026: some targets not found - aborting restore
    RMAN-06024: no backup or copy of the control file found to restore
    ===========================================================================
    The backups should have controlfile. There is rman show all display:
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
    CONFIGURE BACKUP OPTIMIZATION OFF;
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backup/inbound/online/controlfile_auto%F';
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
    CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/backup/inbound/online/%d_%T_%t_%s';
    CONFIGURE MAXSETSIZE TO UNLIMITED;
    CONFIGURE ENCRYPTION FOR DATABASE OFF;
    CONFIGURE ENCRYPTION ALGORITHM 'AES128';
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/backup/inbound/online/snapcf_inbound.f';
    Why and how to fix? Thanks for help!

    Here is the list of command:
    RMAN> list backup of controlfile ;
    List of Backup Sets
    ===================
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    5518 Full 4.57M DISK 00:00:07 17-JUN-12
    BP Key: 5518 Status: AVAILABLE Compressed: NO Tag: TAG20120617T035926
    Piece Name: /backup/inbound/online/controlfile_autoc-2080040856-20120617-00
    Control File Included: Ckp SCN: 12197994840698 Ckp time: 17-JUN-12
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    5522 Full 4.57M DISK 00:00:00 18-JUN-12
    BP Key: 5522 Status: AVAILABLE Compressed: NO Tag: TAG20120618T010158
    Piece Name: /backup/inbound/online/controlfile_autoc-2080040856-20120618-00
    Control File Included: Ckp SCN: 12198041382572 Ckp time: 18-JUN-12
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    5526 Full 4.57M DISK 00:00:01 19-JUN-12
    BP Key: 5526 Status: AVAILABLE Compressed: NO Tag: TAG20120619T010352
    Piece Name: /backup/inbound/online/controlfile_autoc-2080040856-20120619-00
    Control File Included: Ckp SCN: 12198090424606 Ckp time: 19-JUN-12
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    5530 Full 4.57M DISK 00:00:02 20-JUN-12
    BP Key: 5530 Status: AVAILABLE Compressed: NO Tag: TAG20120620T010304
    Piece Name: /backup/inbound/online/controlfile_autoc-2080040856-20120620-00
    Control File Included: Ckp SCN: 12198146424201 Ckp time: 20-JUN-12
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    5534 Full 4.57M DISK 00:00:02 21-JUN-12
    BP Key: 5534 Status: AVAILABLE Compressed: NO Tag: TAG20120621T010357
    Piece Name: /backup/inbound/online/controlfile_autoc-2080040856-20120621-00
    Control File Included: Ckp SCN: 12198210334547 Ckp time: 21-JUN-12
    ==================================================================
    I tried to catalog the controlfile:
    RMAN> catalog controlfilecopy '/backup/inbound/online/controlfile_autoc-2080040856-20120621-00';
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of catalog command on default channel at 06/21/2012 17:24:32
    ORA-19563: control file header validation failed for file /backup/inbound/online/controlfile_autoc-2080040856-20120621-00
    ====================================================================
    We have level 1 backup everyday, except Sunday. I have level 0 backup on Sunday. I alos tried the metalink note RMAN Duplicate For Standby Fails with Rman-06024: No Backup Or Copy Of The Control File Found To Restore [ID 466321.1]. It does not work.
    Thanks for help!

  • Rman level 0

    Hi I have taken RMAN level 0 backup and scheduled level1 previously. Now we have moved the old datafiles and backupset and wanted to start from level 0 again. So we are running the same script and it is not running in level 0 but looking for level 1. and throwing errors. Now the flash recovery area is empty but only having the archivelogs and we want to take level 0 freshly. following is the error i am getting.
    RMAN> run {
    2> allocate channel oem_disk_backup device type disk;
    3> recover copy of database with tag 'ORA\$OEM_LEVEL_0';
    4> delete backup completed before 'SYSDATE-30' device type disk;
    5> backup incremental level 1 cumulative copies=1 for recover of copy with tag 'ORA\$OEM_LEVEL_0' database plus archivelog ;
    6> delete archivelog until time 'SYSDATE-30';
    7> release channel oem_disk_backup;
    8> }
    9>
    using target database control file instead of recovery catalog
    allocated channel: oem_disk_backup
    channel oem_disk_backup: sid=564 devtype=DISK
    Starting recover at 20-AUG-07
    no copy of datafile 6 found to recover
    no copy of datafile 7 found to recover
    no copy of datafile 8 found to recover
    no copy of datafile 9 found to recover
    no copy of datafile 10 found to recover
    channel oem_disk_backup: starting incremental datafile backupset restore
    channel oem_disk_backup: specifying datafile copies to recover
    recovering datafile copy fno=00001 name=/disk02/orabackup/beprod/flash_recovery_area/BEPROD/datafile/o1_mf_system_3bk8d7hk_.dbf
    recovering datafile copy fno=00002 name=/disk02/orabackup/beprod/flash_recovery_area/BEPROD/datafile/o1_mf_undotbs1_3bk8f0m4_.dbf
    recovering datafile copy fno=00003 name=/disk02/orabackup/beprod/flash_recovery_area/BEPROD/datafile/o1_mf_sysaux_3bk8fhov_.dbf
    recovering datafile copy fno=00004 name=/disk02/orabackup/beprod/flash_recovery_area/BEPROD/datafile/o1_mf_users_3bk8fyrp_.dbf
    recovering datafile copy fno=00005 name=/disk02/orabackup/beprod/flash_recovery_area/BEPROD/datafile/o1_mf_becms_3bk7zghd_.dbf
    channel oem_disk_backup: reading from backup piece /disk02/orabackup/beprod/flash_recovery_area/BEPROD/backupset/2007_08_20/o1_mf_nnnd1_TAG20070820T010830_3d
    ldd8z4_.bkp
    released channel: oem_disk_backup
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 08/20/2007 21:25:04
    ORA-19870: error reading backup piece /disk02/orabackup/beprod/flash_recovery_area/BEPROD/backupset/2007_08_20/o1_mf_nnnd1_TAG20070820T010830_3dldd8z4_.bkp
    ORA-19505: failed to identify file "/disk02/orabackup/beprod/flash_recovery_area/BEPROD/backupset/2007_08_20/o1_mf_nnnd1_TAG20070820T010830_3dldd8z4_.bkp"
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    Recovery Manager complete.
    Please help,
    Thanks,
    G.

    Take Level 0 backup using the below command and then go for the one you are executing
    BACKUP INCREMENTAL LEVEL 0 TAG='ORA\$OEM_LEVEL_0' DATABASE;
    Regards

  • RMAN LEVEL0 BACKUP FAIL

    Use scripts to do level0 backup
    scripts:
    run {allocate channel c1 type disk;allocate channel c2 type disk;backup incremental level 0 tag 'level0' format='/backup/nissandb2backup/bkp_%T_%s_%p.dbf' databaseinclude current controlfile;release channel c1;release channel c2;}
    Backup failed. Below is the log information:
    Recovery Manager: Release 10.2.0.1.0 - Production on Mon Jul 2 23:30:09 2012
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    connected to target database: PRIMARY0 (DBID=359019005)
    using target database control file instead of recovery catalog
    RMAN> run {
    2> allocate channel c1 type disk;
    3> allocate channel c2 type disk;
    4> backup incremental level 0 tag 'level0' format='/backup/nissandb2backup/bkp_%T_%s_%p.dbf' database
    5> include current controlfile;
    6> release channel c1;
    7> release channel c2;
    8> }
    9>
    10>
    allocated channel: c1
    channel c1: sid=218 devtype=DISK
    allocated channel: c2
    channel c2: sid=279 devtype=DISK
    Starting backup at 02-JUL-12
    channel c1: starting incremental level 0 datafile backupset
    channel c1: specifying datafile(s) in backupset
    input datafile fno=00004 name=/database/oracle/oradata/PRIMARY0/datafile/o1_mf_users_7b1my5cr_.dbf
    input datafile fno=00010 name=/oradata/primary0/datafile/data02.dbf
    channel c1: starting piece 1 at 02-JUL-12
    channel c2: starting incremental level 0 datafile backupset
    channel c2: specifying datafile(s) in backupset
    input datafile fno=00005 name=/database/oracle/oradata/PRIMARY0/datafile/o1_mf_users_7b1mykwz_.dbf
    input datafile fno=00011 name=/oradata/primary0/datafile/data03.dbf
    channel c2: starting piece 1 at 02-JUL-12
    RMAN-03009: failure of backup command on c2 channel at 07/03/2012 00:11:10
    ORA-19510: failed to set size of 3946992 blocks for file "/backup/nissandb2backup/bkp_20120627_1992_1.dbf" (blocksize=8192)
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 9
    channel c2 disabled, job failed on it will be run on another channel
    RMAN-03009: failure of backup command on c1 channel at 07/03/2012 01:54:26
    ORA-19510: failed to set size of 3986777 blocks for file "/backup/nissandb2backup/bkp_20120627_1991_1.dbf" (blocksize=8192)
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 9
    channel c1 disabled, job failed on it will be run on another channel
    released channel: c1
    released channel: c2
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on c2 channel at 07/03/2012 00:11:10
    ORA-19510: failed to set size of 3946992 blocks for file "/backup/nissandb2backup/bkp_20120627_1992_1.dbf" (blocksize=8192)
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 9
    RMAN-03009: failure of backup command on c1 channel at 07/03/2012 01:54:26
    ORA-19510: failed to set size of 3986777 blocks for file "/backup/nissandb2backup/bkp_20120627_1991_1.dbf" (blocksize=8192)
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 9
    Recovery Manager complete.
    Could you please help check the reason?

    Thank for your reply.
    Yesterday I only modified the script.
    Now the script is :
    run {
    allocate channel c1 type disk maxpiecesize 5120M;
    allocate channel c2 type disk maxpiecesize 5120M;
    backup incremental level 0 tag 'level0' format='/backup/nissandb2backup/bkp_%
    T_%s_%p_%U' database
    include current controlfile;
    release channel c1;
    release channel c2;
    But still failed.The log is:
    Recovery Manager: Release 10.2.0.1.0 - Production on Tue Jul 3 23:30:11 2012
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    connected to target database: PRIMARY0 (DBID=359019005)
    using target database control file instead of recovery catalog
    RMAN> run {
    2> allocate channel c1 type disk maxpiecesize 5120M;
    3> allocate channel c2 type disk maxpiecesize 5120M;
    4> backup incremental level 0 tag 'level0' format='/backup/nissandb2backup/bk
    p_%T_%s_%p_%U' database
    5> include current controlfile;
    6> release channel c1;
    7> release channel c2;
    8> }
    9>
    10>
    allocated channel: c1
    channel c1: sid=250 devtype=DISK
    allocated channel: c2
    channel c2: sid=245 devtype=DISK
    Starting backup at 03-JUL-12
    channel c1: starting incremental level 0 datafile backupset
    channel c1: specifying datafile(s) in backupset
    input datafile fno=00004 name=/database/oracle/oradata/PRIMARY0/datafile/o1_m
    f_users_7b1my5cr_.dbf
    input datafile fno=00010 name=/oradata/primary0/datafile/data02.dbf
    channel c1: starting piece 1 at 03-JUL-12
    channel c2: starting incremental level 0 datafile backupset
    channel c2: specifying datafile(s) in backupset
    input datafile fno=00005 name=/database/oracle/oradata/PRIMARY0/datafile/o1_m
    f_users_7b1mykwz_.dbf
    input datafile fno=00011 name=/oradata/primary0/datafile/data03.dbf
    channel c2: starting piece 1 at 03-JUL-12
    RMAN-03009: failure of backup command on c2 channel at 07/04/2012 07:36:34
    ORA-19510: failed to set size of 3946992 blocks for file "/backup/nissandb2ba
    ckup/bkp_20120628_1994_1.dbf" (blocksize=8192)
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 9
    channel c2 disabled, job failed on it will be run on another channel
    RMAN-03009: failure of backup command on c1 channel at 07/04/2012 08:47:20
    ORA-19510: failed to set size of 3986905 blocks for file "/backup/nissandb2ba
    ckup/bkp_20120628_1993_1.dbf" (blocksize=8192)
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 9
    channel c1 disabled, job failed on it will be run on another channel
    released channel: c1
    released channel: c2
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on c2 channel at 07/04/2012 07:36:34
    ORA-19510: failed to set size of 3946992 blocks for file "/backup/nissandb2ba
    ckup/bkp_20120628_1994_1.dbf" (blocksize=8192)
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 9
    RMAN-03009: failure of backup command on c1 channel at 07/04/2012 08:47:20
    ORA-19510: failed to set size of 3986905 blocks for file "/backup/nissandb2ba
    ckup/bkp_20120628_1993_1.dbf" (blocksize=8192)
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 9
    Recovery Manager complete.
    Now I modify the rman parameter:
    CONFIGURE MAXSETSIZE TO UNLIMITED; --> CONFIGURE MAXSETSIZE TO 5G;
    Any other things, I need to check or modify? Please help.

  • Rman full backup시 파일이 2개씩 생성 됩니다.

    rman을 사용해서 cron으로 일요일 새벽마다 full backup 을 하고 있는데, 백업 볼륨 full 이 발생해서 로그를 살펴보니 아래와 같습니다.
    같은 사이즈, 같은 생성 시각의 파일들이 2개씩 생성 되었습니다.
    rman 백업에 별다른 작업을 하지 않았는데도 저렇게 결과가 나오니 어떻게 해야할지 감을 못잡겠습니다, 특히 아래 두껍게 표시한 줄은 로그도 좀 잘린것 같습니다.
    ■ rman full backup 수행 로그
    Recovery Manager: Release 8.1.6.0.0 - Production
    RMAN-06005: connected to target database: ORCL (DBID=1151661191)
    RMAN-06008: connected to recovery catalog database
    RMAN>
    RMAN-03021: executing script: full_backup
    RMAN-03022: compiling command: allocate
    RMAN-03023: executing command: allocate
    RMAN-08030: allocated channel: backup_loveme
    RMAN-08500: channel backup_loveme: sid=224 devtype=DISK
    RMAN-03022: compiling command: backup
    RMAN-03023: executing command: backup
    RMAN-08008: channel backup_loveme: starting incremental level 0 datafile backupset
    RMAN-08502: set_count=14779 set_stamp=619322468 creation_time=08-APR-07
    RMAN-08010: channel backup_loveme: specifying datafile(s) in backupset
    RMAN-08522: input datafile fno=00085 name=/sdisk02/data/ts01.dbf
    RMAN-08522: input datafile fno=00027 name=/sdisk01/data/ts02.dbf
    RMAN-08522: input datafile fno=00004 name=/sdisk01/data/temp01.dbf
    RMAN-08522: input datafile fno=00006 name=/sdisk01/data/indx01.dbf
    RMAN-08522: input datafile fno=00015 name=/sdisk01/data/ts03.dbf
    RMAN-08013: channel backup_loveme: piece 1 created
    RMAN-08503: piece handle=/sdisk03/backup/ff_driek734_14779_1 comment=NONE
    RMAN-08525: backup set complete, elapsed time: 00:11:55
    RMAN-08008: channel backup_loveme: starting incremental level 0 datafile backupset
    RMAN-08502: set_count=14781 set_stamp=619323184 creation_time=08-APR-07
    RMAN-080RMAN-08013: channel backup_loveme: piece 1 created
    RMAN-08503: piece handle=/sdisk03/backup/ff_dsiek734_14780_1 comment=NONE
    RMAN-08525: backup set complete, elapsed time: 00:11:55
    RMAN-08008: channel backup_loveme: starting incremental level 0 datafile backupset
    RMAN-08502: sRMAN-08013: channel backup_loveme: piece 1 created
    RMAN-08503: piece handle=/sdisk03/backup/ff_dtiek7pg_14781_1 comment=NONE
    RMAN-08525: backup set complete, elapsed time: 00:06:55
    RMAN-08008: channel backup_loveme: starting incremental level 0 datafile backupset
    RMAN-08502: set_count=14783 set_stamp=619323599 creation_time=08-APR-07
    RMAN-080RMAN-08013: channel backup_loveme: piece 1 created
    RMAN-08503: piece handle=/sdisk03/backup/ff_duiek7pg_14782_1 comment=NONE
    RMAN-08525: backup set complete, elapsed time: 00:06:55
    (후략...)
    ■ rman full backup 생성 파일
    ls -al /sdisk03/backup/*
    -rw-r----- 1 oracle dba 5780783616 4월 8 02:13 backup/ff_driek734_14779_1
    -rw-r----- 1 oracle dba 5780783616 4월 8 02:13 backup/ff_dsiek734_14780_1
    -rw-r----- 1 oracle dba 3423191552 4월 8 02:19 backup/ff_dtiek7pg_14781_1
    -rw-r----- 1 oracle dba 3423191552 4월 8 02:19 backup/ff_duiek7pg_14782_1
    (후략...)
    ■ RMAN> print script full_backup
    allocate channel backup_loveme
    type disk
    format '/sdisk03/backup/ff_%u_%s_%p';
    backup
    incremental level=0
    ( database include current controlfile );
    글 수정:
    발로차는새

    문제가 해결 되었습니다만 원인이 오라클과 관련 없는 문제라... 글을 삭제 하고 싶은데 삭제 기능이 없네요 ^^
    원인은 시스템에 cron 데몬이 2개가 돌고 있었습니다. 문제 해결은 가까운 곳부터 찾아야 하는것 같습니다 ㅜㅜ
    포럼을 어지럽혀 죄송합니다.

  • Oracle Hot Backup Script Windows Server 2003

    Hello,
    Does anyone here have a working Oracle 10I database hot backup script for Windows Server 2003? If so can you please post it here.
    Thanks.

    Here is a basic batch script I have used for a hot backup of Oracle databases using RMAN
    Will just need to update some locations based on you environment just check all the comments and change what you need to but this can be scheduled to run regularly through the windows scheduler for database backups.
    This will take a hot backup and backup the archive logs.
    Let me know if you have any quesitons.
    REM #####################################################################
    REM # Name: rman_hot_backup_dsk.bat
    REM #
    REM # Description:
    REM #
    REM # Generic Hot backup script that accepts the SID
    REM #
    REM # Parameters: Instance Name, backup level
    REM #
    REM #####################################################################
    REM #
    REM # Check if SID was Passed
    if (%1)==() goto USAGE
    if (%2)==() goto USAGE
    REM # assign ORACLE_SID to passed SID
    set ORACLE_SID=%1
    REM # Set the hot backup level 0-full 1-incremental
    set LEVEL=%2
    REM # export the page list
    set [email protected]
    REM # assign a date we can use as part of the logfile
    set DTE=%date:~-4%%date:~4,2%%date:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%
    REM # Take the spaces out of the date string so we can use in our file name
    set DTE=%DTE: =%
    REM # set the script location
    REM # Set location of where you will put script
    set SCRIPTLOC=C:\app\oracle\scripts
    cd %SCRIPTLOC%
    REM # Set the Temporary command file that we will write our rman script to
    set CMDFILE=%SCRIPTLOC%\%ORACLE_SID%_rman_hot_backup_dsk.cmd
    REM # Remove the temporary file if it exists
    del /q %CMDFILE%
    REM # Set the logfile directory
    REM # Change based on where you want the backup logs to go
    set LOGPATH=W:\ORACLE_BACKUP\logs
    set LOGFILE=%ORACLE_SID%_rman_hot_backup_dsk_%DTE%.log
    set LOG=%LOGPATH%\%LOGFILE%
    REM # Set the path of the backup location
    REM # Change based on disk pach for you disk based backups
    set BACKLOC=\\VirtualBox\ORA_ITS03P\ORACLE_BACKUP\%ORACLE_SID%
    REM # Lets set the ORACLE_HOME for the host
    REM # Set to your actual ORACLE_HOME location
    set ORACLE_HOME=C:\app\oracle\product\10.2.0\db_1
    # Set the rest of the Oracle Environment
    # based on our ORACLE_HOME
    set LIBPATH=%ORACLE_HOME%/lib
    set LD_LIBRARY_PATH=%ORACLE_HOME%/lib
    set TNS_ADMIN=%ORACLE_HOME%/network/admin
    REM #set ORA_NLS10=%ORACLE_HOME%/nls/data
    REM Set our PATH with the ORACLE_HOME so that we have a good
    REM clean environment to work with
    set PATH=%ORACLE_HOME%/bin;%ORACLE_HOME%/OPatch;%PATH%
    REM # Write Temporary command file for RMAN backup
    echo # configure retention policy >> %CMDFILE%
    echo CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS ; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # lets start clean for our hot backup by doing full crosschecks >> %CMDFILE%
    echo change archivelog all crosscheck ; >> %CMDFILE%
    echo crosscheck backup of database; >> %CMDFILE%
    echo crosscheck backup of controlfile; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # delete all expired and obsolete backups >> %CMDFILE%
    echo allocate channel for maintenance type disk ; >> %CMDFILE%
    echo delete noprompt expired archivelog all ; >> %CMDFILE%
    echo delete noprompt expired backup ; >> %CMDFILE%
    echo delete noprompt obsolete ; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # Configure control file for auto backup >> %CMDFILE%
    echo configure controlfile autobackup on ; >> %CMDFILE%
    echo CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%BACKLOC%\%ORACLE_SID%_controlfile_%%F' ; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # Configure default device type here we use disk and set parallelism to 2 >> %CMDFILE%
    echo configure default device type to disk ; >> %CMDFILE%
    echo configure device type disk parallelism 2 ; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # Must format the default channel for the device type disk >> %CMDFILE%
    echo # other wise tmp area in creating pieces will be done in >> %CMDFILE%
    echo # the $ORACLE_HOME/dbs directory >> %CMDFILE%
    echo CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT = '%BACKLOC%\%ORACLE_SID%_hot_%%U' ; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # Configure our retention policy for this database >> %CMDFILE%
    echo configure retention policy to recovery window of 14 days ; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # Let configure our channels for our backup >> %CMDFILE%
    echo # Channel 1 disk and we indicate where it goes not taking the default >> %CMDFILE%
    echo configure channel 1 device type disk MAXPIECESIZE = 4G format '%BACKLOC%\%ORACLE_SID%_hot_%%U' ; >> %CMDFILE%
    echo # Channel 2 disk and we indicate where it goes not taking the default >> %CMDFILE%
    echo configure channel 2 device type disk MAXPIECESIZE = 4G format '%BACKLOC%\%ORACLE_SID%_hot_%%U' ; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # Backup our database with compression on >> %CMDFILE%
    echo backup as compressed backupset incremental level %LEVEL% tag hot_%LEVEL%_%DTE% DATABASE ; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # Backup our archive log files that have not been backed up >> %CMDFILE%
    echo backup as compressed backupset format '%BACKLOC%\%ORACLE_SID%_Archive_%%d_%%s_%%p_%%t' archivelog all not backed up 1 times ; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # Backup Control file for standby in case needed >> %CMDFILE%
    echo backup current controlfile for standby ; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # let put a controlfile to trace >> %CMDFILE%
    echo sql 'ALTER DATABASE BACKUP CONTROLFILE TO TRACE' ; >> %CMDFILE%
    REM # Run the RMAN backup without using the recovery catalog
    %ORACLE_HOME%\bin\rman target=/ nocatalog cmdfile=%CMDFILE% msglog=%LOG%
    REM # Remove our temporary command file
    del /q %CMDFILE%
    REM # Mail Archive backup log
    REM # This relies on the free bmail utility
    bmail -date -m %LOG% -f [email protected] -s <smtpserver> -t %PAGE_LIST% -a "HOT Backup results"
    REM # Goto end of script as we are done
    goto END
    :USAGE
    echo "Must Pass ORACLE_SID and hot backup level as parameters."
    goto END
    :END

  • Rman full backup, crash and full restore?

    Hi,
    I try to implement a simple backup and restore process with rman. Ok, with rman it's not simple. ;-)
    My aim is to backup a database with a full backup and restore it from this backup, for example when it crashes.
    Ok, for creating the backup I use this rman script:
    run
    allocate channel t1 type disk;
    backup incremental level 0 format 'PATHTOBAKFILE' database;
    release channel t1;
    The result is a 1GB large backupfile.
    Now I delete the whole database and create a new one to simulate a crash.
    After this is done, I want to restore the state of the database which is frozen in the backupfile.
    Therefor I use the following rman script:
    run
    allocate channel t1 type disk format 'PATHTOBACKUPFILE';
    shutdown immediate;
    startup mount;
    restore database;
    recover database;
    alter database open resetlogs;
    release channel t1;
    Now rman tells me an error:
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: Fehler bei restore Befehl auf 04/09/2008 10:24:59
    RMAN-06026: Einige Ziele nicht gefunden - Recovery wird abgebrochen
    RMAN-06023: Kein Backup bzw. keine Kopie der Datendatei 4 zum Wiederherstellen gefunden
    RMAN-06023: Kein Backup bzw. keine Kopie der Datendatei 3 zum Wiederherstellen gefunden
    RMAN-06023: Kein Backup bzw. keine Kopie der Datendatei 2 zum Wiederherstellen gefunden
    RMAN-06023: Kein Backup bzw. keine Kopie der Datendatei 1 zum Wiederherstellen gefunden
    In english: No backup or copy of datafile X where found for restore.
    I think the backup/restore possibilities with rman are very complex and I don't exactly understand which is the right backup strategie. I'm not an oracle specialist. Maybe someone can give me a hint.
    My program should backup the database full, differential and incremental and also restore only by using the given backupfiles. So I want somethink like Point-In-Time recovery, but rman should use the time-point of the given backupfile. And this backupfiles are stored outside oracle, e.g. on a server or somethink like this.
    Thanks a lot for help.
    Best regards,
    Ronny

    RMAN> run
    2> {
    3> allocate channel t1 type disk;
    4> backup incremental level 0 format 'PATHTOBAKFILE.%d.%u.P%p.C%c' current contr
    olfile database;
    5> release channel t1;
    6> }
    released channel: ORA_DISK_1
    allocated channel: t1
    channel t1: sid=160 devtype=DISK
    Starting backup at 09-APR-08
    channel t1: starting incremental level 0 datafile backupset
    channel t1: specifying datafile(s) in backupset
    input datafile fno=00001 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\SYSTEM01.DBF
    input datafile fno=00003 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\SYSAUX01.DBF
    input datafile fno=00002 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\UNDOTBS01.DBF
    input datafile fno=00004 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\USERS01.DBF
    channel t1: starting piece 1 at 09-APR-08
    channel t1: finished piece 1 at 09-APR-08
    piece handle=C:\WINDOWS\SYSTEM32\PATHTOBAKFILE.ORCL.0TJDDSC1.P1.C1 comment=NONE
    channel t1: backup set complete, elapsed time: 00:01:05
    channel t1: starting incremental level 0 datafile backupset
    channel t1: specifying datafile(s) in backupset
    including current controlfile in backupset
    including current SPFILE in backupset
    channel t1: starting piece 1 at 09-APR-08
    channel t1: finished piece 1 at 09-APR-08
    piece handle=C:\WINDOWS\SYSTEM32\PATHTOBAKFILE.ORCL.0UJDDSE2.P1.C1 comment=NONE
    channel t1: backup set complete, elapsed time: 00:00:05
    channel t1: starting incremental level 0 datafile backupset
    channel t1: specifying datafile(s) in backupset
    including current controlfile in backupset
    channel t1: starting piece 1 at 09-APR-08
    channel t1: finished piece 1 at 09-APR-08
    piece handle=C:\WINDOWS\SYSTEM32\PATHTOBAKFILE.ORCL.0VJDDSE7.P1.C1 comment=NONE
    channel t1: backup set complete, elapsed time: 00:00:02
    Finished backup at 09-APR-08
    released channel: t1
    RMAN> list backup of controlfile
    2> ;
    ORACLE error from target database:
    ORA-19922: there is no parent row with id 0 and level 0
    ORA-06512: at "SYS.DBMS_BACKUP_RESTORE", line 5035
    ORA-06512: at line 1
    RMAN-06900: WARNING: unable to generate V$RMAN_STATUS or V$RMAN_OUTPUT row
    RMAN-06901: WARNING: disabling update of the V$RMAN_STATUS and V$RMAN_OUTPUT row
    s
    List of Backup Sets
    ===================
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    18      Incr 0  2M         DISK        00:00:02     09-APR-08
            BP Key: 18   Status: AVAILABLE  Compressed: NO  Tag: TAG20080409T214537
            Piece Name: C:\WINDOWS\SYSTEM32\PATHTOBAKFILE.ORCL.0UJDDSE2.P1.C1
      Controlfile Included: Ckp SCN: 337949       Ckp time: 09-APR-08
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    19      Incr 0  2M         DISK        00:00:01     09-APR-08
            BP Key: 19   Status: AVAILABLE  Compressed: NO  Tag: TAG20080409T214537
            Piece Name: C:\WINDOWS\SYSTEM32\PATHTOBAKFILE.ORCL.0VJDDSE7.P1.C1
      Controlfile Included: Ckp SCN: 337950       Ckp time: 09-APR-08
    RMAN> run
    2> {
    3> allocate channel t1 type disk format 'PATHTOBAKFILE.ORCL.0VJDDSE7.P1.C1';
    4> shutdown immediate;
    5> startup nomount;
    6> restore controlfile from 'PATHTOBAKFILE.ORCL.0VJDDSE7.P1.C1';
    7> startup mount;
    8> restore database;
    9> recover database;
    10> shutdown normal;
    11> startup;
    12> release channel t1;
    13> }
    released channel: ORA_DISK_1
    allocated channel: t1
    channel t1: sid=160 devtype=DISK
    database closed
    database dismounted
    Oracle instance shut down
    connected to target database (not started)
    Oracle instance started
    Total System Global Area     171966464 bytes
    Fixed Size                      787988 bytes
    Variable Size                145488364 bytes
    Database Buffers              25165824 bytes
    Redo Buffers                    524288 bytes
    Starting restore at 09-APR-08
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=160 devtype=DISK
    channel ORA_DISK_1: restoring controlfile
    channel ORA_DISK_1: restore complete
    output filename=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\CONTROL01.CTL
    output filename=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\CONTROL02.CTL
    output filename=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\CONTROL03.CTL
    Finished restore at 09-APR-08
    database is already started
    database mounted
    ORACLE error from target database:
    ORA-19922: there is no parent row with id 0 and level 0
    ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5038
    ORA-06512: at line 1
    RMAN-06900: WARNING: unable to generate V$RMAN_STATUS or V$RMAN_OUTPUT row
    RMAN-06901: WARNING: disabling update of the V$RMAN_STATUS and V$RMAN_OUTPUT row
    s
    Starting restore at 09-APR-08
    Starting implicit crosscheck backup at 09-APR-08
    released channel: ORA_DISK_1
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=160 devtype=DISK
    Crosschecked 2 objects
    Finished implicit crosscheck backup at 09-APR-08
    Starting implicit crosscheck copy at 09-APR-08
    using channel ORA_DISK_1
    Finished implicit crosscheck copy at 09-APR-08
    searching for all files in the recovery area
    cataloging files...
    cataloging done
    no files cataloged
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting datafile backupset restore
    channel ORA_DISK_1: specifying datafile(s) to restore from backup set
    restoring datafile 00001 to C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\SYSTEM01.DBF
    restoring datafile 00002 to C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\UNDOTBS01.DBF
    restoring datafile 00003 to C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\SYSAUX01.DBF
    restoring datafile 00004 to C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\USERS01.DBF
    channel ORA_DISK_1: restored backup piece 1
    piece handle=C:\WINDOWS\SYSTEM32\PATHTOBAKFILE.ORCL.0TJDDSC1.P1.C1 tag=TAG200804
    09T214537
    channel ORA_DISK_1: restore complete
    Finished restore at 09-APR-08
    Starting recover at 09-APR-08
    using channel ORA_DISK_1
    starting media recovery
    archive log thread 1 sequence 1 is already on disk as file C:\ORACLE\PRODUCT\10.
    1.0\ORADATA\ORCL\REDO02.LOG
    archive log filename=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\REDO02.LOG thread=1 s
    equence=1
    media recovery complete
    Finished recover at 09-APR-08
    database dismounted
    Oracle instance shut down
    connected to target database (not started)
    Oracle instance started
    database mounted
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of startup command at 04/09/2008 21:53:03
    ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
    open database with resetlogs instead startup
    RMAN>Khurram

Maybe you are looking for

  • User Exit Required

    Hello Friends EDI 850 is for Creating Sales Orders Customer is sending BEG 00 Or BEG 01. 00 is for new orders and should be normally processed to create Sales Order. 01 is for Cancel Orders, an email should be send to users email id for that particul

  • Class or Method to Return OracleDataReader

    I'm using a neat little method which I can call from anywhere to do an ExcuteScalar and return the value using an Oracle database table as the source. So now I'd like to do a similar thing but instead of returning a single value I'd like to return th

  • Regarding the BAPI calls without input

    Hi all, We are developing on webdynpro component. I came across a scenario where we call the BAPI through Adaptive BAPI model. This bapi doesnt take any input parameters but returns 7 tables with data. So, My problem here is i am not getting output i

  • Problem inserting the euro sign using JDBC

    Inserting the euro sign into a char field of a DB2 table using JDBC results in getting a control char (SUBSTITUTE / ASCII 26) in the field, instead of the expected euro sign. I tried both the "old" DB2 driver (db2driver.zip) and the new one (db2jcc.j

  • Abruf-Code funktioniert nicht für Elements 13

    Hallo, habe  gerade Elements 13 erworben. Bereits installiert ist Elements 12. Habe Probleme die Seriennummer für 13 zu erhalten - Mein Abruf Code funktioniert nicht. Der Code lautet gem. Kaufunterlagen :...... Was tun ?