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

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

  • Restoring from RMAN tablespace backup ; Few questions

    11.2.0.3/RHEL 5.8
    We have a RAC DB which is used by more than 20 applications. One schema for each application and one tablespace for each schema.
    We have a schema with 130gb in size. All Objects in this schema use a single tablespace MCS_DATA.
    This weekend we are applying some changes involving DDL, Code and Data .Usually we take an expdp backup of the schema before the activity starts and later if something goes wrong with script deployment we'll revert to old state by dropping the schema and doing an impdp from the expdp backup.
    Question1.
    Can we do an RMAN tablespace only backup and if something goes wrong with script deployment can we drop the schema and the tablespace and then create an empty schema and then restore from the tablespace backup ?
    Question2.
    If the above is possible , can you explain how it is going to work out because we are essentially plugging (restore,recover) in a tablespace to the database. Any potential problems ?
    Question3. If the above (Question1) is possible, will restore/recover of this tablespace require a downtime for the entire DB ?

    Tom;
    If you are talking about RMAN TSPITR then yes you can. See - Purpose of RMAN TSPTIR in Backup and Recovery User's Guide E10642-03.
    The problem with TSPTIR is bulk. You need a lot of disk space to create a copy and then data pump the information out and back in. I just tested this on 11.2.0.3 and its slow. RMAN created a script which produced an AUX instance and did the data pump, but I had clean up afterwards. If it errors out you can have an AUX instance hanging out in the background.
    For TSPTIR you will need an area on the disk to server as an auxiliary destination large enough to hold what you are recovering plus the SYSTEM, UNDO and TEMP tablespaces.
    I would probably look at Transportable tablespaces as a possible option too.
    http://docs.oracle.com/cd/E25054_01/backup.1111/e10642/rcmttbsb.htm
    E10642-03 has a section for recovering a tablespace in chapter 2. The Tablespace must be offline, but the database can be up.
    This uses "restore tablespace" and "recover tablespace" commands. You would perform this type of recovery when you are say missing a datafile. You can recover any tablespace except SYSTEM and UNDO with this.
    Data Pump might be an option too, but given your tablespace size I would have worries about recovery time. Oracle lets you set compression
    and a limit to each file produced.
    expdp TABLESPACES=YOUR_DATA dumpfile=DATA_PUMP_DIR:ts_dumps_%U.dmp LOGFILE=DATA_PUMP_DIR:ts_dumps_log.log parallel=2 filesize=10G compression=ALL
    Given the size of your database a better option might be something like Data Guard as your recovery time would be brutal.
    Best Regards
    mseberg

  • Restoring a Rman Tablespace backup to noarchilog mode database

    Hi All,
    Is it possible to take a backup of a tablespace through rman from archivelog mode database and restore the same to noarchivelog mode database through rman ? Please suggest if it is not possible why it is not possible.
    We have a testing database from which a tablespace has been dropped. Can it be restored from the Prod database ?
    Please help. The database version is 9.2.0.8..

    Fabricio_Jorge wrote:
    I think it's possible to backup/restore a single tablespace:
    BACKUP TABLESPACE nome_tablespace [FORMAT 'path/bkp_file'];
    Being able to backup a single tablespace is NOT the same as grafting that TS into a different database.
    First, you are not really backing up a 'tablespace'. You are backing up files. In this case, just the files that implement the named TS, but files, nevertheless. And files belong to a database. Header info in each file defines, among other things, the dbid of the database the file belongs to. And the current scn. That will be a severe mis-match if you tried to 'restore' it to some other db.

  • 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

  • Can I plug in (restore) an RMAN tablespace backup into another DB ?

    11.2.0.3/AIX 6.1
    We accidently dropped a development DB without taking the latest expdp backup of an important schema. All the objects on this schema belonged to only one tablespace and we have the RMAN backup of that tablespace. Is there anyway we could recreate that schema by restoring the tablespace backup into another database ?

    Yes.
    Use the TRANSPORT TABLESPACE feature/method :
    http://oracle.su/docs/11g/backup.112/e10643/rcmsynta2021.htm
    Also check out sys.dbms_tts.transport_set_check
    RMAN> transport tablespace emp_data, emp_data2
               tablespace destination '/u01/app/oracle/oradata'
               auxiliary destination '/u04/app/oracle/oradata';If you need to check your endian format use this query :
    SELECT
      PLATFORM_NAME,
      ENDIAN_FORMAT
    FROM
      V$TRANSPORTABLE_PLATFORM;http://www.fadalti.com/oracle/database/how_to_transportable_tablespaces.htm
    http://husnusensoy.wordpress.com/2008/07/12/migrating-data-using-transportable-tablespacetts/
    Best Regards
    mseberg

  • Restore RMAN tablespace backup...

    Hi All,
    I have a RMAN backup of entire database, it has all oracle default TBS, controlfile, spfile etc. Now, I want to restore only one schema's tablespace so my first question it is possible to restore only one schema's tablespace. If yes, can you please guide me here?
    Thanks in advance.

    user12115 wrote:
    Hi Hemant,
    I want to restore tablesapce back to another database server. Can I have any suggestion for this scenario?
    Thanks...You cannot restore backup of one database to another database. You have options as
    1) restore entire database but skip tablespaces whatever you don't want (or) while restoring mention all the mandatory tablespaces with extra what tablespaces you want
    Because two databases incarnations / SCN are completely different.
    2) perform scheme export usin exp/expdp & import it.
    >
    Handle:     user12115  
    Status Level:     Newbie
    Registered:     Aug 10, 2005
    Total Posts:     332
    Total Questions:     105 (93 unresolved)
    >
    Your almost all questions are unanswered, looks sad that no one helpful to you... Please consider closing your threads and keep the forum clean.
    Edited by: CKPT on Jun 15, 2012 2:22 PM

  • Rman archive deletion script required

    hi
    i need a shell script which will delete archivelog using rman and will take backup of archivelog to specified location.DB 10gR2 OS RHEL 5 686.
    backup archivelog all to destination '/oracle/oracle/.Arch_bkp/';
    delete archivelog until 'sysdate-10';
    kind regards
    Edited by: no one on May 24, 2012 1:40 AM

    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

  • UNDO Tablespace backup- RMAN

    Hi Team/champions,
    I am confused in RMAN full DB backup why UNDO tablespce is included even we include the archive logs also.
    in Short ?
    why UNDO tablespace backup is required while taking RMAN backup ?
    Regards,
    Shitesh Shukla

    if I dont want to include the UNDO tablespce in my backup
    what if I took only database files backup excluding TEMP n UNDONOT an option. You have to include UNDO. 11g has optimization for backing up an Undo tablespace.
    In 10gR2 what you could do is
    1. Create a New Undo Tablespace
    2. Switch to the new Undo Tablespace
    3. verify that the Old Undo Tablespace is no longer in use -- confirm that there are no active transactions in undo segments in it
    4. drop the old Undo tablespace
    5. Run your RMAN Backup
    You run the risks of
    a. Waiting a long time at step 3
    b. ORA-1555s for users after you drop the Undo tablespace in step 4.
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

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

  • RMAN-06067: RECOVER DATABASE required with a backup or created controlfile

    Hi,
    DB:9.2.0.8
    OS: AIX 5.3
    I am restoring DB with until time(12/06/2012) for needed tablespaces.
    I restored the 12th date controlfile ,which is backed up with archivedlogs. I also have one more controlfile which backed up with full DB..
    Restore of tablespaces are completed..
    When recovery is going , failed with following error..
    allocated channel: c7
    channel c7: sid=22 devtype=SBT_TAPE
    channel c7: VERITAS NetBackup for Oracle - Release 5.1 (2006040520)
    allocated channel: c8
    channel c8: sid=21 devtype=SBT_TAPE
    channel c8: VERITAS NetBackup for Oracle - Release 5.1 (2006040520)
    executing command: SET until clause
    Starting recover at 23-06-2012 02:00:15
    released channel: c1
    released channel: c2
    released channel: c3
    released channel: c4
    released channel: c5
    released channel: c6
    released channel: c7
    released channel: c8
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 06/23/2012 03:36:57
    RMAN-06067: RECOVER DATABASE required with a backup or created controlfile
    RMAN>
    Restore Script:
    connect target /
    connect catalog rmanc/recom@lgn_rmanc
    run {
    allocate channel c1 type 'SBT_TAPE';
    allocate channel c2 type 'SBT_TAPE';
    allocate channel c3 type 'SBT_TAPE';
    allocate channel c4 type 'SBT_TAPE';
    allocate channel c5 type 'SBT_TAPE';
    allocate channel c6 type 'SBT_TAPE';
    allocate channel c7 type 'SBT_TAPE';
    allocate channel c8 type 'SBT_TAPE';
    allocate channel c9 type 'SBT_TAPE';
    allocate channel c10 type 'SBT_TAPE';
    allocate channel c11 type 'SBT_TAPE';
    allocate channel c12 type 'SBT_TAPE';
    set until time '12-06-2012 00:01:26';
    restore tablespace SYSTEM,UNDO_GEN01,UNDO_GEN02,TAB_80K_GENCON,TAB_25M_GENCON;
    release channel c1;
    release channel c2;
    release channel c3;
    release channel c4;
    release channel c5;
    release channel c6;
    release channel c7;
    release channel c8;
    release channel c9;
    release channel c10;
    release channel c11;
    release channel c12;
    Recover Script:
    connect catalog rmanc/recom@lgn_rmanc
    connect target /
    run {
    allocate channel c1 type 'SBT_TAPE';
    allocate channel c2 type 'SBT_TAPE';
    allocate channel c3 type 'SBT_TAPE';
    allocate channel c4 type 'SBT_TAPE';
    allocate channel c5 type 'SBT_TAPE';
    allocate channel c6 type 'SBT_TAPE';
    allocate channel c7 type 'SBT_TAPE';
    allocate channel c8 type 'SBT_TAPE';
    set until time '12-06-2012 00:01:26';
    recover tablespace SYSTEM,UNDO_GEN01,UNDO_GEN02,TAB_80K_GENCON,TAB_25M_GENCON;
    release channel c1;
    release channel c2;
    release channel c3;
    release channel c4;
    release channel c5;
    release channel c6;
    release channel c7;
    release channel c8;
    Any suggestion in this is helpful to me..
    Thanks in advance,

    Hello;
    I read your post and here's the thoughts that came to mind : ( my largest concern is you might restore something that damages your current system )
    1. So you want to restore the whole DB back to 12/06/2012 to get some tablespaces from then right?
    2. Are you restoring to a different system?
    3. How did you start the database ( NOMOUNT, MOUNT )
    4. If you are restoring the whole DB back to 12/06/2012 how did you restore the control file?
    5. Your command shows :
    restore tablespace SYSTEM,UNDO_GEN01,UNDO_GEN02,TAB_80K_GENCON,TAB_25M_GENCON;
    COMMENT : Generally I use recover tablespace for point in time recovery and use an auxilary destination.
    Meaning I don't use restore at all, in fact using restore may cause an issue.
    SUMMARY : I don't see how this will work as is.
    It seems you want data from five tablespaces from about six months ago including the SYSTEM tablespace.
    This is an Incomplete Recovery. I believe I would rethink this completely.
    Give the time that has past I would consider restoring the whole database to a different server where cannot damage anything.
    Once this is done I would decide how to get the data I need.
    Or I would check for a daily export file and recover the tablespace data that way.
    So you have some good details on your question but it seems the plan is either missing something or you need to add a few more details.
    Example
    I'm recovering old tablespaces into a test system.
    Here's how I'm not damaging my current production system.
    I don't have an export from that date.
    So take a step back and either rethink or give a few more details on how this is safe.
    Best Regards
    mseberg

  • Require backup script which deletes the daily backups after weekly backup

    Hi,
    I am new to Oracle administration. I require a backup script which will delete the daily backups (incremental) after weekly backup is taken (full database backup).
    Currently I use Oracle 10g for one of my production server.
    My backup strategy is given below.
    I would like to take full database backup weekly(online). To be precise, on Saturday.
    I need to have daily incremental backup and they should get deleted on Saturday after the weekly full database backup is taken.
    Also I would like to keep 4 weeks full backups. After that one by one we need to delete the backup.
    For example, if I have 4 weeks fullbackup of February, after taking full backup for first week of March, the backup of first week of February should get deleted.
    Kindly help with your suggestions.
    Thanks & Regards,
    Rafnas

    Hi,
    Thank you for pointing to the blog. It was very much useful.
    I was testing the backup strategy using your script. It worked fine for first set of daily backups.
    After weekly backup is taken, the daily backup script fails for taking the backup from next day onwards.
    It gives the following error stack.
    Starting backup at 05-MAR-09
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 03/05/2009 01:47:55
    ORA-01455: converting column overflows integer datatype
    Could you please let me know why integer datatype comes into picture while taking backup?
    Please advice.
    Thanks & Regards,
    Rafnas
    Edited by: user10698483 on Mar 5, 2009 3:38 AM

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • RMAN throwing errors during Tablespace Backup - RMAN-06004 and RMAN-06019

    Hi All.
    Please help me to fix trail of error message I'm getting while trying backup of a newly added tablespace in database. I'm using RMAN as a recovery method.
    Tablespace Name: test
    DB Version: Oracle 10g R1.
    OS: Red Hat Linux 5
    RMAN> report schema;
    Report of database schema
    List of Permanent Datafiles
    ===========================
    File Size(MB) Tablespace RB segs Datafile Name
    1 490 SYSTEM YES /u01/app/oracle/oradata/qrcl/system01.dbf
    2 25 UNDOTBS1 YES /u01/app/oracle/oradata/qrcl/undotbs01.dbf
    3 270 SYSAUX NO /u01/app/oracle/oradata/qrcl/sysaux01.dbf
    4 23 USERS NO /u01/app/oracle/oradata/qrcl/users01.dbf
    5 40 TEST NO /u01/app/test01.dbf
    List of Temporary Files
    =======================
    File Size(MB) Tablespace Maxsize(MB) Tempfile Name
    1 20 TEMP 32767 /u01/app/oracle/oradata/qrcl/temp01.dbf
    RMAN>
    RMAN> backup tablespace "test";
    Starting backup at 22-AUG-12
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 08/22/2012 11:57:13
    RMAN-06004: ORACLE error from recovery catalog database: RMAN-20202: tablespace not found in the recovery catalog
    RMAN-06019: could not translate tablespace name "test"
    RMAN> restore tablespace test;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "test": expecting one of: "double-quoted-string, identifier, single-quoted-string"
    RMAN-01007: at line 1 column 20 file: standard input
    I tried to update Catalog Server but still no luck:
    RMAN> RESYNC CATALOG;
    starting full resync of recovery catalog
    full resync complete
    Please Assist.
    Thanks
    Prashant Dixit

    Hello Prashant;
    The main issue is your tablespace name is an RMAN Reserved Word "Test"
    http://docs.oracle.com/cd/B13789_01/server.101/b10770/rcmcomma.htm#1006728
    Different test
    -- Create the tablespace
    CREATE TABLESPACE OTN_TEST DATAFILE
      '/u01/oradata/RECOVER2/test01.dbf' SIZE 1M AUTOEXTEND OFF
    LOGGING
    ONLINE;-- Create a user for the tablespace
    CREATE USER RMAN_TEST
      IDENTIFIED BY RMAN_TEST
      DEFAULT TABLESPACE OTN_TEST
      TEMPORARY TABLESPACE TEMP
      PROFILE DEFAULT
      ACCOUNT UNLOCK;
    ALTER USER RMAN_TEST QUOTA UNLIMITED ON "OTN_TEST";  -- Create a table in the tablespace
    CREATE TABLE RMAN_TEST.EMP
      EMPNO     NUMBER,
      ENAME     VARCHAR2(30 BYTE),
      JOB       VARCHAR2(30 BYTE),
      MGR       NUMBER,
      HIREDATE  DATE,
      SAL       NUMBER,
      COMM      NUMBER,
      DEPTNO    NUMBER
    TABLESPACE OTN_TEST;-- Add some data
    SET DEFINE OFF;
    Insert into RMAN_TEST.EMP
       (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
    Values
       (7369, 'SMITH', 'CLERK', 7902, TO_DATE('12/17/1980 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        800, 20, 0);
    Insert into RMAN_TEST.EMP
       (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
    Values
       (5000, 'NOCATALOG', 'DBA', 77902, TO_DATE('04/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        200, 0, 0);
    COMMIT;-- start RMAN and backup tablespace
    RMAN> BACKUP TABLESPACE OTN_TEST;
    Starting backup at 22-AUG-12
    starting full resync of recovery catalog
    full resync complete
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting full datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    input datafile file number=00007 name=/u01/oradata/RECOVER2/test01.dbf
    channel ORA_DISK_1: starting piece 1 at 22-AUG-12
    channel ORA_DISK_1: finished piece 1 at 22-AUG-12
    piece handle=/u01/app/oracle/flash_recovery_area/RECOVER2/backupset/2012_08_22/o1_mf_nnndf_TAG20120822T080711_839pczng_.bkp tag=TAG20120822T080711 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
    Finished backup at 22-AUG-12
    Starting Control File and SPFILE Autobackup at 22-AUG-12
    piece handle=/u01/app/oracle/flash_recovery_area/RECOVER2/autobackup/2012_08_22/o1_mf_s_791971633_839pd1bm_.bkp comment=NONE
    Finished Control File and SPFILE Autobackup at 22-AUG-12
    Note
    If you dropped the tablespace then you need to recover the database to a point in time, not the tablespace.
    Best Regards
    mseberg

  • 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

Maybe you are looking for

  • How do I move a video clip from one event folder to another?

    Today I imported a bunch of old VHS based analog videos. I imported them all into one event library folder. Now I want to move some of the clips into a new event folder so I can keep all the folders properly organized with what is in them. When I hig

  • Disk Utility shows 0,00 Bytes (0 Bytes) for 2.73 TB Array

    I have an Xserve Raid connected to an Xserve G4 dual 1GHz 10.2.8 Server. I have had a 700 Meg Raid 5 volume for several years with no problems. I just purchased 7 500 GB ADMs to add to the second controller. I first upgraded the firmware to "firmware

  • Using Swiftmq as the third-party Jms provider in Weblogic11

    Hi, I am using swiftmq as 3rd-party jms provider in wls, however when I am trying to deploy a MDB listening on the queue configed in swiftmq.rar (resource adapter) in wls, it warns that ***MDB is unable to connect to the JMS destination: myforeigndes

  • Shockwave download limit from a php file ?

    i have wierd problem i work with getnettext(" http://www.pbs.org/pov/borders/2004/sas21/flowers.php?") i can receive the information, about 100k of text, in the director environment but when i call from shockwave in a browser it'll not get the inform

  • Query to find the Base tables of views

    Hi, Can you pl let me know the query to find the base tables on which the view is based.I looked into views like ci_view_definitions but i could not find them. Thanks for your help thanx, Suji.