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' >>>>*

Similar Messages

  • RMAN script advice(Hot full daily backup)

    I am currently running a daily hot full backup (by customers request).
    My code is executed as an "at" job nightly, but I am running into some hits on performance of the server at the time my backup is running. Here is the code I run:
    rman target /
    run {
    backup database plus archivelog;
    delete noprompt obsolete;
    sql 'alter system archive log current';
    exit;
    My RMAN show all;
    retention policy to recovery window of 3 days;
    backup optimization off; #default
    default device type to disk; #default
    controlfile autobackup on;
    controlfile autobackup format for device type disk to '/path/%F';
    device type disk parallelism 1 backup type backupset; #default
    datafile backup copies for device type disk to 1; #default
    archivelog backup copies for device type disk to 1; #default
    channel device type disk format '/path/%U';
    maxsetsize to unlimited; #default
    archivelog deletion policy to none; #default
    snapshot controlfile name to '$ORACLE_HOME/dbs/snapcf_sid.f'; #default
    I do not have a recovery catalog established- customer request also.
    I am running the buggy 10.1.0.2.0 on Linux AS3. My normal backups should only last 1 hour 20 minutes, but it varies between 12 hours to 5 hours to 3 hours- never consistent.
    Any thoughts?

    So CPU performance seems to be inline, but you may want to check I/O during the backup with vmstat.
    You can also query V$BACKUP_ASYNC_IO and look at EFFECTIVE_BYTES_PER_SECOND, WAITS and IO_COUNT.
    During the backup, you can run the following query to monitor RMAN:
    SELECT sid, serial#, context, sofar, totalwork,
         round(sofar/totalwork*100,2) "% Complete"
         FROM v$session_longops
         WHERE opname LIKE 'RMAN%'
         AND opname NOT LIKE '%aggregate%'
         AND totalwork != 0
         AND sofar <> totalwork;If the % Complete doesn't seem to be increasing, you should run the following select to determine what waits exist:
    SELECT sid, seconds_in_wait AS sec_wait, event FROM v$session_wait
         WHERE wait_time = 0
         ORDER BY sid;Even though you are using automated SGA, you may want to specify LARGE_POOL_SIZE = 16m.

  • 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 errors sent to shell script calling RMAN sequence?

    Hello,
    I have a Korn shell script run on Solaris as the root user that launches RMAN sequences similar to this one:
    #!/bin/ksh
    su - oracle -c "export ORACLE_SID=ORCL; rman target / << !
    <rman sequence>
    I am wondering if there is a way to catch the RMAN errors in the shell script?
    If I call SQLplus instead of RMAN, I can use "whenever sqlerror exit sql.sqlcode" and I will retrieve the error code in the shell script from $? - can I do such a thing with RMAN?
    Thank you,
    Adrian

    You could capture the return code *$?* from your RMAN script and if it returns anything other than 0, then you could grep the RMAN log for errors and/or query
    V$RMAN_OUTPUT after the RMAN script executes.

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

  • RMAN script for hot backup (looking for code critic) code attached.

    Hello Guru's,
    I have been having soem trouble running a successful hot full rman backup nightly.
    We max our CPU load whenever our RMAN takes too long and conflicts with a Legato tape backup. I have a development server that I attempted to get a consistent backup time duration that is rock solid as to not conflict with the Legato backup time.
    I just found out about duration with RMAN scripts here is my code:
    #!/bin/bash
    #rman backup script for daily hot whole database backup
    at -f /hd1/rman_scripts/rman_backup 0600 tomorrow
    rman target/
    run {
    allocate channel d1 device type disk format '/path/%U';
    backup duration 1:00 partial minimize load database filesperset 1;
    backup as BACKUPSET tag '%TAG' database;
    backup as BACKUPSET tag '%TAG' archivelog all delete all input;
    delete noprompt obsolete;
    release channel d1;
    exit
    It completes the backup, but does not use the 1 hour allocated- it only uses 15 minutes on average and creates many files instead of normally three backup files.
    Here is the results from querying the v$rman_status table for operation,status,start_time:
    RMAN,FAILED, 17-OCT-06 0600
    BACKUP,FAILED,17-OCT-06 0600
    RMAN,FAILED,17-OCT-06 0606
    BACKUP,COMPLETED,17-OCT-06 0606
    BACKUP,COMPLETED,17-OCT-06 0606
    BACKUP,FAILED,17-OCT-06 0615
    RMAN,COMPLETED,17-OCT-06 1513
    REPORT,COMPLETED,17-OCT-06 1513
    DELETE,COMPLETED,17-OCT-06 1513
    However, the timestamps of the backupset files it creates is:
    06:15 and not 1513?????????????
    RMAN appears to have only taken 15 minutes to create the files, why do I have a completed timestamp from v$rman_status of 1513???
    Please advise and comment, I am just learning RMAN.

    Try to remove the DURATION option in your script.
    Here more details about that part.
    http://download-east.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta009.htm#i1010261
    Bye, Aron

  • 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

  • Oracle Online Backup through EMC Networker - RMAN Script

    Hi,
    For taking online oracle backup through EMC Networker, we configure the RMAN script to connect to the target database, create the media channels, backup format etc. The password for the sys or rman user entered in the RMAN script is in clear-text format.
    Due to security reasons, I don't want the passwords to be entered in the RMAN script. Is there any option for configuring RMAN script without mentioning the username/password to connect to the target database ?
    Thanks & Regards,
    Shreejesh.

    When you have to connect remotely to RMAN, you cannot hide the password, you can only define very restricted access for the script itself. Remote OS authentication will not work, because the target db user needs SYSDBA privilege, which cannot be granted to an externally identified user.
    Werner

  • RMAN script for RAC Hot Backup

    Anyone who want to share an RMAN script to Hot Backup a 9i RAC Database.

    Try to remove the DURATION option in your script.
    Here more details about that part.
    http://download-east.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta009.htm#i1010261
    Bye, Aron

  • RMAN backup of 8i target db using 9i rman scripts

    Hello,
    I have set up a server for Monitoring and Backup using OEM and RMAN, and I have installed Oracle 9.2.0.6 RMAN catalog, to store the backup scripts and the backup information
    I have registred and taken backup of Oracle 9i databases, and it works okay. Now I want to register Oracle 8.1.7.4 databases and take backup of 8i target databases using the scripts and configuration setting that I created for 9i databases
    Can I use the 9i scripts and "configure" command to backup 8i databases?
    I had checked the compatability matrix on metalink (docid: 73431.1) and it suggested using same version of rman executable (.. wrt target database). Is it so?
    I assumed that 9i RMAN is backward compatible and so this can be used to backup the 8i databases... sames commands and not just the 9i catalog. I get RMAN-6429 when I try to connect to 8i database from the backup server.
    Please let me know if I can use Oracle 9i RMAN command and features to backup Oracle 8.1.7.4 databases?
    Regards
    Sudhanshu

    Update on this thread (...the feedback I got from metalink)
    No, you cannot use the 9i rman executable and features to backup a 8.1.x Database. The rman executable must match the Target Database when Target is 8.1.x.
    New features in 9i are not backward compatible.
    Thanks

  • RMAN-05556: not all datafiles have backups that can be recovered to SCN

    Oracle 11.2.0.2 SE-One
    Oracle Linux 5.6 x86-64
    Weekly refresh of a test db from prod, using rman DUPLICATE DATABASE, failed with “RMAN-05556: not all datafiles have backups that can be recovered to SCN”
    Background Summary:
    Weekly inc 0 backup of production starts on Sunday at 0100, normally completes around 1050.  Includes backups of archivelogs
    Another backup of just archivelogs runs on Sunday at 1200, normally completes NLT 1201.
    On the test server, the refresh job starts on Sunday at 1325.  In the past this script used a set until time \"to_date('`date +%Y-%m-%d` 11:55:00','YYYY-MM-DD hh24:mi:ss')\"; -- hard-coded for ‘today at 11:55’.
    For a variety of reasons I decided to replace this semi-hard coding of the UNTIL with a value determined by querying the rman catalog, getting the completion time of the inc 0 backup.  This tested out just fine in my vbox lab, even when I deliberately drove some updates and log switches during the period the backup was running.  But the first time to go live I got the above reported error.
    Details:
    The key part of the inc 0 backup is this (run from a shell script)
    export BACKUP_LOC=/u01/backup/dbprod
    $ORACLE_HOME/bin/rman target=/ catalog rman/***@rmcat<<EOF
    configure backup optimization on;
    configure default device type to disk;
    configure retention policy to recovery window of 2 days;
    crosscheck backup;
    crosscheck archivelog all;
    delete noprompt force obsolete;
    delete noprompt force expired backup;
    delete noprompt force expired archivelog all;
    configure controlfile autobackup on;
    configure controlfile autobackup format for device type disk to '$BACKUP_LOC/%d_%F_ctl.backup';
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '$BACKUP_LOC/%U.rman' MAXPIECESIZE 4096 M;
    sql "alter system archive log current";
    show all;
    backup as compressed backupset archivelog all delete all input format "$BACKUP_LOC/%U.alog";
    backup as compressed backupset incremental level 0 database tag tag_dbprod;
    sql "alter system archive log current";
    backup as compressed backupset archivelog all delete all input format "$BACKUP_LOC/%U.alog";
    list recoverable backup;
    EOF
    The archivelog-only backup (runs at noon) looks like this:
    export BACKUP_LOC=/u01/backup/dbprod
    $ORACLE_HOME/bin/rman target=/ catalog rman/***@rmcat<<EOF
    configure backup optimization on;
    configure default device type to disk;
    configure retention policy to recovery window of 2 days;
    crosscheck backup;
    crosscheck archivelog all;
    delete noprompt force obsolete;
    delete noprompt force expired backup;
    delete noprompt force expired archivelog all;
    configure controlfile autobackup on;
    configure controlfile autobackup format for device type disk to '$BACKUP_LOC/%d_%F_ctl.backup';
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '$BACKUP_LOC/%U.rman' MAXPIECESIZE 4096 M;
    sql "alter system archive log current";
    show all;
    backup as compressed backupset archivelog all delete all input format "$BACKUP_LOC/%U.alog";
    list recoverable backup;
    EOF
    And the original refresh looked like this:
    >> a step to ftp the backups from the prod server to the test server, and some other housekeeping  <<, then
    cd /backup/dbtest
    echo "connect catalog rman/***@rmcat" >  /backup/dbtest/dbtest_refresh.rman
    echo "connect target sys/*******@dbprod" >> /backup/dbtest/dbtest_refresh.rman
    echo "connect auxiliary /"             >> /backup/dbtest/dbtest_refresh.rman
    echo "run {"                           >> /backup/dbtest/dbtest_refresh.rman
    echo "set until time \"to_date('`date +%Y-%m-%d` 11:55:00','YYYY-MM-DD hh24:mi:ss')\";"  >> /backup/dbtest/dbtest_refresh.rman
    echo "duplicate target database to DBTEST;"  >> /backup/dbtest/dbtest_refresh.rman
    echo "}" >> /backup/dbtest/dbtest_refresh.rman
    So, my mod to the refresh was
    bkup_point=`sqlplus -s rman/***@rmcat <<EOF1
    set echo off verify off feedback off head off pages 0 trimsp on
    select to_char(max(completion_time),'yyyy-mm-dd hh24:mi:ss')
    from rc_backup_set_details
    where db_name='DBPROD'
    and backup_type='D'
    and incremental_level=0
    exit
    EOF1`
    cd /backup/dbtest
    echo "connect catalog rman/***@rmcat"     > /backup/dbtest/dbtest_refresh.rman
    echo "connect target sys/*******@dbprod"    >> /backup/dbtest/dbtest_refresh.rman
    echo "connect auxiliary /"                >> /backup/dbtest/dbtest_refresh.rman
    echo "run {"                              >> /backup/dbtest/dbtest_refresh.rman
    echo "set until time \"to_date('${bkup_point}','YYYY-MM-DD hh24:mi:ss')\";"  >> /backup/dbtest/dbtest_refresh.rman
    echo "duplicate target database to DBTEST;" >> /backup/dbtest/dbtest_refresh.rman
    echo "}"                                  >> /backup/dbtest/dbtest_refresh.rman
    Now the fun begins.
    First, an echo in the refresh script confirmed the ‘bkup_point’:
    =======================================================
    We will restore to 2013-08-25 10:41:38
    =======================================================
    Internally, rman reset the ‘until’ as follows:
    executing command: SET until clause
    Starting Duplicate Db at 25-Aug-2013 15:35:44
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=162 device type=DISK
    contents of Memory Script:
       set until scn  45633141350;
    Examining the result of LIST BACKUP (the last step of all of my rman scripts) the full backup shows this:
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
    5506664 Full 61.89M     DISK        00:00:03     25-Aug-2013 02:11:32
            BP Key: 5506678   Status: AVAILABLE  Compressed: NO  Tag: TAG20130825T021129
    Piece Name: /u01/backup/dbprod/DBPROD_c-3960114099-20130825-00_ctl.backup
      SPFILE Included: Modification time: 24-Aug-2013 22:33:08
      SPFILE db_unique_name: DBPROD
      Control File Included: Ckp SCN: 45628880455   Ckp time: 25-Aug-2013 02:11:29
    BS Key Type LV Size       Device Type Elapsed Time Completion Time    
    5507388 Incr 0 206.03G    DISK        08:30:00     25-Aug-2013 10:41:30
      List of Datafiles in backup set 5507388
      File LV Type Ckp SCN    Ckp Time             Name
      1    0 Incr 45628880495 25-Aug-2013 02:11:38 +SMALL/dbprod/datafile/system.258.713574775
      >>>>>>>>> snip lengthy list <<<<<<<<<
      74   0 Incr 45628880495 25-Aug-2013 02:11:38 +SMALL/dbprod/event_i2.dbf
      Backup Set Copy #1 of backup set 5507388
      Device Type Elapsed Time Completion Time      Compressed Tag
      DISK        08:30:00     25-Aug-2013 10:41:36 YES        TAG_DBPROD
        List of Backup Pieces for backup set 5507388 Copy #1
        BP Key  Pc# Status      Piece Name
        5507391 1   AVAILABLE   /u01/backup/dbprod/eeoi55iq_1_1.rman
        >>>>>>>>>>>>> snip lengthy list <<<<<<<<<<<
        5507442 52  AVAILABLE   /u01/backup/dbprod/eeoi55iq_52_1.rman
    Notice the slight difference in time between what is reported in the LIST BACKUP and what was reported by my query to the catalog.
    Continuing with the backup list, the second archivelog  backup in the script generated six backupsets.  The fifth set  showed:
    BS Key Size       Device Type Elapsed Time Completion Time    
    5507687 650.19M DISK        00:02:18     25-Aug-2013 10:54:53
            BP Key: 5507694   Status: AVAILABLE  Compressed: YES  Tag: TAG20130825T104156
    Piece Name: /u01/backup/dbprod/ekoi643j_1_1.alog
      List of Archived Logs in backup set 5507687
      Thrd Seq     Low SCN    Low Time             Next SCN   Next Time
      1    1338518 45632944587 25-Aug-2013 05:58:18 45632947563 25-Aug-2013 05:58:20
        >>>>>>>>>>>>> snip lengthy list <<<<<<<<<<<
      1    1338572 45633135750 25-Aug-2013 10:08:21 45633140240 25-Aug-2013 10:08:24
      1    1338573 45633140240 25-Aug-2013 10:08:24 45633141350 25-Aug-2013 10:30:06
      1    1338574 45633141350 25-Aug-2013 10:30:06 45633141705 25-Aug-2013 10:41:51
      1    1338575 45633141705 25-Aug-2013 10:41:51 45633141725 25-Aug-2013 10:41:55
    Notice the availability of the archivelogs including the referenced scn.
    Investigation of the ftp portion of the refresh script confirmed that all backup pieces were copied from the prod server.
    So what am I overlooking?  Having reverted back to the original script to get the refresh completed,

    HemantKChitale wrote:
    So, technically, you only need the database and archivelogs backed up by the database script and not the noon run of the archivelog backup.
    backup as compressed backupset archivelog all delete all input format "$BACKUP_LOC/%U.alog";
    backup as compressed backupset incremental level 0 database tag tag_dbprod;
    sql "alter system archive log current";
    backup as compressed backupset archivelog all delete all input format "$BACKUP_LOC/%U.alog";
    Yet, why does backupset 5 of the noon archivelog backup show archivelogs from 10:30 to 10:40  if they had been deleted by the database backup script which has a delete input ?  It is as if the database backup script did NOT delete the archivelogs and the noon run was the one to backup the archivelogs (again ?)
    No, that is from the morning full backup.  Note the 'Completion Time" of 25-Aug-2013 10:54:53
    However, the error message seems to point to a datafile.  Why would reverting the recovery point to 11:55 make a difference, I wonder.
    As do I.
    Also puzzling to me are the times associated with the completion of the backups.  I don't recall ever having to scrutinize a backup listing this closely so I'm sure it's just a matter of filling in some gaps in my understanding, but I noticed this.  The backup report (list backup;) shows this for the inc 0 backup:
    BS Key  Type LV Size  
    Device Type Elapsed Time Completion Time
    5507388 Incr 0  206.03G
    DISK   
    08:30:00
    25-Aug-2013 10:41:30   ------- NOTE THE COMPLETION TIME ----
      List of Datafiles in backup set 5507388
      File LV Type Ckp SCN
    Ckp Time        
    Name
      1
    0  Incr 45628880495 25-Aug-2013 02:11:38 +SMALL/dbprod/datafile/system.258.713574775
    ------ SNIP ------
      74   0  Incr 45628880495 25-Aug-2013 02:11:38 +SMALL/dbprod/event_i2.dbf
      Backup Set Copy #1 of backup set 5507388
      Device Type Elapsed Time Completion Time 
    Compressed Tag
      DISK   
    08:30:00
    25-Aug-2013 10:41:36 YES   
    TAG_DBPROD   ------- NOTE THE COMPLETION TIME ----
    List of Backup Pieces for backup set 5507388 Copy #1
    BP Key  Pc# Status 
    Piece Name
    5507391 1   AVAILABLE   /u01/backup/dbprod/eeoi55iq_1_1.rman
    ------ SNIP ------
    5507442 52  AVAILABLE   /u01/backup/dbprod/eeoi55iq_52_1.rman
    Then the autobackup of the control file immediatly following:
    BS Key  Type LV Size  
    Device Type Elapsed Time Completion Time
    5507523 Full
    61.89M
    DISK   
    00:00:03
    25-Aug-2013 10:41:47   ------- NOTE THE COMPLETION TIME ----
    BP Key: 5507587   Status: AVAILABLE  Compressed: NO  Tag: TAG20130825T104144
    Piece Name: /u01/backup/dbprod/DBPROD_c-3960114099-20130825-01_ctl.backup
      SPFILE Included: Modification time: 25-Aug-2013 05:57:15
      SPFILE db_unique_name: DBPROD   
      Control File Included: Ckp SCN: 45633141671   Ckp time: 25-Aug-2013 10:41:44
    Then the archivelog backup immediately following (remember, this created a total of 5 backupset, I'm showing number 4)
    BS Key  Size  
    Device Type Elapsed Time Completion Time
    5507687 650.19M
    DISK   
    00:02:18
    25-Aug-2013 10:54:53   ------- NOTE THE COMPLETION TIME ----
    BP Key: 5507694   Status: AVAILABLE  Compressed: YES  Tag: TAG20130825T104156
    Piece Name: /u01/backup/dbprod/ekoi643j_1_1.alog
      List of Archived Logs in backup set 5507687
      Thrd Seq
    Low SCN
    Low Time        
    Next SCN   Next Time
      1
    1338518 45632944587 25-Aug-2013 05:58:18 45632947563 25-Aug-2013 05:58:20
    ------ SNIP ------
      1
    1338572 45633135750 25-Aug-2013 10:08:21 45633140240 25-Aug-2013 10:08:24
      1
    1338573 45633140240 25-Aug-2013 10:08:24 45633141350 25-Aug-2013 10:30:06
      1
    1338574 45633141350 25-Aug-2013 10:30:06 45633141705 25-Aug-2013 10:41:51
      1
    1338575 45633141705 25-Aug-2013 10:41:51 45633141725 25-Aug-2013 10:41:55
    and the controlfile autobackup immediately following:
    BS Key  Type LV Size  
    Device Type Elapsed Time Completion Time
    5507984 Full
    61.89M
    DISK   
    00:00:03
    25-Aug-2013 10:55:07   ------- NOTE THE COMPLETION TIME ----
    BP Key: 5508043   Status: AVAILABLE  Compressed: NO  Tag: TAG20130825T105504
    Piece Name: /u01/backup/dbprod/DBPROD_c-3960114099-20130825-02_ctl.backup
      SPFILE Included: Modification time: 25-Aug-2013 05:57:15
      SPFILE db_unique_name: DBPROD
      Control File Included: Ckp SCN: 45633142131   Ckp time: 25-Aug-2013 10:55:04
    and yet, querying the rman catalog
    SQL> select to_char(max(completion_time),'yyyy-mm-dd hh24:mi:ss')
      2  from rc_backup_set_details
      3  where db_name='DBPROD'
      4  and backup_type='D'
      5  and incremental_level=0
      6  ;
    TO_CHAR(MAX(COMPLET
    2013-08-25 10:41:38
    SQL>
    which doesn't match (to the second) the completion time of either the full backup or the associated controlfile autobackp.
    Hemant K Chitale
    I hope this posts in a readable, understandable manner.  I really struggeled with the 'enhanced editor', which I normally use.  When I pasted in blocks from the rman report, it kept trying to make some sort of table structure out of it .... guess I'll have to follow that up with a question in the Community forum ....

  • Calling RMAN script with DBMS_JOB

    Hi,
    Maybe someone can help me out. I'm perfecting my skills on 9i in the backup area before I have a need to use them and am taking notes.
    What I want to do is to store the backup script in the recovery catalog (which I already did under the name BACKUP) and call that script on a daily basis using DBMS_JOBS.
    Here is my script:
    RMAN>CREATE SCRIPT 'BACKUP'
    {ALLOCATE CHANNEL C1 TYPE DISK;
    BACKUP INCREMENTAL LEVEL 0 DATABASE
    FILESPERSET 4;
    BACKUP ARCHIVELOG ALL;
    DELETE ARCHIVELOG UNTILTIME 'SYSDATE-7';}
    This script compiled and is stored in rman. I ran it and it worked. I also autoconfigured the parameters to backup the controlfile automatically when the backup or copy is done.
    Now my next goal is to get this script to run automatically everyday using DBMS_JOBS and this is where it is not working.
    I used the DBMS_JOB.SUBMIT parameters to store the job in this feature but first the procedure 'RUNBACKUP' must compile successfully.
    DBMS_JOB.SUBMIT(:1,'RUNBACKUP', SYSDATE,'SYSDATE+1');
    This RUNBACKUP is a procedure that has to be called by the DBMS_JOBS PACKAGE. But the procedure is where Im having problems trying to write.
    I am assuming that rman is not connected to the target database here. So this is what I think it should look like:
    CREATE OR REPLACE PROCEDURE RUNBACKUP
    BEGIN
    RMAN; --the first thing that           
    has to be called is rman executable.
    CONNECT TARGET AL/AL@BBROWN
    --now we have to connect the target db to rman.
    CONNECT CATALOG RMAN/RMAN@RCAT;
    -- connecting to the recovery catalog.
    RUN {EXECUTE SCRIPT 'BACKUP';} --execute the stored backup script
    END;
    Also, at the end of this procedure I would like to exit rman as the final command.
    Any ideas on this would be appreciated and thanks for your help in advance.
    Al

    You need to create a shell script to execute rman and add that script to cron, something like this:
    #!/bin/ksh
    # Script name: whole_db_backup.ksh
    export PATH=/oracle/app/9i/bin:$PATH
    export ORACLE_HOME=/oracle/app/9i
    export ORACLE_SID=MDR
    rman <<EOF
    connect target /
    connect catalog rmancat/PASS@RMANCAT
    run {execute script whole_db_backup;}
    exit
    EOF

  • RMAN Script in Solaris

    Hi,
    I am running Following rman script through shell in Solaris 10.2 to validate the database:
    oracle@mtcetl # cat rman_validate.sh
    #!/bin/bash
    ORACLE_HOME=/u01/app/oracle/product/10g
    PATH=$ORACLE_HOME/bin:$PATH
    ORACLE_SID=mtcedwp
    export ORACLE_HOME ORACLE_SID PATH
    rman target / <<EOF
    CONFIGURE DEVICE TYPE DISK PARALLELISM 8;
    ALLOCATE CHANNEL d1 DEVICE TYPE DISK;
    ALLOCATE CHANNEL d2 DEVICE TYPE DISK;
    ALLOCATE CHANNEL d3 DEVICE TYPE DISK;
    ALLOCATE CHANNEL d4 DEVICE TYPE DISK;
    ALLOCATE CHANNEL d5 DEVICE TYPE DISK;
    ALLOCATE CHANNEL d6 DEVICE TYPE DISK;
    ALLOCATE CHANNEL d7 DEVICE TYPE DISK;
    ALLOCATE CHANNEL d8 DEVICE TYPE DISK;
    BACKUP VALIDATE DATABASE;
    RELEASE CHANNEL d1;
    RELEASE CHANNEL d2;
    RELEASE CHANNEL d3;
    RELEASE CHANNEL d4;
    RELEASE CHANNEL d5;
    RELEASE CHANNEL d6;
    RELEASE CHANNEL d7;
    RELEASE CHANNEL d8;
    EOF
    I am executing this script as follows:
    oracle@mtcetl # nohup ./rman_validate.sh &
    Then I receive following errors in the nohup.out file:
    input datafile fno=00125 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_tds.385.702198275
    input datafile fno=00081 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_tds.340.695129943
    input datafile fno=00090 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_tds.349.695475749
    input datafile fno=00120 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_ads.380.700249057
    input datafile fno=00142 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_tds.402.707084055
    input datafile fno=00131 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_ads.391.704194625
    input datafile fno=00093 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_ods1.352.696598449
    input datafile fno=00099 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_ods1.358.696598613
    input datafile fno=00124 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_ods1.384.700933397
    input datafile fno=00070 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_rds.329.676059403
    input datafile fno=00111 name=+MTCDATA_GRP/mtcedwp/datafile/atbitdscdrpart.370.697290733
    input datafile fno=00002 name=+MTCDATA_GRP/mtcedwp/datafile/undotbs1.261.654101459
    input datafile fno=00071 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_ods_sbscrbr_hist_jan07.330.680708683
    input datafile fno=00072 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_ods_sbscrbr_hist_jan07.331.680708755
    input datafile fno=00008 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_rpstry.268.654113363
    input datafile fno=00051 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_dds.310.662492431
    input datafile fno=00067 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_rds_tapin.326.667722723
    channel ORA_DISK_8: starting compressed full datafile backupset
    channel ORA_DISK_8: specifying datafile(s) in backupset
    input datafile fno=00004 name=+MTCDATA_GRP/mtcedwp/datafile/users.264.654101503
    input datafile fno=00146 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_tds.406.707084307
    input datafile fno=00084 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_tds.343.695237005
    input datafile fno=00075 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_tds.334.695040959
    input datafile fno=00080 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_tds.339.695129765
    input datafile fno=00153 name=+MTCDATA_GRP/mtcedwp/datafile/users.413.708271033
    input datafile fno=00014 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_ads.274.654113499
    input datafile fno=00130 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_ads.390.704194583
    input datafile fno=00145 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_tds.405.707084139
    input datafile fno=00096 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_ods1.355.696598533
    input datafile fno=00149 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_tds.409.707569511
    input datafile fno=00106 name=+MTCDATA_GRP/mtcedwp/datafile/undotbs1.366.696693453
    input datafile fno=00117 name=+MTCDATA_GRP/mtcedwp/datafile/atbitdscdrpart.377.697290949
    input datafile fno=00016 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_olap.276.654113543
    input datafile fno=00013 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_dds.273.654113489
    input datafile fno=00035 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_ads_indexes.295.654113845
    input datafile fno=00064 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_ads_tapout.323.667722723
    input datafile fno=00126 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_ads_tapout.386.701419275
    input datafile fno=00134 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_ads_tapout.394.704728861
    input datafile fno=00055 name=+MTCDATA_GRP/mtcedwp/datafile/atbi_dds.314.662492689
    channel ORA_DISK_1: backup set complete, elapsed time: 00:54:31
    channel ORA_DISK_3: backup set complete, elapsed time: 01:10:07
    channel ORA_DISK_2: backup set complete, elapsed time: 01:11:23
    channel ORA_DISK_4: backup set complete, elapsed time: 01:12:08
    channel ORA_DISK_6: backup set complete, elapsed time: 01:12:52
    channel ORA_DISK_7: backup set complete, elapsed time: 01:12:52
    channel ORA_DISK_8: backup set complete, elapsed time: 01:14:27
    channel ORA_DISK_5: backup set complete, elapsed time: 01:30:23
    Finished backup at 09-APR-10
    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: ";"
    RMAN-01008: the bad identifier was: d1
    RMAN-01007: at line 1 column 17 file: standard input
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found ";": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, connect, copy, convert, create, crosscheck, c
    onfigure, duplicate, debug, delete, drop, exit, endinline, flashback, host, {, library, list, mount, open, print, quit, recover, register, release, replace, report, ren
    ormalize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport, upgrade, unregister, validate"
    RMAN-01007: at line 1 column 19 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: ";"
    RMAN-01008: the bad identifier was: d2
    RMAN-01007: at line 1 column 17 file: standard input
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found ";": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, connect, copy, convert, create, crosscheck, c
    onfigure, duplicate, debug, delete, drop, exit, endinline, flashback, host, {, library, list, mount, open, print, quit, recover, register, release, replace, report, ren
    ormalize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport, upgrade, unregister, validate"
    RMAN-01007: at line 1 column 19 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: ";"
    RMAN-01008: the bad identifier was: d3
    RMAN-01007: at line 1 column 17 file: standard input
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found ";": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, connect, copy, convert, create, crosscheck, c
    onfigure, duplicate, debug, delete, drop, exit, endinline, flashback, host, {, library, list, mount, open, print, quit, recover, register, release, replace, report, ren
    ormalize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport, upgrade, unregister, validate"
    RMAN-01007: at line 1 column 19 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: ";"
    RMAN-01008: the bad identifier was: d4
    RMAN-01007: at line 1 column 17 file: standard input
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found ";": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, connect, copy, convert, create, crosscheck, c
    onfigure, duplicate, debug, delete, drop, exit, endinline, flashback, host, {, library, list, mount, open, print, quit, recover, register, release, replace, report, ren
    ormalize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport, upgrade, unregister, validate"
    RMAN-01007: at line 1 column 19 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: ";"
    RMAN-01008: the bad identifier was: d5
    RMAN-01007: at line 1 column 17 file: standard input
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found ";": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, connect, copy, convert, create, crosscheck, c
    onfigure, duplicate, debug, delete, drop, exit, endinline, flashback, host, {, library, list, mount, open, print, quit, recover, register, release, replace, report, ren
    ormalize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport, upgrade, unregister, validate"
    RMAN-01007: at line 1 column 19 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: ";"
    RMAN-01008: the bad identifier was: d6
    RMAN-01007: at line 1 column 17 file: standard input
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found ";": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, connect, copy, convert, create, crosscheck, c
    onfigure, duplicate, debug, delete, drop, exit, endinline, flashback, host, {, library, list, mount, open, print, quit, recover, register, release, replace, report, ren
    ormalize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport, upgrade, unregister, validate"
    RMAN-01007: at line 1 column 19 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: ";"
    RMAN-01008: the bad identifier was: d7
    RMAN-01007: at line 1 column 17 file: standard input
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found ";": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, connect, copy, convert, create, crosscheck, c
    onfigure, duplicate, debug, delete, drop, exit, endinline, flashback, host, {, library, list, mount, open, print, quit, recover, register, release, replace, report, ren
    ormalize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport, upgrade, unregister, validate"
    RMAN-01007: at line 1 column 19 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: ";"
    RMAN-01008: the bad identifier was: d8
    RMAN-01007: at line 1 column 17 file: standard input
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found ";": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, connect, copy, convert, create, crosscheck, c
    onfigure, duplicate, debug, delete, drop, exit, endinline, flashback, host, {, library, list, mount, open, print, quit, recover, register, release, replace, report, ren
    ormalize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport, upgrade, unregister, validate"
    RMAN-01007: at line 1 column 19 file: standard input
    RMAN>
    Recovery Manager complete.
    regards

    Thanks for the help.
    The command has finished now and I didn't get a chance to check the ps -ef command.
    As you see in my original post, I am using nohup to run the script in the background and its sending its output to nohup.out file. But in the content of nohup.out file, there is no mention of report generated by RMAN regarding how many blocks it found. Output is as follows:
    oracle@TEST # more nohup.out
    Recovery Manager: Release 10.2.0.3.0 - Production on Sat Apr 10 10:45:28 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    connected to target database: TEST (DBID=978723866)
    RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> 21>
    using target database control file instead of recovery catalog
    old RMAN configuration parameters:
    CONFIGURE DEVICE TYPE DISK PARALLELISM 8 BACKUP TYPE TO COMPRESSED BACKUPSET;
    new RMAN configuration parameters:
    CONFIGURE DEVICE TYPE DISK PARALLELISM 8 BACKUP TYPE TO COMPRESSED BACKUPSET;
    new RMAN configuration parameters are successfully stored
    allocated channel: d1
    channel d1: sid=208 devtype=DISK
    allocated channel: d2
    channel d2: sid=427 devtype=DISK
    allocated channel: d3
    channel d3: sid=198 devtype=DISK
    allocated channel: d4
    channel d4: sid=448 devtype=DISK
    allocated channel: d5
    channel d5: sid=127 devtype=DISK
    allocated channel: d6
    channel d6: sid=434 devtype=DISK
    allocated channel: d7
    channel d7: sid=143 devtype=DISK
    allocated channel: d8
    channel d8: sid=430 devtype=DISK
    Starting backup at 10-APR-10
    channel d1: starting compressed full datafile backupset
    channel d1: specifying datafile(s) in backupset
    input datafile fno=00108 name=+TEST_GRP/TEST/datafile/undotbs1.368.696699605
    input datafile fno=00040 name=+TEST_GRP/TEST/datafile/TEST_tds.300.656367299
    input datafile fno=00085 name=+TEST_GRP/TEST/datafile/TEST_tds.344.695237023
    input datafile fno=00076 name=+TEST_GRP/TEST/datafile/TEST_tds.335.695041023
    input datafile fno=00046 name=+TEST_GRP/TEST/datafile/TEST_tds.305.662491879
    input datafile fno=00039 name=+TEST_GRP/TEST/datafile/TEST_ads.299.654710687
    input datafile fno=00048 name=+TEST_GRP/TEST/datafile/TEST_ads.307.662492133
    input datafile fno=00049 name=+TEST_GRP/TEST/datafile/TEST_ads.308.662492197
    input datafile fno=00107 name=+TEST_GRP/TEST/datafile/undotbs1.367.696699507
    input datafile fno=00098 name=+TEST_GRP/TEST/datafile/TEST_ods1.357.696598585
    input datafile fno=00150 name=+TEST_GRP/TEST/datafile/TEST_tds.410.707569569
    input datafile fno=00155 name=+TEST_GRP/TEST/datafile/TEST_ads.415.709551523
    input datafile fno=00113 name=+TEST_GRP/TEST/datafile/TESTtdscdrpart.373.697290733
    input datafile fno=00003 name=+TEST_GRP/TEST/datafile/sysaux.262.654101493
    input datafile fno=00001 name=+TEST_GRP/TEST/datafile/system.260.654101443
    input datafile fno=00010 name=+TEST_GRP/TEST/datafile/TEST_lds.270.654113411
    channel d2: starting compressed full datafile backupset
    channel d2: specifying datafile(s) in backupset
    input datafile fno=00086 name=+TEST_GRP/TEST/datafile/TEST_tds.345.695237043
    input datafile fno=00136 name=+TEST_GRP/TEST/datafile/TEST_tds.396.705247353
    input datafile fno=00128 name=+TEST_GRP/TEST/datafile/TEST_tds.388.702478685
    input datafile fno=00087 name=+TEST_GRP/TEST/datafile/TEST_tds.346.695237103
    input datafile fno=00078 name=+TEST_GRP/TEST/datafile/TEST_tds.337.695129727
    input datafile fno=00045 name=+TEST_GRP/TEST/datafile/TEST_tds.304.662491639
    input datafile fno=00119 name=+TEST_GRP/TEST/datafile/TEST_ads.379.700249037
    input datafile fno=00050 name=+TEST_GRP/TEST/datafile/TEST_ads.309.662492253
    input datafile fno=00132 name=+TEST_GRP/TEST/datafile/TEST_ads.392.704194655
    input datafile fno=00101 name=+TEST_GRP/TEST/datafile/TEST_ods1.360.696598703
    input datafile fno=00097 name=+TEST_GRP/TEST/datafile/TEST_ods1.356.696598559
    input datafile fno=00127 name=+TEST_GRP/TEST/datafile/TEST_ods1.387.701852257
    input datafile fno=00077 name=+TEST_GRP/TEST/datafile/users.336.695041119
    input datafile fno=00116 name=+TEST_GRP/TEST/datafile/TESTtdscdrpart.376.697290909
    input datafile fno=00006 name=+TEST_GRP/TEST/datafile/owbindex.266.654113339
    input datafile fno=00066 name=+TEST_GRP/TEST/datafile/TEST_rds_post_paid_cdr.325.667722723
    input datafile fno=00068 name=+TEST_GRP/TEST/datafile/TEST_rds_tapout.327.667722823
    input datafile fno=00109 name=+TEST_GRP/TEST/datafile/TEST_tds_user.372.696949827
    input datafile fno=00110 name=+TEST_GRP/TEST/datafile/uat_users.371.697117641
    input datafile fno=00033 name=+TEST_GRP/TEST/datafile/TEST_tds_indexes.293.654113827
    channel d3: starting compressed full datafile backupset
    channel d3: specifying datafile(s) in backupset
    input datafile fno=00057 name=+TEST_GRP/TEST/datafile/undotbs1.365.696688443
    input datafile fno=00140 name=+TEST_GRP/TEST/datafile/TEST_tds.400.707083997
    input datafile fno=00083 name=+TEST_GRP/TEST/datafile/TEST_tds.342.695130467
    input datafile fno=00074 name=+TEST_GRP/TEST/datafile/TEST_tds.333.695040881
    input datafile fno=00079 name=+TEST_GRP/TEST/datafile/TEST_tds.338.695129749
    input datafile fno=00152 name=+TEST_GRP/TEST/datafile/users.412.707602603
    input datafile fno=00047 name=+TEST_GRP/TEST/datafile/TEST_ads.306.662492079
    input datafile fno=00133 name=+TEST_GRP/TEST/datafile/TEST_ads.393.704194691
    input datafile fno=00091 name=+TEST_GRP/TEST/datafile/TEST_ods1.350.696598015
    input datafile fno=00100 name=+TEST_GRP/TEST/datafile/TEST_ods1.359.696598683
    input datafile fno=00105 name=+TEST_GRP/TEST/datafile/TEST_ods1.364.696598825
    input datafile fno=00012 name=+TEST_GRP/TEST/datafile/TEST_sds.272.654113455
    input datafile fno=00069 name=+TEST_GRP/TEST/datafile/TEST_rds.328.676059355
    input datafile fno=00115 name=+TEST_GRP/TEST/datafile/TESTtdscdrpart.375.697290875
    input datafile fno=00118 name=+TEST_GRP/TEST/datafile/TEST_sds.378.698406119
    input datafile fno=00059 name=+TEST_GRP/TEST/datafile/TEST_tds_post_paid_cdr.318.667722719
    input datafile fno=00060 name=+TEST_GRP/TEST/datafile/TEST_ods_post_paid_cdr.319.667722719
    input datafile fno=00061 name=+TEST_GRP/TEST/datafile/TEST_ods_tapout.320.667722721
    input datafile fno=00062 name=+TEST_GRP/TEST/datafile/TEST_ods_tapin.321.667722721
    input datafile fno=00063 name=+TEST_GRP/TEST/datafile/TEST_ads_post_paid_cdr.322.667722721
    channel d4: starting compressed full datafile backupset
    channel d4: specifying datafile(s) in backupset
    input datafile fno=00154 name=+TEST_GRP/TEST/datafile/users.414.708271719
    input datafile fno=00135 name=+TEST_GRP/TEST/datafile/TEST_tds.395.705247313
    input datafile fno=00042 name=+TEST_GRP/TEST/datafile/TEST_tds.302.656520125
    input datafile fno=00073 name=+TEST_GRP/TEST/datafile/TEST_tds.332.695040819
    input datafile fno=00082 name=+TEST_GRP/TEST/datafile/TEST_tds.341.695130447
    input datafile fno=00147 name=+TEST_GRP/TEST/datafile/TEST_tds.407.707084333
    input datafile fno=00122 name=+TEST_GRP/TEST/datafile/TEST_ads.382.700249099
    input datafile fno=00144 name=+TEST_GRP/TEST/datafile/TEST_tds.404.707084111
    input datafile fno=00038 name=+TEST_GRP/TEST/datafile/TEST_ads.298.654710453
    input datafile fno=00102 name=+TEST_GRP/TEST/datafile/TEST_ods1.361.696598723
    input datafile fno=00094 name=+TEST_GRP/TEST/datafile/TEST_ods1.353.696598467
    input datafile fno=00044 name=+TEST_GRP/TEST/datafile/undotbs1.271.696679255
    input datafile fno=00015 name=+TEST_GRP/TEST/datafile/TEST_rds.275.654113509
    input datafile fno=00065 name=+TEST_GRP/TEST/datafile/TEST_ads_tapin.324.667722723
    input datafile fno=00031 name=+TEST_GRP/TEST/datafile/TEST_rds_dly_act_smry_jan07.291.654113807
    input datafile fno=00032 name=+TEST_GRP/TEST/datafile/TEST_rds_dly_act_smry_maxval.292.654113817
    input datafile fno=00036 name=+TEST_GRP/TEST/datafile/TEST_rds_indexes.296.654113879
    input datafile fno=00037 name=+TEST_GRP/TEST/datafile/dbatemp.297.654113889
    input datafile fno=00043 name=+TEST_GRP/TEST/datafile/TEST_ods_sbscrbr_hist.303.656530541
    input datafile fno=00058 name=+TEST_GRP/TEST/datafile/TEST_tds_post_paid_src.317.667722667
    channel d5: starting compressed full datafile backupset
    channel d5: specifying datafile(s) in backupset
    input datafile fno=00011 name=+TEST_GRP/TEST/datafile/dba_activity.316.696605947
    input datafile fno=00104 name=+TEST_GRP/TEST/datafile/TEST_ods1.363.696598773
    input datafile fno=00151 name=+TEST_GRP/TEST/datafile/TEST_ads.411.707569675
    input datafile fno=00123 name=+TEST_GRP/TEST/datafile/TEST_ods1.383.700933365
    input datafile fno=00056 name=+TEST_GRP/TEST/datafile/TEST_rds.315.662492837
    input datafile fno=00112 name=+TEST_GRP/TEST/datafile/TESTtdscdrpart.369.697290733
    input datafile fno=00007 name=+TEST_GRP/TEST/datafile/owbuser.267.654113349
    input datafile fno=00017 name=+TEST_GRP/TEST/datafile/TEST_olap_audit.277.654113553
    input datafile fno=00018 name=+TEST_GRP/TEST/datafile/TEST_ods_cdr.278.654113587
    input datafile fno=00019 name=+TEST_GRP/TEST/datafile/TEST_ods_edr.279.654113597
    input datafile fno=00020 name=+TEST_GRP/TEST/datafile/TEST_ods_sms.280.654113631
    input datafile fno=00021 name=+TEST_GRP/TEST/datafile/TEST_ods_sbscrbr_hist.281.654113639
    input datafile fno=00023 name=+TEST_GRP/TEST/datafile/TEST_ods_sbscrbr_hist_maxval.283.654113657
    input datafile fno=00024 name=+TEST_GRP/TEST/datafile/TEST_ads_actvty_cube.284.654113691
    input datafile fno=00025 name=+TEST_GRP/TEST/datafile/TEST_ads_actvty_cube_jan07.285.654113701
    input datafile fno=00026 name=+TEST_GRP/TEST/datafile/TEST_ads_actvty_cube_maxval.286.654113711
    input datafile fno=00027 name=+TEST_GRP/TEST/datafile/TEST_ads_subss_status_fact.287.654113719
    input datafile fno=00028 name=+TEST_GRP/TEST/datafile/TEST_ads_subs_stts_fct_jan07.288.654113729
    input datafile fno=00029 name=+TEST_GRP/TEST/datafile/TEST_ads_subs_stts_fct_maxval.289.654113763
    input datafile fno=00030 name=+TEST_GRP/TEST/datafile/TEST_rds_dly_actvty_smry.290.654113773
    channel d6: starting compressed full datafile backupset
    channel d6: specifying datafile(s) in backupset
    input datafile fno=00089 name=+TEST_GRP/TEST/datafile/TEST_tds.348.695475571
    input datafile fno=00138 name=+TEST_GRP/TEST/datafile/TEST_tds.398.706176093
    input datafile fno=00041 name=+TEST_GRP/TEST/datafile/TEST_tds.301.656463415
    input datafile fno=00009 name=+TEST_GRP/TEST/datafile/TEST_tds.269.654113401
    input datafile fno=00088 name=+TEST_GRP/TEST/datafile/TEST_tds.347.695475473
    input datafile fno=00141 name=+TEST_GRP/TEST/datafile/TEST_tds.401.707084029
    input datafile fno=00121 name=+TEST_GRP/TEST/datafile/TEST_ads.381.700249081
    input datafile fno=00143 name=+TEST_GRP/TEST/datafile/TEST_tds.403.707084083
    input datafile fno=00092 name=+TEST_GRP/TEST/datafile/TEST_ods1.351.696598425
    input datafile fno=00095 name=+TEST_GRP/TEST/datafile/TEST_ods1.354.696598497
    input datafile fno=00103 name=+TEST_GRP/TEST/datafile/TEST_ods1.362.696598755
    input datafile fno=00148 name=+TEST_GRP/TEST/datafile/TEST_tds.408.707569461
    input datafile fno=00156 name=+TEST_GRP/TEST/datafile/TEST_rds.257.714381137
    input datafile fno=00114 name=+TEST_GRP/TEST/datafile/TESTtdscdrpart.374.697290735
    input datafile fno=00034 name=+TEST_GRP/TEST/datafile/TEST_ods_indexes.294.654113835
    input datafile fno=00022 name=+TEST_GRP/TEST/datafile/TEST_ods_sbscrbr_hist_jan07.282.654113649
    input datafile fno=00053 name=+TEST_GRP/TEST/datafile/TEST_dds.312.662492551
    input datafile fno=00052 name=+TEST_GRP/TEST/datafile/TEST_dds.311.662492489
    input datafile fno=00054 name=+TEST_GRP/TEST/datafile/TEST_dds.313.662492619
    input datafile fno=00005 name=+TEST_GRP/TEST/datafile/owbdata.265.654113297
    channel d7: starting compressed full datafile backupset
    channel d7: specifying datafile(s) in backupset
    input datafile fno=00137 name=+TEST_GRP/TEST/datafile/TEST_tds.397.706176033
    input datafile fno=00139 name=+TEST_GRP/TEST/datafile/TEST_tds.399.706176127
    input datafile fno=00129 name=+TEST_GRP/TEST/datafile/TEST_tds.389.702542715
    input datafile fno=00125 name=+TEST_GRP/TEST/datafile/TEST_tds.385.702198275
    input datafile fno=00081 name=+TEST_GRP/TEST/datafile/TEST_tds.340.695129943
    input datafile fno=00090 name=+TEST_GRP/TEST/datafile/TEST_tds.349.695475749
    input datafile fno=00120 name=+TEST_GRP/TEST/datafile/TEST_ads.380.700249057
    input datafile fno=00142 name=+TEST_GRP/TEST/datafile/TEST_tds.402.707084055
    input datafile fno=00131 name=+TEST_GRP/TEST/datafile/TEST_ads.391.704194625
    input datafile fno=00093 name=+TEST_GRP/TEST/datafile/TEST_ods1.352.696598449
    input datafile fno=00099 name=+TEST_GRP/TEST/datafile/TEST_ods1.358.696598613
    input datafile fno=00124 name=+TEST_GRP/TEST/datafile/TEST_ods1.384.700933397
    input datafile fno=00070 name=+TEST_GRP/TEST/datafile/TEST_rds.329.676059403
    input datafile fno=00111 name=+TEST_GRP/TEST/datafile/TESTtdscdrpart.370.697290733
    input datafile fno=00002 name=+TEST_GRP/TEST/datafile/undotbs1.261.654101459
    input datafile fno=00071 name=+TEST_GRP/TEST/datafile/TEST_ods_sbscrbr_hist_jan07.330.680708683
    input datafile fno=00072 name=+TEST_GRP/TEST/datafile/TEST_ods_sbscrbr_hist_jan07.331.680708755
    input datafile fno=00008 name=+TEST_GRP/TEST/datafile/TEST_rpstry.268.654113363
    input datafile fno=00051 name=+TEST_GRP/TEST/datafile/TEST_dds.310.662492431
    input datafile fno=00067 name=+TEST_GRP/TEST/datafile/TEST_rds_tapin.326.667722723
    channel d8: starting compressed full datafile backupset
    channel d8: specifying datafile(s) in backupset
    input datafile fno=00004 name=+TEST_GRP/TEST/datafile/users.264.654101503
    input datafile fno=00146 name=+TEST_GRP/TEST/datafile/TEST_tds.406.707084307
    input datafile fno=00084 name=+TEST_GRP/TEST/datafile/TEST_tds.343.695237005
    input datafile fno=00075 name=+TEST_GRP/TEST/datafile/TEST_tds.334.695040959
    input datafile fno=00080 name=+TEST_GRP/TEST/datafile/TEST_tds.339.695129765
    input datafile fno=00153 name=+TEST_GRP/TEST/datafile/users.413.708271033
    input datafile fno=00014 name=+TEST_GRP/TEST/datafile/TEST_ads.274.654113499
    input datafile fno=00130 name=+TEST_GRP/TEST/datafile/TEST_ads.390.704194583
    input datafile fno=00145 name=+TEST_GRP/TEST/datafile/TEST_tds.405.707084139
    input datafile fno=00096 name=+TEST_GRP/TEST/datafile/TEST_ods1.355.696598533
    input datafile fno=00149 name=+TEST_GRP/TEST/datafile/TEST_tds.409.707569511
    input datafile fno=00106 name=+TEST_GRP/TEST/datafile/undotbs1.366.696693453
    input datafile fno=00117 name=+TEST_GRP/TEST/datafile/TESTtdscdrpart.377.697290949
    input datafile fno=00016 name=+TEST_GRP/TEST/datafile/TEST_olap.276.654113543
    input datafile fno=00013 name=+TEST_GRP/TEST/datafile/TEST_dds.273.654113489
    input datafile fno=00035 name=+TEST_GRP/TEST/datafile/TEST_ads_indexes.295.654113845
    input datafile fno=00064 name=+TEST_GRP/TEST/datafile/TEST_ads_tapout.323.667722723
    input datafile fno=00126 name=+TEST_GRP/TEST/datafile/TEST_ads_tapout.386.701419275
    input datafile fno=00134 name=+TEST_GRP/TEST/datafile/TEST_ads_tapout.394.704728861
    input datafile fno=00055 name=+TEST_GRP/TEST/datafile/TEST_dds.314.662492689
    channel d1: backup set complete, elapsed time: 00:54:41
    channel d3: backup set complete, elapsed time: 01:10:07
    channel d2: backup set complete, elapsed time: 01:11:12
    channel d4: backup set complete, elapsed time: 01:12:18
    channel d6: backup set complete, elapsed time: 01:12:42
    channel d7: backup set complete, elapsed time: 01:12:57
    channel d8: backup set complete, elapsed time: 01:14:31
    channel d5: backup set complete, elapsed time: 01:30:28
    Finished backup at 10-APR-10
    released channel: d1
    released channel: d2
    released channel: d3
    released channel: d4
    released channel: d5
    released channel: d6
    released channel: d7
    released channel: d8
    RMAN>
    Recovery Manager complete.Edited by: Fahd Mirza on Apr 10, 2010 8:37 PM

  • Problem with RMAN script

    Hi,
    I have wriiten RMAN script to report need backup?below the code
    #!/bin/ksh
    export ORACLE_SID=test1
    echo $ORACLE_SID
    export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
    echo $ORACLE_HOME
    export PATH
    echo $PATH
    RMAN=$ORACLE_HOME/bin/rman
    $RMAN target sys/sys@test1 nocatalog
    RUN {
    report need backup;}
    exit;
    echo "Completd"The problem is that when i run the script it goes into the RMAN prompt and doesnt run "report need backup". I guess its unable to recognize the run command.below the error
    ./full_db_hot_backup.sh[14]: RUN: not found [No such file or directory]
    ./full_db_hot_backup.sh: line 14: syntax error at line 15: `}' unexpected

    Write as following
    $ORACLE_HOME/bin/rman << EOF
    connect target /
    run
    report need backup;
    exit
    EOF
    Talip Hakan Ozturk
    http://taliphakanozturken.wordpress.com/

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

Maybe you are looking for