RMAN Backup Script Error

Hi ,
I am getting the following error when i am executing manbackup shell script.
Message file RMAN<lang>.msb not found
Verify that ORACLE_HOME is set properly
RMAN Script
DATE=`date +%Y%m%d.%H%M`
#su - oracle
#<<EOF
export ORACLE_HOME=/home/app/oracle/product/10.2.0/db_1
echo $ORACLE_HOME
export PATH=$PATH:$ORACLE_HOME/bin
#export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=ACILOC
echo $ORACLE_SID
rman cmdfile=/oraclebkp/rmanbackupscripts/rmanlevel0bkp.bck log=/oraclebkp/rmanbackupscripts/rmanACILOClev0$DATE.log
export ORACLE_SID=ACIDC
echo $ORACLE_SID
rman cmdfile=/oraclebkp/rmanbackupscripts/rmanlevel0bkp.bck log=/oraclebkp/rmanbackupscripts/rmanACIDClev0$DATE.log
#EOF
level0bkp.bck
connect target `/'
run
backup incremental level 0 database;
but I am able to take RMAN backups by connecting as RMAN TARGET /
Thanks in advance
Priya

connect target `/'Dont give / in quotations just connect as
connect target /
backup incremental level 0 database;
}Thanks
Close the threads as answered if helpful/correct.
user11342455
Handle: user11342455
Status Level: Newbie
Registered: Feb 18, 2010
Total Posts: 22
Total Questions:  10 (8 unresolved)
Edited by: CKPT on Jan 5, 2011 12:17 PM

Similar Messages

  • 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

  • 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/PERL scripts errors

    I am trying to automate the backups and disk maintenence on a test machine using a "Host Command" in the 10g EM environment. If I run the script from the command on the target host the scripts completes successfully.
    This is the script:
    ORACLE_HOME=/u01/app/oracle/product/9.2.0
    export ORACLE_HOME
    ORACLE_SID=coeusdba.
    export ORACLE_SID
    rman <<EOF
    connect target sys<password>@coeusdba;
    connect catalog <user>/<password>@recv;
    replace script coeusdba_full_bkp { 
    allocate channel Channel1 type disk format '/u03/orabkp/coeusdba/b_%u_%p_%c';
    backup
    ( database include current controlfile );
    backup ( archivelog all delete input );
    run { execute script coeusdba_full_bkp;}
    EOF
    /u01/app/oracle/product/9.2.0/dbs/scripts/coeusdba_new.sh
    exit
    When I execute the same script from a 10g EM "Host Command" job the script fails at the PERL command step with the following output:
    Recovery Manager: Release 9.2.0.7.0 - Production
    Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
    RMAN>
    RMAN>
    connected to target database: COEUSDBA (DBID=1916078485)
    RMAN>
    RMAN>
    connected to recovery catalog database
    RMAN> 2> 3> 4> 5> 6> 7> 8>
    replaced script coeusdba_full_bkp
    RMAN>
    RMAN>
    executing script: coeusdba_full_bkp
    allocated channel: Channel1
    channel Channel1: sid=10 devtype=DISK
    Starting backup at NOV-01-2005 10:32:32
    channel Channel1: starting full datafile backupset
    channel Channel1: specifying datafile(s) in backupset
    including current controlfile in backupset
    input datafile fno=00006 name=/u02/oradata/coeusdba/users01.dbf
    input datafile fno=00002 name=/u03/oradata/coeusdba/undotbs01.dbf
    input datafile fno=00004 name=/u03/oradata/coeusdba/index01.dbf
    input datafile fno=00005 name=/u03/oradata/coeusdba/tools01.dbf
    input datafile fno=00007 name=/u03/oradata/coeusdba/xdb01.dbf
    input datafile fno=00001 name=/u02/oradata/coeusdba/system01.dbf
    input datafile fno=00003 name=/u02/oradata/coeusdba/drsys01.dbf
    channel Channel1: starting piece 1 at NOV-01-2005 10:32:33
    channel Channel1: finished piece 1 at NOV-01-2005 10:33:28
    piece handle=/u03/orabkp/coeusdba/b_3rh2l4q1_1_1 comment=NONE
    channel Channel1: backup set complete, elapsed time: 00:00:55
    Finished backup at NOV-01-2005 10:33:28
    Starting backup at NOV-01-2005 10:33:29
    current log archived
    channel Channel1: starting archive log backupset
    channel Channel1: specifying archive log(s) in backup set
    input archive log thread=1 sequence=49 recid=200 stamp=573215609
    channel Channel1: starting piece 1 at NOV-01-2005 10:33:32
    channel Channel1: finished piece 1 at NOV-01-2005 10:33:33
    piece handle=/u03/orabkp/coeusdba/b_3sh2l4rr_1_1 comment=NONE
    channel Channel1: backup set complete, elapsed time: 00:00:02
    channel Channel1: deleting archive log(s)
    archive log filename=/u04/arch/coeusdba/1_49.dbf recid=200 stamp=573215609
    Finished backup at NOV-01-2005 10:33:35
    Starting Control File and SPFILE Autobackup at NOV-01-2005 10:33:35
    piece handle=/u04/orabkp/coeusdba/ctl_file_bkps/c-1916078485-20051101-00 comment=NONE
    Finished Control File and SPFILE Autobackup at NOV-01-2005 10:33:38
    released channel: Channel1
    RMAN>
    RMAN>
    Recovery Manager complete.
    syntax error at /u01/app/oracle/product/9.2.0/EM10g_1/perl/lib/5.6.1/warnings.pm line 306, near "{^"
    syntax error at /u01/app/oracle/product/9.2.0/EM10g_1/perl/lib/5.6.1/warnings.pm line 311, near "{^"
    BEGIN failed--compilation aborted at /u01/app/oracle/product/9.2.0/EM10g_1/perl/lib/5.6.1/English.pm line 38.
    BEGIN failed--compilation aborted at /u01/app/oracle/product/9.2.0/dbs/scripts/rmanc.pl line 20
    Is anyone having this problem in 10g and if so , can you provide me with some insight with respect to resolution?

    The .sh script calls a perl script that parses the output of the report obsolete command in rman and deletes the obsolete datasets from disk. This shell completes from the command line with no errors. Here is the .sh and the perl script. Like I said the odd thing is that this shell executes successfully from the command line. Thanks for your interest in looking at this.
    cat coeusdba_new.sh
    /u01/app/oracle/product/9.2.0/dbs/scripts/rmanc.pl target sys/<password>@coeusdba catalog rmantest/<password>@recv redundancy 2
    rmanc.$ cat rmanc.pl
    #!/usr/bin/perl -w
    # NAME
    # rmanc.pl - delete obsolete backups and copies
    # DESCRIPTION
    # This perl script automates deletion of obsolete datafilecopies and
    # backup pieces. It uses perl strin manipulation to process the output of the RMAN
    # "report obsolete" command and creates rm commands to delete the files
    # NOTES
    # Some customization is necessary.
    # Adapted from Oracle 8i rman1.sh Unix shell script.
    # benmalek 03/08/2003 - Modified to delete backup sets and datafilecopies only
    # Does not touch backup records.
    use strict;
    #use English;
    #$ENV{ORACLE_OWNER}='oracle';
    #$ENV{ORACLE_HOME}='/disk01/app/oracle/product/9.2.0';
    $ENV{NLS_DATE_FORMAT}='DD-MON-YYYY:HH24:MI:SS';
    &PrintEnv;
    sub Usage {
    my ($arg1, @arg2) = @_;
    my $base_name = `basename $0`;
    chop($base_name);
    CASE: {
    if (!defined($arg1)) {last CASE; }
    if ($arg1 =~ /\S/) {print ("\nUnknown argument or incorrect value for: $arg1\n\n"); last CASE; }
    my $example1 = 'rmanc.pl target sys/orclpass@orcl catalog rman/rmanpass@rec redundancy 5';
    my $example2 = 'rmanc.pl target sys/orclpass@orcl nocatalog redundancy 5';
    my $usage_txt =
    " Usage: $base_name [option] ...
    option: [target CNCTSTR] [catalog CNCTSTR | nocatalog] [params 'PARMS'] [redundancy NUMBER]
    Option Description
    target CNCTSTR Connect to the target db using CNCTSTR.
    catalog CNCTSTR Connect to catalog db using CNCTSTR.
    nocatalog Don't use a recovery catalog.
    parms 'PARMS' Use PARMS string for SBT_TAPE maintenance channel.
    You can use single or double quotes depending on
    your needs. In the rman script, single-quotes
    will be used.
    redundancy NUMBER Set redundancy of backups to NUMBER.
    The catalog or nocatalog option must be specified. All others are optional
    The target option must also be specified
    Examples:
    $example1
    $example2 ";
    print ("$usage_txt \n");
    die "Exiting subroutine 'Usage'.\n";
    # Initialize default connect string variables:
    my $target=""; # force user to supply target option
    my $catalog=""; # force user to supply catalog option;
    my $parms="";
    my $redun=""; # force user to supply redundancy option;
    # process target and catalog arguments
    my $args = @ARGV;
    while ( $args > 0 ) {
    ARGS: {
    if (($ARGV[0] eq "target") && defined($ARGV[1]))
    {$target="$ARGV[0] $ARGV[1]"; shift(@ARGV); last ARGS;}
    if (($ARGV[0] eq "catalog" || $ARGV[0] eq "rcvcat") && defined($ARGV[1]))
    { $catalog="$ARGV[0] $ARGV[1]"; shift(@ARGV); last ARGS;}
    if ($ARGV[0] eq "nocatalog") { $catalog="$ARGV[0]"; last ARGS;}
    if (($ARGV[0] eq "parms") && defined($ARGV[1])) { $parms = "$ARGV[0] $ARGV[1]"; shift(@ARGV); last ARGS;}
    if (($ARGV[0] eq "redundancy") && defined($ARGV[1]) && !($ARGV[1] =~ /\D/))
    {$redun=$ARGV[1]; shift(@ARGV); last ARGS;}
    &Usage($ARGV[0]);
    shift(@ARGV);
    $args= @ARGV;
    if ((!defined($catalog) || $catalog eq "") || (!defined($target) || $target eq "") || (!defined($redun) || $redun eq "" )) {&Usage;}
    #print (" target=$target \n catalog=$catalog \n parms=$parms \n redundancy=$redun\n");
    # Get a list of obsolete disk files to delete:
    my @rman_out=`rman $target $catalog << EOF
    report obsolete redundancy=$redun device type disk;
    exit;
    EOF`;
    # debug
    print ("############################################\n");
    print ("Output of REPORT OBSOLETE REDUNDANCY=$redun\n");
    print @rman_out;
    print ("############################################\n");
    #my $command = `rman $target $catalog << EOF
    # report obsolete redundancy=$redun device type disk;
    # exit;
    # EOF"
    #open (RMAN, "$command |" );
    #my @rman_out=<RMAN>;
    # Extract the names of the obsolete files to delete
    my $line;
    my @files;
    my @dates;
    my @pieces;
    foreach $line (@rman_out) {
    if (($line =~ /Backup Piece/) && ($line =~ /\S/)) {
    my @fields=split (/\s+/, $line);
    my $nelem=@fields;
    push(@pieces, $fields[$nelem-3]);
    push(@dates, $fields[$nelem-2]);
    push(@files, $fields[$nelem-1]);
    # Verify files exists
    my $i=0;
    foreach $line (@files) {
    if (-e $line) {
    print ("Deleting backup piece or file copy: $pieces[$i] $dates[$i] $line\n");
    system("rm $line");
    } else {
    # print ("file $line does not exist. \n");
    $i = $i + 1;
    sub PrintEnv{
    my $var;
    foreach $var (sort keys %ENV) {
    print "$var: \"$ENV{$var}\".\n"
    pl

  • Rman backup script suggestion

    Hi,
    I have script bellow. I want to run in one script on linux as shell script: how can i do that. i have very limited knowledge about it:
    setenv TNS_ADMIN "/location/network/admin"
    setenv ORACLE_HOME "/location/db1"
    setenv TWO_TASK "DB1"
    setenv ORACLE_SID "DB1"
    rman run {
    # Shutdown database for backups and put into MOUNT mode
    shutdown immediate
    startup mount
    # Allocate channel. Important: This must be done after
    # database has been mounted!!!
    allocate channel t1 DEVICE TYPE DISK FORMAT '/backuplocation/DB1RMAN/%U' ;
    # Perform full database backup
    backup Database format '/backuplocation/DB1RMAN/%d_FULL_%U.bck';
    # Open database after backup complete
    sql 'alter database open';
    sql 'ALTER DATABASE BACKUP CONTROLFILE TO TRACE';
    release channel t1;
    }

    user12020966 wrote:
    Hi,
    I have script bellow. I want to run in one script on linux as shell script: how can i do that. i have very limited knowledge about it:
    setenv TNS_ADMIN "/location/network/admin"
    setenv ORACLE_HOME "/location/db1"
    setenv TWO_TASK "DB1"
    setenv ORACLE_SID "DB1"
    rman run {
    # Shutdown database for backups and put into MOUNT mode
    shutdown immediate
    startup mountWhy the shutdown? are you running in norachivelog mode?
    # Allocate channel. Important: This must be done after
    # database has been mounted!!!
    allocate channel t1 DEVICE TYPE DISK FORMAT '/backuplocation/DB1RMAN/%U' ;Above not needed if you set it as part of the rman config:
    oracle> rman target /
    rman> CONFIGURE DEFAULT DEVICE TYPE TO DISK FORMAT '/backuplocation/DB1RMAN/%U';
    # Perform full database backup
    backup Database format '/backuplocation/DB1RMAN/%d_FULL_%U.bck';Your use of "format" is redundant with your channel allocation.
    # Open database after backup complete
    sql 'alter database open';
    sql 'ALTER DATABASE BACKUP CONTROLFILE TO TRACE';No need to shell out to sql. those commands are accepted directly by rman.
    RMAN> startup mount;
    connected to target database (not started)
    Oracle instance started
    database mounted
    Total System Global Area     285212672 bytes
    Fixed Size                     1267068 bytes
    Variable Size                146803332 bytes
    Database Buffers             134217728 bytes
    Redo Buffers                   2924544 bytes
    RMAN> alter database open;
    database opened
    RMAN>
    release channel t1;
    }I'd strongly suggest you go to amazon.com and look up the books on rman backup and recovery by Hart and Freeman. You are making waaay too much work for yourself.

  • Rman Backup time error

    Today i saw this error in our production backup time .
    Please let me know how to leave out from this.
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup plus archivelog command at 05/27/2011 01:13:47
    RMAN-03009: failure of backup command on ORA_DISK_2 channel at 05/27/2011 01:10:52
    ORA-19566: exceeded limit of 0 corrupt blocks for file
    N:\USERS01.DBF
    Regs,
    Brij

    Also, be aware that rman: backup validate (check logical) command could not show the corrupted blocks if that block are newer used(or used before, but freed later for example). In this case, rman validate does not populate V$database_block_corruption but it also does not allows you to continue with your backup.
    So the solution will be, as previous posters said, either set the limit for the sustained number of corrupted blocks or format/repair the corrupted block.
    For checking the corrupted blocks you could also use db verify utility(dbv). This will definitely show you the details about corrupted blocks, even they are not used ever.

  • Oracle 9i Rman backup script !!

    hi,
    We are taking rman backup level 0. While making this backup the backup size is very big i.e. let's suppose if DB size is some 100GB then backup size would be somewhere around 60-70 GB. I need to know , does anybody having any script which compresses the backup sets after they get generated during the backup i.e. lets suppose 10 backup sets get generated, what I need to know is when RMAN is generating lets say 2 backup can we compress 1st backupset and so on like when 3rd backup set is getting generated we compress the 2nd backupset and so on till 10th backup set.
    Let me know if anybody needs more information on this...I know it's a typical requirement :o))

    hello Hamir,
    what operating system are you working on
    after the backup you could call a routine in unix to gzip file_name
    or in windows to use winzip.
    however in 9i to restore the database you would then need to unzip the files first.
    what possibility do you have to upgrade to 10g, this has the ability to automatically compress the backup set from within RMAN.
    rgds
    alan

  • RMAN Backup script for RAC Database..please suggest

    Hi All,
    I am currently working on backup policy for RAC Database for my client.The client requirement is to backup while database is shutdown(mount state).I have made below script and could any one please suggest what further things should I need to add with below rman script.
    echo "Shutdown Database";date
    srvctl stop database -d PROD
    srvctl status database -d PROD
    echo "Database shutdown on";date
    echo "Mount Database ";date
    srvctl start instance -d PROD -i "PROD1" -o mount
    srvctl status database -d PROD
    echo "Start Full Database Backup on";date
    $ORACLE_HOME/bin/rman target / nocatalog <<EOF
    configure controlfile autobackup on;
    configure controlfile autobackup format for device type disk to '/BACKUP/PRODBKP/%F';
    run{
    allocate channel c1 device type disk connect 'sys/******@node1-vip:1521/PROD';
    allocate channel c2 device type disk connect 'sys/*****@node2-vip:1521/PROD';
    backup format '/BACKUP/PRODBKP/PROD_df_%t_%s_%p.bak'(database);
    backup format '/BACKUP/PRODBKP/archive_%t_%s_%p.bak' archivelog all;
    copy current controlfile to '/BACKUP/PRODBKP/PROD.ctl';
    delete noprompt obsolete;
    release channel c1;
    release channel c2;
    exit
    EOF
    echo "RMAN Backup Finished on";date
    echo "Shutdown Database";date
    srvctl stop database -d PROD
    echo "Start Database";date
    srvctl start database -d PROD
    srvctl status database -d PROD
    Please share your experiences.
    Regards

    Hi,
    Some tweaks for your script.
    echo "Shutdown Database";date
    srvctl stop database -d PROD
    srvctl status database -d PROD
    echo "Database shutdown on";date
    echo "Mount Database ";date
    srvctl start instance -d PROD -i "PROD1" -o mount1. If you database does not shutdown properly , does your script stops the execution of next step?
    2. configure controlfile autobackup on;
    configure controlfile autobackup format for device type disk to '/BACKUP/PRODBKP/%F';(Why you need to configure this every time) ?
    It's persistent at db level one time setting (until some other script changes the settings by other dba - else remove that - set the configuration at db level once for all)
    - Pavan Kumar N
    3.

  • Rman backup validate error

    DBGSQL: RCVCAT> begin dbms_rcvman.findSpfileBackup( allCopies => TRUE, rmanCmd => dbms_rcvman.restoreCmd_t); end; [10:37:16.635]
    DBGSQL: sqlcode = 6550 [10:37:16.635]
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00601: fatal error in recovery manager
    RMAN-03012: fatal error during compilation of command
    RMAN-03028: fatal error code for command restore : 600
    RMAN-00600: internal error, arguments [9302] [6550] [begin dbms_rcvman.findSpfileBackup(        allCopies  => TRUE,        rmanCmd => dbms_rcvman.restoreCmd_t); end; ] [] []
    RMAN-06004: ORACLE error from recovery catalog database: ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'FINDSPFILEBACKUP'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    pls any one help me out
    Thanks!

    Since you say nothing about your OS and database version and we also don't know,which command produces this error, only a vague guess is possible, COULD be
    Bug 7633694: RESTORE SPFILE LS-00306: WRONG NUMBER OR TYPES OF ARGUMENTS 'FINDSPFILEBACKUP' .
    IF this bug is hit possible workarounds are:
    1) Don't use a 11gR1 catalog
    2) don't use spfile,keep a text based pfile
    3) upgrade to 11gR2 (IF your OS is Linux or Solaris)
    Werner

  • Generate RMAN backup Script using unix shell script

    Hello,
    Could somebody give me a unix shell script that would generate RMAN script based on some user defined parameters in a config file.
    e.g.
    rman.conf
    CHANNELS=4
    USE_CATALOG=Y
    DEVICE='sbt_tabe'
    etc.,
    many thanks,
    kam

    You can actually encapsulate the RMAN commands inside the shell script.
    However if you really want to create a seperate RMAN script file, you can use the unix shell's "echo" command to write set variables to a file.
    Thus, for example,
    echo "rman target / catalog rman/rmanpassword@crcat" > RMAN_Script.rmn
    echo "backup database plus archivelog" >> RMAN_Script.rmn
    echo "backup archivelog all" >> RMAN_Script.rmn
    creates RMAN_Script.rmn with 3 commands.

  • RMAN Backup Script Help

    Hi,
    We currently have an RMAN script that runs nightly to backup the database, including the archivelogs and purge. We are using flashback and would like to keep the archivelog available for 3 days.
    I changed this:
    backup check logical as compressed backupset archivelog all format '${RMAN_DIR}/%d_ARC_%Y%M%D_%s_%p'
    delete input;
    To this:
    backup check logical as compressed backupset archivelog until time 'sysdate-3' format '${RMAN_DIR}/%d_ARC_%Y%M%D_%s_%p'
    delete input;
    I changed "all" to "until time 'sysdate-3'" and want to confirm this before I do anything. Thanks.

    Kamran's video would clear you everything.
    I just want to add few quick steps from my side.
    Step1.Make sure RMAN is connected to the right target database and the recovery catalog.
    Then run the CREATE SCRIPT command, as shown in this example:
    CREATE SCRIPT full_bkup
    allocate channel ch1 type disk format '/backups/rman/%n%M%D%Y%s%U.bak' maxpiecesize 4G;
    sql 'alter system archive log current';
    sql 'alter system switch logfile';
    backup incremental level 0 tag=rman_10 filesperset=5 database include current controlfile;
    sql 'alter system archive log current';
    sql 'alter system switch logfile';
    release channel ch1;
    Step2.Create a shell script rman_bkup_10g.ksh as below and initiate execution of the above script from this shell script.
    rman target sys/sys-pwd@tgt-db-conn-str catalog rman/rman-pwd@rec-cat-conn-str
    run {execute script *full_bkup*;}
    exit
    Step3.Schedule the shell script rman_bkup_10g.ksh in crontab as below(The example shows,the shell script gets executed everyday at 05:30)
    30 05 * * * /path/to/script/rman_bkup_10g.ksh >> /path/to/log/rmanbkup.log
    You may please tailor the scripts as per your need.
    Edited by: bharathDBA on Aug 8, 2011 3:27 AM
    Edited by: bharathDBA on Aug 8, 2011 3:52 AM
    Edited by: bharathDBA on Aug 8, 2011 3:54 AM

  • Rman backup scripts

    Hi, I am inquiring as to how to create a job to run an rman script without using the Enterprise manager to schedule and create the job.
    Thanks
    James

    You are going to want to at least set the following RMAN parameters. You may need to set other depending on your environment.
    RETENTION POLICY
    CONTROLFILE AUTOBACKUP ON
    CONTROLFILE AUTOBACKUP FORMAT
    PARALLELISM
    CHANEL DEVICE TYP FORMAT
    SNAPSHOT CONTROLFILE NAME
    Below is an example of how I have these set on a test system. This from a 10g database
    RMAN> show all;
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
    CONFIGURE BACKUP OPTIMIZATION OFF; # default
    CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backup/ecmtst/%F';
    CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backup/ecmtst/%U';
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/backup/ecmtst/snapcf_ecmtst1.f';
    RMAN>

  • RMAN backup script

    OS windows 2000 server
    database 9i
    I am planning following script for backup of database.
    run{
    allocate channel ch1 type disk;
    backup
    format 'E:\oracle\backup\/%d_%s'
    database plus archivelog delete input;
    release channel ch1;
    Want to overwrite the backup on every sunday on disk.
    1.What changes should I make in script so that RMAN should not create new file
    and overwrite older one.

    Thanks.
    Now I can schedule backup job through above script.
    With this script
    run{
    allocate channel ch1 type disk;
    backup
    format 'E:\oracle\backup\/%d_%s'
    database plus archivelog delete input;
    release channel ch1;
    and CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
    I want to delete obsolete backup
    run{
    allocate channel ch1 type disk;
    backup
    format 'E:\oracle\backup\/%d_%s'
    database plus archivelog delete input;
    delete obsolete;
    release channel ch1;
    It is not working as delete obsolete command asks for confirmation (YES/NO)?
    How to do it ?

  • RMAN backup Scripts: Please Check and Advice

    Dear All
    We are now upgrading our database from 9iR2 to 10gR2.
    Before this process we want a full database backup with RMAN with the following scrips. I also included our current database configuration.
    So, dear all gurus please check this process if any thing goes wrong and give some valuable advice for better performance and other issue.
    ===========================================================
    /data01          400GB
    /data02      400GB
    /data03          400GB
    /idx04          400GB
    Current Tablespace Used Size= 1700GB
    Total Tablespace=31
    Total File=295
    Max File Size= 15GB
    Avg File Size= 9GB
    CPU_COUNT=4
    Memory=32GB
    sqlplus /nolog
    conn /as sysdba
    --configured database in archivelog mode.  Then
    create user rman identified by pass default tablespace INDX tempprary tablespace temp;grant connect,resource,RECOVERY_CATALOG_OWNER to RMAN;
    RMAN target rman/rman@dwh nocatalog
    RMAN>configure channel device type disk maxpiecesize=64GB;
    RMAN>configure channel device type disk maxsetsize=195GB;
    RMAN>configure channel device type disk parallelism=4;
    RMAN>run { 
    allocate channel Channel1 type disk format '/data01/oracle/rman_backup/DWH_df_%s_%p_%c';
    allocate channel Channel2 type disk format '/data02/oracle/rman_backup/DWH_df_%s_%p_%c';
    allocate channel Channel3 type disk format '/data03/oracle/rman_backup/DWH_df_%s_%p_%c';
    allocate channel Channel4 type disk format '/idx01/oracle/rman_backup/DWH_df_%s_%p_%c' ;
    backup as compressed backupset database plus archivelog;
    backup current controlfile format '/idx01/oracle/rman_backup/DWH_cf_%U.f';
    backup spfiel format '/idx01/oracle/rman_backup/DWH_spf_%U.f';
    release channel Channel1;
    release channel Channel2;
    release channel Channel3;
    release channel Channel4;
    ===========================================================
    Thanks & Regards
    Quazi Abdur Rab

    Try this ...
    RUN {
    RECOVER COPY OF DATABASE WITH TAG 'incr_backup' UNTIL TIME 'SYSDATE - 7';
    BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'incr_backup' DATABASE;
    The RECOVER COPY... line will not do anything until the script has been running for more than 7 days. The BACKUP INCREMENTAL line will perform a complete backup (level 0) the first day it is run, with all subsequent backups being level 1 incremental backups. After 7 days, the RECOVER COPY... line will start to take effect, merging all incremental backups older than 7 days into the level 0 backup, effectively moving the level 0 backup forward. The effect of this is that you will permanently have a 7 day recovery window with a 7 day old level 0 backup and 6 level 1 incremental backups. Notice that the tag must be used to identify which incremental backups apply to which image copies

  • Rman backup error: ORA-19502

    I am running a rman backup script with incremental 1 level as
    backup as backupset incremental level 1 cumulative device type disk tag 'Baan_bkup$LEVEL_0' database;
    recover copy of database;
    backup device type disk tag 'Baan_bkup$LEVEL_0' archivelog all not backed up;
    backup archivelog until time 'sysdate-6' delete all input;
    delete noprompt obsolete device type disk;
    It has run almost two weeks and last night it showed this error and failed
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/08/2006 03:02:14
    ORA-19502: write error on file "/dbrecovery/flashback/goi1rkdm_1_1", blockno 164865 (blocksize=8192)
    ORA-27072: File I/O error
    Additional information: 4
    Additional information: 164865
    Additional information: 782336
    Linux Error: 2: No such file or directory
    I checked the df -k and I still have about 6% space in my /dbrecovery disk, a separated space, and I did not find the file indicated either. So was still possible the space is full? or others reason?
    I used the "delete obsolete"command in rman but nothing can be deleted.

    It seems your filesystem cannot handle large files (> 2G). Use 'maxpiecesize' option of 'allocate channel' command to limit the filesize.
    Werner

Maybe you are looking for

  • Canon .MXF footage - should I transcode it? What to?

    I've got some footage recorded from a Canon XF105. It's 1920x1080 and it's 3D - so there's a pair of files for each clip. In AE it plays frustratingly slowly and I have to do a RAM render to see it at full speed. In Premiere it plays ok. Is there a f

  • How do i get pre recorded video or film on to my G5 ipod?

    having just purchased a new 80gb video ipod i couldnt wait to get home to put episode five of 24 on. however when i put a video into my G5 imac idvd opens that's fine if i want to watch it but how do i get the content of my videos into itunes so that

  • Disappearing styles

    I have a problem. I have an Indesign CS4 book set up with five different documents. The book has two separate tables of contents that draw from across the five documents on the basis of heading styles.  The first table of contents picks up headers le

  • Installatioin of BWI and R/3 on same machine.

    Hi, I installed BWI on a server. If i like to install R/3 on same machine, then do I need to again install Central instance or Just Database instance? When I install BWI, I installed first the central instance and then database instance and now when

  • What size for capturing?

    Hi, I'm going to create video podcast showing people how to use software. What capture size shall I use? Is 1024x768 too big? What do people normally use?