Rman script execution

Dear all,
am deleting the obsolete rman backups using the following command :
rman
allocate channel for maintenance type disk;
delete obsolete for channel type disk;
release channel;
am running this inside the script ...this script is getting stucked up in the middle as it is asking for a confirmation from the user to delete
the obsolete backups (i.e the user has to enter Yes/No to delete this obsolte backups).. how can I overcome this.. The script should automatically delete all the backups without any user interaction
Any idea ?
Kai

It is important to specify the oracle version you are currently working with, there was a known bug at 9.2.0.7.0 which was fixed on 9.2.0.8.0 which aborted the rman process when the report obsolete or the delete obsolete commands were issued.
~ Madrid
http://hrivera99.blogspot.com

Similar Messages

  • Error with dbms_scheduler and shell script execution

    Hi,guys.
    I have an issue with a dbms_scheduler and a shell script execution. So, the shell script as it self works fine, when i'm executing ./test.sh all process is running, but when i'm executing the script from dbms_scheduler it just simply doesn't work. Actually it works, but some of executable information in sh doesn't work, seems it just jump over of the part of the script. Sendmail part is running, maybe there is problem with rman script as it self?
    DB version: 10g
    And my scripts:
    Shell scripts (permisons 755):
    #!/bin/ksh
    export PATH=/home/oracle/product/asm_home/bin:/home/oracle/product/db_home/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/oracle/bin:/usr/bin/X11:/sbin:.
    export ORACLE_BASE=/home/oracle/product
    export ORACLE_SID=zabbix
    export ORACLE_HOME=/home/oracle/product/db_home
    ${ORACLE_HOME}/bin/rman<<EOF
    connect target /
    run {backup recovery area delete all input;}
    EOF
    {       echo "From:[email protected]"
            echo "To: [email protected]"
            echo "Subject: Recovery area"
            echo 'Content-Type: text/html'
            echo
            echo '<html><body><table border="1" cellspacing="1">'
            echo '<tr><td><b>Process</b></td><td><b>Statuss</b></td></tr>'
            echo "<tr><td>RMAN</td><td><b>Works</b></td></tr>"
            echo "</table></body></html>"
    } | sendmail -tIn the first part i'm exporting all of the important stuff for oracle, then I call RMAN with specific atributes. And then there is just simply sendmail functionality inside script to represent if script works (for now).
    And below pl/sql script:
    begin
      DBMS_SCHEDULER.CREATE_JOB
      job_name => 'FLASH_RECOVERY',
      job_type => 'EXECUTABLE',
      job_action => '/home/oracle/backup/test.sh',
      start_date => sysdate,
      job_class => 'DEFAULT_JOB_CLASS',
      enabled => TRUE,
      auto_drop => FALSE,
      comments => 'FLASH RECOVERY USAGE AREA backup and delete'
      END;
      /And this job execution:
           begin
               DBMS_SCHEDULER.run_job (job_name =>'FLASH_RECOVERY',use_current_session => TRUE);
           end;What can be wrong? For me, I think it's something with permisions.
    I hope you got my idea and could help me.
    Tom
    Edited by: safazaurs on 2013.18.2 22:16

    There is no error, i just receive all the time e-mail, seems it jumps over rman. I tried almost everything and still couldn't get result as i want. And, if i'm running script from command line - it works. Rman calls, and starts to recover archivelogs.

  • Using scheduler to directly execute rman script stored in recovery catalog

    Hi everyone, I usually automate my rman backups using either cron or dbms_scheduler to call my rman scripts stored in a NIX sh file.  Everything works fine but does anyone know how/if it's possible to call an rman script stored in the recovery catalog. Lets say I create a script in the catalog:
    RMAN> create script showall
    comment 'just an example for demonstration'
    SHOW ALL;
    Can I use dbms_scheduler to call that script directly? If so how and if not then how can I schedule this or any catalog stored script stored in the rman catalog.  Searched all over the place but everything seems to point to having to leave Oracle to call either a .sh or .bat file.
    Regards,
    Dave

    Hi Greg, think you are definately on the right track mate.  Based on what you put I found this at:
    http://www.oracle-base.com/articles/12c/scheduler-enhancements-12cr1.php
    It has the entire rman script in the pl/sql block but going to see if I can modify what's on that page and use what you put so instead of executing the entire script it will run something like:
    BEGIN
    DBMS_SCHEDULER.CREATE_JOB(
    job_name => 'RMAN_SHOW_ALL',
    job_type => 'EXECUTABLE',
    job_action => 'RMAN TARGET / CATALOG rman/password@ your_cat run {execute script showall;}'
    END;
    Or something similar with times etc for execution if possible as the mechanics are the same. Believe though that using the job_action parameter will be the answer and allow me to automate my daily etc backups at night.
    Will let you know once it's done and mark as correct answer.
    Dave

  • Creating pfile in RMAN script

    I am trying to create pfile from spfile from RMAN scripts as follows, but ran into issues
    run {
    2> sql 'create pfile=/tmp/p.ora from spfile';
    3> }
    sql statement: create pfile=/tmp/p.ora from spfile
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of sql command on default channel at 02/20/2009 11:23:06
    RMAN-11003: failure during parse/execution of SQL statement: create pfile=/tmp/p.ora from spfile
    ORA-02236: invalid file name
    Any other suggestions to get the desired results. I want to create pfile in a different directory rather than defualt dbs directory.

    stevencallan wrote:
    How would this command look in SQL*Plus?
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_6008.htm#i2072768
    Check your use of quotation marks.NO...read what you said.
    What does SQL*Plus have to do with this command. You mentioned quotations marks...what kind of quotation marks..single or double and where should there be ??

  • How to store the value into variable and access it in RMAN script

    I want to create a variable and dynamically assign a numeric value to it (may get the value may be from SQL )and access the value in RMAN script.
    Thanks...Raj

    Raj,
    We have been getting this type of request and it is not possible via RMAN to do that.
    BUT--You could write a sql/plus script to query your variable and produce the RMAN script with the new value.
    Just a suggestion.
    Tammy

  • Can I call an external program from my rman script

    Hi
    Is it possible to do an external call to a bat-file in a rman script?
    My script looks like this (it's pretty much generated from EM):
    $rman_script="backup device type disk tag '%TAG' database;
    sql 'alter system archive log current';
    backup device type disk tag '%TAG' archivelog all not backed up delete all input;
    allocate channel for maintenance type disk;
    delete noprompt obsolete device type disk;
    release channel;
    Can i somehow make an external call before at the end?
    Regards
    Klaus Mogensen

    You can use the HOST command.

  • RMAN script errors out for some DB's

    I have a single RMAN script that uses env variables to execute RMAN for two databases. It runs fine. I cloned the two DB's (changed DBID's), all four are on the same host. Now I try to use same script for all four. I receive an error when trying to run against the cloned databases. Here is script:
    spool log to full.log append;
    connect catalog rman/xxxxxx@iasrman
    connect target /
    run {
    sql 'ALTER SYSTEM SWITCH LOGFILE';
    backup incremental level 0 database diskratio=0 plus archivelog delete input;
    And here is error, it stops same place everytime, input appreciated.
    Recovery Manager: Release 9.2.0.5.0 - 64bit Production
    RMAN>
    connected to recovery catalog database
    RMAN>
    connected to target database: PRSMQ02 (DBID=944525168)
    RMAN> 2> 3> 4>
    sql statement: ALTER SYSTEM SWITCH LOGFILE
    Starting backup at 30-MAY-07
    current log archived
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=20 devtype=DISK
    allocated channel: ORA_DISK_2
    channel ORA_DISK_2: sid=19 devtype=DISK
    allocated channel: ORA_DISK_3
    channel ORA_DISK_3: sid=18 devtype=DISK
    allocated channel: ORA_DISK_4
    channel ORA_DISK_4: sid=17 devtype=DISK
    allocated channel: ORA_DISK_5
    channel ORA_DISK_5: sid=11 devtype=DISK
    channel ORA_DISK_1: starting archive log backupset
    channel ORA_DISK_1: specifying archive log(s) in backup set
    input archive log thread=1 sequence=25 recid=25 stamp=623931644
    channel ORA_DISK_1: starting piece 1 at 30-MAY-07
    channel ORA_DISK_2: starting archive log backupset
    channel ORA_DISK_2: specifying archive log(s) in backup set
    input archive log thread=1 sequence=26 recid=26 stamp=623931644
    channel ORA_DISK_2: starting piece 1 at 30-MAY-07
    channel ORA_DISK_1: finished piece 1 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931649_s59_s1 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
    channel ORA_DISK_1: deleting archive log(s)
    archive log filename=/q02/archive/prism/log_prsmq02_25.arc recid=25 stamp=623931644
    channel ORA_DISK_2: finished piece 1 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931649_s60_s1 comment=NONE
    channel ORA_DISK_2: backup set complete, elapsed time: 00:00:02
    channel ORA_DISK_2: deleting archive log(s)
    archive log filename=/q02/archive/prism/log_prsmq02_26.arc recid=26 stamp=623931644
    Finished backup at 30-MAY-07
    Starting backup at 30-MAY-07
    using channel ORA_DISK_1
    using channel ORA_DISK_2
    using channel ORA_DISK_3
    using channel ORA_DISK_4
    using channel ORA_DISK_5
    channel ORA_DISK_1: starting incremental level 0 datafile backupset
    channel ORA_DISK_1: specifying datafile(s) in backupset
    input datafile fno=00009 name=/q02/oradata01/prsmdata/Data_13.dbf
    input datafile fno=00016 name=/q02/oradata01/prsmdata/Data_20.dbf
    input datafile fno=00025 name=/q02/oradata01/prsmdata/Data_04.dbf
    input datafile fno=00005 name=/q02/oraindx01/prsmdata/Index_11.dbf
    input datafile fno=00020 name=/q02/oradata01/prsmdata/Tools02.dbf
    input datafile fno=00022 name=/q02/oraindx01/prsmdata/index_12.dbf
    channel ORA_DISK_1: starting piece 1 at 30-MAY-07
    channel ORA_DISK_2: starting incremental level 0 datafile backupset
    channel ORA_DISK_2: specifying datafile(s) in backupset
    input datafile fno=00010 name=/q02/oradata01/prsmdata/Data_14.dbf
    input datafile fno=00015 name=/q02/oradata01/prsmdata/Data_19.dbf
    input datafile fno=00024 name=/q02/oradata01/prsmdata/Data_03.dbf
    input datafile fno=00003 name=/q02/oratmp01/prsmdata/rbs01.dbf
    input datafile fno=00001 name=/q02/orasys01/prsmdata/system01.dbf
    input datafile fno=00012 name=/q02/orasys01/prsmdata/system02.dbf
    channel ORA_DISK_2: starting piece 1 at 30-MAY-07
    channel ORA_DISK_3: starting incremental level 0 datafile backupset
    channel ORA_DISK_3: specifying datafile(s) in backupset
    input datafile fno=00008 name=/q02/oradata01/prsmdata/Data_12.dbf
    input datafile fno=00014 name=/q02/oradata01/prsmdata/Data_18.dbf
    input datafile fno=00023 name=/q02/oradata01/prsmdata/Data_02.dbf
    input datafile fno=00028 name=/q02/oradata01/prsmdata/Data06.dbf
    input datafile fno=00019 name=/q02/oratmp01/prsmdata/rbs02.dbf
    input datafile fno=00021 name=/q02/orasys01/prsmdata/DRSYS.dbf
    channel ORA_DISK_3: starting piece 1 at 30-MAY-07
    channel ORA_DISK_4: starting incremental level 0 datafile backupset
    channel ORA_DISK_4: specifying datafile(s) in backupset
    input datafile fno=00007 name=/q02/oradata01/prsmdata/Data_11.dbf
    input datafile fno=00013 name=/q02/oradata01/prsmdata/Data_17.dbf
    input datafile fno=00018 name=/q02/oradata01/prsmdata/Data_01.dbf
    input datafile fno=00006 name=/q02/oradata01/prsmdata/Tools01.dbf
    input datafile fno=00002 name=/q02/oradata01/prsmdata/Users01.dbf
    input datafile fno=00026 name=/q02/oradata01/prsmdata/Data05.dbf
    channel ORA_DISK_4: starting piece 1 at 30-MAY-07
    channel ORA_DISK_5: starting incremental level 0 datafile backupset
    channel ORA_DISK_5: specifying datafile(s) in backupset
    input datafile fno=00004 name=/q02/oradata01/prsmdata/Data_15.dbf
    input datafile fno=00011 name=/q02/oradata01/prsmdata/Data_16.dbf
    input datafile fno=00017 name=/q02/oradata01/prsmdata/Data_22.dbf
    input datafile fno=00027 name=/q02/oradata01/prsmdata/Data_05.dbf
    channel ORA_DISK_5: starting piece 1 at 30-MAY-07
    channel ORA_DISK_1: finished piece 1 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s61_s1 comment=NONE
    channel ORA_DISK_1: starting piece 2 at 30-MAY-07
    channel ORA_DISK_2: finished piece 1 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s62_s1 comment=NONE
    channel ORA_DISK_2: starting piece 2 at 30-MAY-07
    channel ORA_DISK_3: finished piece 1 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s63_s1 comment=NONE
    channel ORA_DISK_3: starting piece 2 at 30-MAY-07
    channel ORA_DISK_4: finished piece 1 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s64_s1 comment=NONE
    channel ORA_DISK_4: starting piece 2 at 30-MAY-07
    channel ORA_DISK_5: finished piece 1 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s65_s1 comment=NONE
    channel ORA_DISK_5: starting piece 2 at 30-MAY-07
    channel ORA_DISK_2: finished piece 2 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s62_s2 comment=NONE
    channel ORA_DISK_2: starting piece 3 at 30-MAY-07
    channel ORA_DISK_1: finished piece 2 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s61_s2 comment=NONE
    channel ORA_DISK_1: starting piece 3 at 30-MAY-07
    channel ORA_DISK_4: finished piece 2 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s64_s2 comment=NONE
    channel ORA_DISK_4: starting piece 3 at 30-MAY-07
    channel ORA_DISK_5: finished piece 2 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s65_s2 comment=NONE
    channel ORA_DISK_5: starting piece 3 at 30-MAY-07
    channel ORA_DISK_3: finished piece 2 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s63_s2 comment=NONE
    channel ORA_DISK_3: starting piece 3 at 30-MAY-07
    channel ORA_DISK_2: finished piece 3 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s62_s3 comment=NONE
    channel ORA_DISK_2: starting piece 4 at 30-MAY-07
    channel ORA_DISK_4: finished piece 3 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s64_s3 comment=NONE
    channel ORA_DISK_4: starting piece 4 at 30-MAY-07
    channel ORA_DISK_1: finished piece 3 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s61_s3 comment=NONE
    channel ORA_DISK_1: starting piece 4 at 30-MAY-07
    channel ORA_DISK_2: finished piece 4 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s62_s4 comment=NONE
    channel ORA_DISK_2: backup set complete, elapsed time: 00:53:23
    channel ORA_DISK_5: finished piece 3 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s65_s3 comment=NONE
    channel ORA_DISK_5: starting piece 4 at 30-MAY-07
    channel ORA_DISK_3: finished piece 3 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s63_s3 comment=NONE
    channel ORA_DISK_3: starting piece 4 at 30-MAY-07
    channel ORA_DISK_4: finished piece 4 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s64_s4 comment=NONE
    channel ORA_DISK_4: starting piece 5 at 30-MAY-07
    channel ORA_DISK_1: finished piece 4 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s61_s4 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:59:04
    channel ORA_DISK_3: finished piece 4 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s63_s4 comment=NONE
    channel ORA_DISK_3: backup set complete, elapsed time: 01:00:10
    channel ORA_DISK_5: finished piece 4 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s65_s4 comment=NONE
    channel ORA_DISK_5: backup set complete, elapsed time: 01:00:25
    channel ORA_DISK_4: finished piece 5 at 30-MAY-07
    piece handle=/iasrman/q02/prsmq02/prsmq02_df623931654_s64_s5 comment=NONE
    channel ORA_DISK_4: backup set complete, elapsed time: 01:01:40
    Finished backup at 30-MAY-07
    Starting backup at 30-MAY-07
    current log archived
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 05/30/2007 11:22:38
    RMAN-06004: ORACLE error from recovery catalog database: ORA-03114: not connected to ORACLE

    connect target /You need to inform the connection string to target database.
    Can to be explicitly or with 'export sid' in your script.

  • How to pass a shell variable to rman scripts

    I want to backup datafile to different directory
    depending on the current time,and I can do this to
    pass a shell variable to rman scripts,and this
    variable will used as part of format ,like this:
    backup incremental level=0
    tag rman_inc0_bck
    filesperset 5
    format '$(DIR)/rman_fulldb_%u_%s_%p_%d'
    (database include current controlfile)
    and $(DIR) is shell variable ,but rman will not
    recognize this ,how to achieve this?

    You could send your script to rman thru a pipe | or <<
    echo "backup incremental level=0
    tag rman_inc0_bck
    filesperset 5
    format '$(DIR)/rman_fulldb_%u_%s_%p_%d'
    (database include current controlfile);" | rman target /You could also create a "temp script" and then use it from rman with cmdfile
    sed "s,XXXDIR,$(DIR)," yourtemplate > /tmp/rmanscript.$$
    rman target / cmdfile /tmp/rmanscript.$$
    rm /tmp/rmanscript.$$

  • Error when using FTP in iWeb 09! "Error 500: Script Execution Failure"

    I have my domain through 123-reg and I have free hosting with host-ed.net when I add a simple index.html file my website works fine displaying the 1 line of text that I asked for, so it is all configured correctly.
    How ever when I use the FTP upload thought iWeb '09 I always get "Error 500: Script Execution Failure"
    www.breslan.co.uk
    Anyone know why?

    I have logged into my hosting and changed the permissions to '755' and move the files from the folder iweb used to the root of the site i know get "Parse error: syntax error, unexpected T_STRING in /~/www/breslan.co.uk/index.html on line 1" there is only 1 line of code in index.html and that is
    <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><meta http-equiv="refresh" content="0;url= Welcome.html" /></head><body></body></html>
    please help!

  • Schedule rman script in Windows 2003

    Oracle 10.2. I wrote a rman script and tried to schedule auto run in Windows 2003 server. I got this errors:
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00554: initialization of internal recovery manager package failed
    RMAN-04005: error from target database:
    ORA-12560: TNS:protocol adapter error
    The batch file name: rman_backup.bat
    content: rman target / cmdfile rman_backup.rcv log rman_backup.log
    Here is how I set it up:
    go to Control Panel>Scheduled Tasks>Add Scheduled Task, find rman_backup.bat, choose the run time and finish it. When asking for user name and password, I supply the user which is in oracle dba group.
    But when it run, it just produced the above error and won't run.
    Please advise
    S.
    in SQLnet.log
    fatal NI connect error 12560, connecting to:
    (DESCRIPTION=(ADDRESS=(PROTOCOL=BEQ)(PROGRAM=oracle)(ARGV0=oracleORCL)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))'))(CONNECT_DATA=(SID=ORCL)(CID=(PROGRAM=D:\oracle\product\10.2.0\db_1\bin\rman.exe)(HOST=W3TY5Z203)(USER=WELC))))
    VERSION INFORMATION:
         TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
         Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 10.2.0.4.0 - Production
    Time: 30-MAR-2010 11:27:00
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12560
    TNS-12560: TNS:protocol adapter error
    ns secondary err code: 0
    nt main err code: 530
    TNS-00530: Protocol adapter error
    nt secondary err code: 2
    nt OS err code: 0

    here is example of script we are using to backup database from windows scheduler:
    set oracle_home=d:\oracle\ora920
    set path=d:\perl\bin;d:\oracle\ora920\bin;c:\winnt;c:\WINDOWS\system32;
    set PERL5LIB=''
    set NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252
    set TNS_ADMIN=d:\oracle\ora920\network\admin
    d:
    cd \scripts
    set oracle_sid=car
    rman target sys/car_$z3br4 catalog rman/oemrp_pwd@oemrp @rman_level0_car.rman > rman_level0_car.log
    perl email_log.pl "RMAN Level 0 Log" d:\scripts\rman_level0_car.log CARthis script backing up 9i database. 10g and 11g database we backing up via EM grid control.
    You can change this script to backup 10g or 11g databses as well.

  • What's wrong with this RMAN script?

    Hi,
    I have a rman script to back up the 8i database like the following:
    #!/bin/ksh
    if [ $# != 1 ]; then
    echo "Usage: $0 ORACLE_SID"
    exit
    fi
    ORACLE_SID=$1; export ORACLE_SID
    RMAN_LOC=/u1/rman_backup
    export ORACLE_HOME=/u2/oracle/8.1.7
    export PATH=$ORACLE_HOME/bin:$PATH
    echo "connect target /" > rman_backup.rcv
    echo "" >> rman_backup.rcv
    echo "configure controlfile autobackup on;" >> rman_backup.rcv
    echo "" >> rman_backup.rcv
    echo "configure controlfile autobackup format for device type disk to '${RMAN_LOC}/%F';" >
    rman_backup.rcvecho "" >> rman_backup.rcv
    echo "run {" >> rman_backup.rcv
    echo "allocate channel t1 type disk;" >> rman_backup.rcv
    echo "backup database format '${RMAN_LOC}/db_${ORACLE_SID}_%u';" >> rman_backup.rcv
    echo "}" >> rman_backup.rcv
    rman cmdfile rman_backup.rcv
    When I run it, I got the following error:
    RMAN> connect target /
    2>
    3> configure controlfile
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01005: syntax error: found "controlfile": expecting one of: "compatible"
    RMAN-01007: at line 3 column 11 file: rman_backup.rcv
    BTW, the same script is working fine with 9i db.
    Could someone help me?
    Thanks in advance,
    Helen

    Hello,
    there is no controlfile autobackup in 8i RMAN. You must copy controlfile on your own, e.g. SQL 'ALTER DATABASE BACKUP CONTROLFILE TO file_name' or use eqiv. rman command - please check documentation.
    Kind Regards, Piotr
    DBA OCP.

  • RMAN Script & RMAN Configuration

    Dear All,
    This is the first time i am using RMAN. i just wanted to execute the following RMAN script for a testing purpose, for this what are the RMAN configuration i must have to do before executing this script below:
    RMAN> run {
    shutdown immediate;
    startup mount;
    backup database;
    alter database open;
    }This is my current setup of RMAN
    RMAN> show all;
    RMAN configuration parameters for database with db_unique_name DP are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
    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 '%F'; # default
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
    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 'E:\RMAN\';
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
    CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'E:\APP\10004\PRODUCT\11.2.0\DBHOME_1\DATABASE\SNCFDP.ORA'; # defaultKindly advice me and give me a very clear study for this above parameters
    Regards
    HAMEED
    Once i execute that script i got this following error :
    +RMAN> run {+
    +2> shutdown immediate;+
    +3> startup mount;+
    +4> backup database;+
    +5> alter database open;+
    +6> };+
    database closed
    database dismounted
    Oracle instance shut down
    connected to target database (not started)
    Oracle instance started
    database mounted
    Total System Global Area     770019328 bytes
    Fixed Size                     1374780 bytes
    Variable Size                301991364 bytes
    Database Buffers             461373440 bytes
    Redo Buffers                   5279744 bytes
    Starting backup at 18-MAY-11
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=134 device type=DISK
    channel ORA_DISK_1: starting full datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    input datafile file number=00006 name=E:\APP\10004\ORADATA\DP\HAMEED01.DBF
    input datafile file number=00007 name=E:\APP\10004\ORADATA\DP\ABDUL01.DBF
    input datafile file number=00008 name=E:\APP\10004\ORADATA\DP\TEST01.DBF
    input datafile file number=00001 name=E:\APP\10004\ORADATA\DP\SYSTEM01.DBF
    input datafile file number=00002 name=E:\APP\10004\ORADATA\DP\SYSAUX01.DBF
    input datafile file number=00005 name=E:\APP\10004\ORADATA\DP\EXAMPLE01.DBF
    input datafile file number=00003 name=E:\APP\10004\ORADATA\DP\UNDOTBS01.DBF
    input datafile file number=00004 name=E:\APP\10004\ORADATA\DP\USERS01.DBF
    channel ORA_DISK_1: starting piece 1 at 18-MAY-11
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/18/2011 17:22:30
    ORA-19504: failed to create file "E:\RMAN\"
    ORA-27038: created file already exists
    OSD-04010: <create> option specified, file already exists
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    Edited by: Hameed on May 18, 2011 4:59 AM

    Dear Chinar, can you please varify this below ,, is it correct,, after given your setup i ran this script,,,
    Kindly advice me
    Regards
    HAMEED
    RMAN> run
    2> {
    3> backup current controlfile;
    4> }
    Starting backup at 18-MAY-11
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=143 device type=DISK
    channel ORA_DISK_1: starting full datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    including current control file in backup set
    channel ORA_DISK_1: starting piece 1 at 18-MAY-11
    channel ORA_DISK_1: finished piece 1 at 18-MAY-11
    piece handle=E:\RMAN\FULL_06MCLH66_1_1.BK tag=TAG20110518T180910 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
    Finished backup at 18-MAY-11
    Starting Control File Autobackup at 18-MAY-11
    piece handle=E:\RMAN\CFC-796596855-20110518-00 comment=NONE
    Finished Control File Autobackup at 18-MAY-11Edited by: Hameed on May 18, 2011 5:55 AM

  • RMAN script doesnt exit shell after backup

    Hi,
    I've the following script on AIX 6.1, Oracle 11.2.0.1.0:
    export ORACLE_HOME=/oracle/medprod/product/11.2.0/dbhome_1
    export ORACLE_SID=MEDPROD
    export PATH=$ORACLE_HOME/bin:$PATH
    export LOG_DIR=/home/medinous/backup/logs
    export LOG_FILE=$LOG_DIR/medprod_daily_backup_`date +%d%m%Y%X`.log
    rman target / catalog rman/rman@rman log=$LOG_FILE <<EOF
    execute script medinous_daily;
    exit;
    EXIT;
    EOF
    and:
    printing stored script: medinous_daily
    +{+
    allocate channel t1 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
    allocate channel t2 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
    allocate channel t3 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
    backup format 'medinous_dailybackup_%d_%s_%t'  database;
    backup  format 'medinous_dailyarchbackup_%d_%s_%t' archivelog all not backed up 1 times;
    crosscheck backup;
    delete noprompt obsolete;
    delete noprompt expired backup;
    delete noprompt expired archivelog all;
    release channel t1;
    release channel t2;
    release channel t3;
    +}+
    For some reason, the rman script, scheduled via crontab doesn't exit after successful backup, the process just remain alive, even though there's an explicit exit command at the end.
    Any idea?
    dula

    No, the script actully executes successfully. The problem is that after executing, the process does'nt die, it doesnt exit rman:
    channel t1: finished piece 1 at 28-DEC-10
    piece handle=prodarchbackup_PROD_666_738921153 tag=TAG20101228T075233 comment=API Version 2.0,MMS Version 5.5.2.0
    channel t1: backup set complete, elapsed time: 00:00:03
    channel t2: finished piece 1 at 28-DEC-10
    piece handle=prodarchbackup_PROD_667_738921153 tag=TAG20101228T075233 comment=API Version 2.0,MMS Version 5.5.2.0
    channel t2: backup set complete, elapsed time: 00:00:03
    channel t3: finished piece 1 at 28-DEC-10
    piece handle=prodarchbackup_PROD_668_738921153 tag=TAG20101228T075233 comment=API Version 2.0,MMS Version 5.5.2.0
    channel t3: backup set complete, elapsed time: 00:00:03
    Finished backup at 28-DEC-10
    Starting Control File and SPFILE Autobackup at 28-DEC-10
    piece handle=c-148294895-20101228-00 comment=API Version 2.0,MMS Version 5.5.2.0
    Finished Control File and SPFILE Autobackup at 28-DEC-10
    released channel: t1
    released channel: t2
    released channel: t3
    *<< I expect the rman shell script to exit at this point and 'die' >>>>*

  • RMAN Script is not allocating channels

    I have a customer who is running a Solaris Server with Oracle 9i and is trying to backup using an RMAN script to define the channels to back up to through Networker.
    The script is as follows:
    run {
    allocate channel t1 type "sbt_tape";
    allocate channel t2 type "sbt_tape";
    send 'NSR_ENV=(NSR_SERVER=XXXX,NSR_DATA_VOLUME_POOL=Default)';
    sql 'alter system archive log current';
    change archivelog all crosscheck;
    set command id to 'bkrs';
    backup
    filesperset 20
    archivelog all
    delete input;
    release channel t1;
    release channel t2;
    Normally there are 3 channel allocations, but for some reason this does not work. He can only get 1 channel to work at a time which is impacting Backup Performance.
    There are no errors logged in the log files which is also odd. The device parallelism is 4 under Networker
    The version of Networker is 7.1
    Anyone else had any similar issues - I have been scratching my head on this for a while, or if anyone has any ideas on how to troubleshoot this I would appreciate any help
    Thanks

    I have now found some error information. Please see below.
    RMAN-00571: ======================================
    RMAN-00569: ===== ERROR MESSAGE STACK FOLLOWS =====
    RMAN-00571: =======================================
    RMAN-03009: failure of allocate command on t1 channel at 04/08/2004 10:37:02
    ORA-19554: error allocating device, device type: SBT_TAPE, device name:
    ORA-27211: Failed to load Media Management Library
    Any help much appreciated !!!!!

  • RMAN script failed while creating Data Guard 11g

    Hi Friends,
    I am creating Physical Standby (11g) using RMAN (ACTIVE) on windows using the doc : Step by Step Guide on Creating Physical Standby Using RMAN DUPLICATE...FROM ACTIVE DATABASE [ID 1075908.1]
    The folder structure on Primary DB and on Physical Standby is totally different.
    while executing RMAN script i got errors for lot of locations and i specified the proper location in RMAN script itself (ex set diagnostic_dest = 'c:\app\' , set db_recovery_file_dest='C:\app\flash_recovery_area')
    Location of control files on Primary DB:
    D:\oradata\MESSTG\CONTROL01.CTL
    D:\oradata\flash_recovery\messtg\MESSTG\CONTROL02.CTL
    Location of control files (planned) on Physical Standby DB:
    C:\app\oradata\MESSTDBY\CONTROL01.CTL
    C:\app\flash_recovery_area\MESSTDBY\CONTROL02.CTL
    How to specify control file location of Physical standby in set control_files?
    Also i have 2 control files on Primary DB so do i need to specify both the control files , if so how?
    I tried different combination in RMAN script but all are failed:
    set control_files='D:\oradata\MESSTG\CONTROL01.CTL','C:\app\oradata\MESSTDBY\CONTROL01.CTL'
    RMAN Error is :
    while using set control_files=: C:\app\oradata\MESSTDBY\CONTROL01.CTL
    contents of Memory Script:
    backup as copy current controlfile for standby auxiliary format 'D:\ORADATA\MESSTG\CONTROL01.CTL';
    restore clone controlfile to 'C:\APP\ORADATA\MESSTDBY\CONTROL01.CTL' from
    'D:\ORADATA\MESSTG\CONTROL01.CTL';
    executing Memory Script
    Starting backup at 16-APR-13
    channel prmy1: starting datafile copy
    copying standby control file
    released channel: prmy1
    released channel: prmy2
    released channel: prmy3
    released channel: prmy4
    released channel: stby
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 04/16/2013 14:18:41
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-03009: failure of backup command on prmy1 channel at 04/16/2013 14:18:41
    ORA-17628: Oracle error 19505 returned by remote Oracle server
    RMAN>
    Error 2)
    while using set control_files='D:\oradata\MESSTG\CONTROL01.CTL','C:\app\oradata\MESSTDBY\CONTROL01.CTL'
    contents of Memory Script:
    backup as copy current controlfile for standby auxiliary format 'D:\ORADATA\MESSTG\CONTROL01.CTL';
    executing Memory Script
    Starting backup at 16-APR-13
    channel prmy1: starting datafile copy
    copying standby control file
    released channel: prmy1
    released channel: prmy2
    released channel: prmy3
    released channel: prmy4
    released channel: stby
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 04/16/2013 13:22:33
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-03009: failure of backup command on prmy1 channel at 04/16/2013 13:22:33
    ORA-17628: Oracle error 19505 returned by remote Oracle server
    RMAN>
    Regards,
    DB

    Hi,
    Can you paste here you rman script ?
    I think following script can help you.
    duplicate target database for standby
    from  active database
    spfile
      set "control_files"="d:\oradata\<standbydbuniquename>\CONTROL01.CTL"
      set "db_name"="<DBNAME>"
      set "db_unique_name"="<STANBYD DBA UNIQUENAME>"
      set "db_file_name_convert"="C:\app\oracle\oradata\<dbname>","d:\oradata\<standbydbuniquename>"
      set "log_file_name_convert"="C:\app\oracle\oradata\<dbname>","d:\oradata\<standbydbuniquename>"
      set "db_recovery_file_dest"="D:\fast_recovery_area"
    nofilenamecheck;C:\app\oracle\oradata\<dbname> - it is primary database dafiles location
    D:\oradata\<standbydbuniquename> - it is standby database datafile location.
    Don't forget creation of diagnostinc dests.
    Regards
    Mahir M. Quluzade

Maybe you are looking for

  • Adapter Module for receiver IDOC adapter?

    Hi, I have a scenario where i need to do some custom logging in the receiver adapters. For all receiver file adapters, i have written an adapter module which fulfills this custom requirement but how will i do this in the receiver IDOC adapter as its

  • Safari crashes when attempting to open dell router config page

    I gather that Safari sometimes has issues connecting to certain routers. When I try to connect to my dell wireless router at 192.168.2.1 Safari quits, rather than bringing up the logon screen. I'm hoping someone has figured out a fix or workaround. T

  • What setting do I need to use to send and receive Business Catalyst account e-mail on my smartphone?

    I have a new Samsung Galaxy s4 Smartphone and want to be able to send and receive my Business Catalyst account emails from the phone (same as I can with outlook). What settings do I need to put in the phone to do this (for example: pop-3 server name

  • Need help on changing parameter NLS_LENGTH_SEMANTICS

    hi All, Oracle is 11.2.0.1.0 Initially our db parameter NLS_LENGTH_SEMANTICS='CHAR' for one table I am getting error like ORA-01450: maximum key length (6398) exceeded Missing Resource String. I changed it NLS_LENGTH_SEMANTICS='BYTE' now I am able to

  • Design of map application

    I am working on an application that is basically a map, which it is possible to zoom in to. My first approach to this was to have two images, a small image and a large image. When the small image is clicked it is replaced by a sub-image of the large