ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE DISK

Why does the command
"ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE DISK;"
work when running RMAN interactively and not from a script??
The error I get in the script is...
18>      ALLOCATE CHANNEL FOR
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found "for": expecting one of: "channel_id, double-quoted-string, identifier, single-quoted-string"
RMAN-01007: at line 18 column 18 file: D:\oracle\ora92\hpcs\Rman_DeleteObsolete.rman
How can I delete these obsolete backups from the script?

FIXED IT.
The ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE DISK command had to be outside of the RMAN RUN BLOCK.
All works 100% now.

Similar Messages

  • ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE sbt

    what are the scenarios that we have to use the below statement.
    RMAN> ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE sbt;

    first you have to understand why we allocate channel for rman..it crates a session to target database,To manually allocate a channel, which is a connection between RMAN and a database instance. Each connection initiates an Oracle server session on the target or auxiliary instance: this server session performs the work of backing up, restoring, or recovering backup sets and copies.
    Restrictions and Usage of this command
    Execute this command only at the RMAN prompt. This command cannot be used within a RUN block.
    The target instance must be started.
    Do not specify a channel ID.
    You cannot allocate a maintenance channel to a shared session.
    You cannot prefix ORA_ to a channel name. RMAN reserves channel names beginning with the ORA_ prefix for its own use.
    Manually allocated channels (maintenance or normal channels) and automatic channels based on configured settings are never mixed. To perform maintenance on both disk and SBT simultaneously using manually allocated maintenance channels, you must allocate both SBT and DISK channels explicitly.
    If you use ALLOCATE CHANNEL FOR MAINTENANCE, then RMAN uses the following convention for channel naming: ORA_MAINT_devicetype_n, where devicetype refers to DISK or sbt and n refers to the channel number. For example, RMAN uses these names for two manually allocated disk channels:
    ORA_MAINT_DISK_1
    ORA_MAINT_DISK_2
    You can allocate multiple maintenance channels for a single job, but you should only use this feature in these situations:
    o
    To allow crosschecking or deletion of all backup pieces or proxy copies, both on disk and tape, with a single command
    o
    To make crosschecking and deleting work correctly in an Oracle Real Application Clusters configuration in which each backup piece or proxy copy exists only on one node
    here is some example of this command you should check this..
    Deleting a Backup Set: Example This example deletes backup sets from tape created more than a week ago:
    ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE sbt;
    DELETE NOPROMPT BACKUP OF DATABASE COMPLETED BEFORE 'SYSDATE-7';
    Crosschecking Archived Logs: Example This example crosschecks all archived logs on disk and tape. For disk, the preconfigured disk channel is used; for tape, an SBT channel is allocated manually. If the logs are not found, then RMAN marks them as EXPIRED in the repository:
    ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE sbt;
    CROSSCHECK ARCHIVELOG ALL;
    Crosschecking on Multiple Nodes of an Oracle Real Application Clusters Configuration: Example In this example, you perform a crosscheck of backups on two nodes of an Oracle Real Application Clusters configuration, where each node has access to a subset of backups. It is assumed here that all backups are accessible by at least one of the two nodes used in the crosscheck. Any backups not accessible from at least one of the nodes are marked EXPIRED after the crosscheck.
    ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE DISK CONNECT 'SYS/change_on_install@inst1';
    ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE DISK CONNECT 'SYS/change_on_install@inst2';
    CROSSCHECK BACKUP;

  • CONFIGURE CHANNEL DEVICE TYPE DISK  doesn't function

    Dear all,
    I have a problem with a backup.
    Facts:
    OS: SunOS hod 5.10 Generic_142901-03 i86pc i386 i86pc
    Oracle 11.2.0.1 with RAC
    So, Although i put in rman parameters section the CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/rman/backups/%U'; the backup was done but in FRA that is located in
    BS Key  Type LV   Size       Device Type  Elapsed Time  Completion Time
    36 Incr 0 210.82G DISK 10:32:57 24-JAN-13
    BP Key: 36 Status: AVAILABLE Compressed: YES Tag: TAG20130123T210005
    *Piece Name: +DATA/db_name/backupset/2013_01_23/nnndn0_tag20130123t210005_0.442.805496407*
    List of Datafiles in backup set 36...
    ANd my question is:
    How, although i configure that the backups would be in /rman/backups/%U this was located in +DATA (fRA) ??
    what im doing wrong ??
    Thanks for your help.

    thanks for your answer: here is my rman script. We invoked the script like this: rman_db_script.sh SID 0
    #!/bin/ksh
    function email_dba
    if [ -s $email_file ]
    then
    subj="$prog: FAILED on $sid@$box at `date`"
    while read dba_id
    do
    mailx -s "$subj" $dba_id < $email_file
    echo "mailx -s "$subj" $dba_id "
    done < /oracle/app/oracle/dba/util/motifylist.txt
    fi
    # set and check
    function set_and_check
    ps -ef | grep ora_pmon_$sid | grep -v grep > /dev/null
    rc=$?
    if [ $rc != 0 ]
    then
    echo "$prog: database $ORACLE_SID is not online" >> $log_file
    echo "$prog: database $ORACLE_SID is not online" >> $email_file
    # email_dba
    exit 1
    fi
    rtime=`date '+%Y%m%d_%H%M'`
    ORACLE_BASE=/opt/app/oracle
    ORACLE_HOME=/opt/app/oracle/product/11.2.0/dbhome_1
    export ORACLE_HOME
    PATH=$ORACLE_HOME/bin:$PATH
    export PATH
    logdir=/opt/oracle/logs
    log_file=$logdir/$prog.$sid.level${bk_level}.log.$rtime
    email_file="$logdir/$prog.email.$sid"
    cat /dev/null > $email_file
    box=`hostname`
    orauser=oracle
    bk_dir=/rman/backups/$sid
    echo "===== `date '+%Y%m%d %H:%M:%S'` $prog: Started =====" > $log_file
    backup_type="INCREMENTAL LEVEL $bk_level"
    # find $logdir -name $prog.*.log.* -type f -mtime +10 -exec /bin/rm -f {} \;
    # find $bk_dir -name ctl.* -type f -mtime +10 -exec /bin/rm -f {} \;
    echo "ORACLE_SID=$ORACLE_SID" >> $log_file
    echo "ORACLE_USER=$orauser" >> $log_file
    echo "ORACLE_HOME=$ORACLE_HOME" >> $log_file
    echo "BACKUP TYPE=$backup_type" >> $log_file
    return
    # backup database and archive logs to disk
    function backup_dbs_to_disk
    echo "===== Backup $sid to FRA Started At `date` =====" >> $log_file
    $ORACLE_HOME/bin/rman nocatalog << rman_cmd >> $log_file 2>&1
    connect target
         # se haran en el directorio sgte no en el FRA
         CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/rman/backups/%U';
    #CONFIGURE CONTROLFILE AUTOBACKUP ON;
    run
    ALLOCATE CHANNEL ch1 TYPE disk ;
    BACKUP $backup_type
    filesperset 10
    DATABASE;
    sql 'alter system archive log current';
    BACKUP filesperset 10 ARCHIVELOG ALL DELETE ALL INPUT;
    sql "alter database backup controlfile to trace as ''$bk_dir/ctl.trc.$rtime''";
    sql "alter database backup controlfile to ''$bk_dir/ctl.$rtime'' reuse";
    RELEASE CHANNEL ch1;
    #CONFIGURE CONTROLFILE AUTOBACKUP OFF;
    rman_cmd
    rc=$?
    if [ $rc != 0 ]
    then
    echo "Backup $sid to Disk Failed At `date`" >> $log_file
    echo "Backup $sid to Disk Failed At `date`" >> $email_file
    email_dba
    exit 1
    else
    echo "===== Backup $sid to Disk Completed At `date` =====" >> $log_file
    fi
    return
    # delete obsolete backups
    function del_obsolete_bk
    echo "===== Delete Obsolete Backups Started At `date` =====" >> $log_file
    $ORACLE_HOME/bin/rman nocatalog << rman_cmd >> $log_file 2>&1
    connect target
    ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE DISK;
    Report obsolete;
    delete force noprompt obsolete;
    rman_cmd
    rc=$?
    if [ $rc != 0 ]
    then
    echo "Delete Obsolete Backups Failed At `date`" >> $log_file
    echo "Delete Obsolete Backups Failed At `date`" >> $email_file
    email_dba
    exit 1
    else
    echo "===== Delete Obsolete Backups Completed At `date` =====" >> $log_file
    fi
    return
    # main program
    if [ $# -ne 2 ]
    then
    clear
    echo "\nIncorrect argument, ORACLE_SID Backup_Level needed\n"
    echo "\nUsage: $0 ORACLE_SID BACKUP_LEVEL(0/1)\n"
    return 1
    fi
    sid=$1
    bk_level=$2
    diff_cum=$3
    # prog=`basename $0`
    prog=rman_backup_dbs.sh
    export debug='N'
    if [[ $debug = 'Y' ]];then set -x;fi
    unset ORACLE_SID
    unset ORACLE_HOME
    unset SQLPATH
    ORACLE_SID=$sid
    export ORACLE_SID
    set_and_check
    backup_dbs_to_disk
    del_obsolete_bk
    echo "===== `date '+%Y%m%d %H:%M:%S'` $prog: Completed =====" >> $log_file
    subj="$sid@$box backup completed successfully at `date`"
    # while read dba_id
    # do
    # mailx -s "$subj" $dba_id < $log_file
    # done < /oracle/app/oracle/dba/util/backup/scripts/email_dba.list
    return 0
    # end program
    #############################################################################

  • CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT =SHOW DATE

    Hello everyone.
    The version I am using oracle 11g
    2 questions:
    1 .- CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/ ora_backup / backupset /% F'; I get error
    I want the backup to show the date format, as it can get.
    2 .- CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/ ora_backup / backupset /% F_.bak';
    rename the extension back to. Bak, one can view the SQL SERVER.
    Thanks,Bye.

    %F is only vaild for controlfile autobackups, there are other elements to store the date:
    http://download.oracle.com/docs/cd/B28359_01/backup.111/b28273/rcmsubcl010.htm#i82206
    Werner

  • CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT

    Hello everyone.
    The version I am using oracle 11g
    2 questions:
    1 .- CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/ ora_backup / backupset /% F'; I get error
    I want the backup to show the date format, as it can get.
    2 .- CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/ ora_backup / backupset /% F_.bak';
    rename the extension back to. Bak, one can view the SQL SERVER.
    Thanks,Bye.
    Edited by: rafelbunyol on 04-feb-2009 5:17
    Edited by: rafelbunyol on 04-feb-2009 5:19

    Hi,
    Probably you were not connected.
    Try:
    connect target /;
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/ora_backup/backupset/%F';
    My output on the last command:
    new RMAN configuration parameters:
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/ora_backup/backupset/%F';
    new RMAN configuration parameters are successfully stored
    Regards,
    Tycho

  • RMAN-06466: error parsing configuration string (CONFIGURE DEVICE TYPE DISK

    Hi All
    Windows 2003 and 10.2.0.4
    I get the following message when executing show all; connected to rman
    (I have used grid control 11g for the first configuration of rman. Not sure if it has an impact.)
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
    CONFIGURE BACKUP OPTIMIZATION OFF; # default
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    CONFIGURE CONTROLFILE AUTOBACKUP OFF;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F';
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of show command at 09/22/2011 16:04:11
    RMAN-12010: automatic channel allocation initialization failed
    RMAN-06466: error parsing configuration string (CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO BACKUPSET PARALLELISM 1;)
    RMAN-01005: syntax error: found "backup": expecting one of: "clear, parallelism"
    RMAN-01007: at line 1 column 28 file: Configuration Row
    RMAN>
    Reading the manual Database Backup and Recovery Basics
    I should be able to configure it like this
    RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01005: syntax error: found "backup": expecting one of: ";"
    RMAN-01007: at line 1 column 42 file: standard input
    Anyone that can help me with this ?
    Appreciate your feedback.
    Thanks
    Magnus

    What happens if you type "CONFIGURE DEVICE TYPE DISK CLEAR;" ?

  • RMAN CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO BACKUPSET;

    I configure this , How i can clear this ?
    CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO BACKUPSET;

    I assume you would have tried
    CONFIGURE DEVICE TYPE DISK CLEAR;(as described in the documentation) before asking the question.
    What about this does not work for you?

  • Textbook download error message: "Document is not licensed for this device type"

    Hi everyone,
    I bought a textbook that came with a free digital edition. I downloaded it, then tried to load it into Digital Editions (which I registered to my account). The texbook almost finished importing, then at the very end gave me an error message that said "[The name of the book]: Document is not licensed for this device type." The textbook is published by Aspen Law. I'm running Mac OS X 10.7.1 (Lion). Has anyone else had a similar issue or know of a resolution?
    I've looked at other forum posts, and my situation seems remarkable like this one:
    http://forums.adobe.com/message/3098928#3098928
    I called the publishing company and tried to explain this to them, but they just said it was a problem with Adobe and Mac.
    Thanks in advance,
    Chris

    OK - here's the issue.
    When I downloaded Adobe Digital Editions I authorized my computer with my Adobe Account - apparently I wasn't supposed to do that.  McGraw-Hill said that their file would ONLY work if the computer was not authorized with an Adobe Account (they should have said so after the order).
    So after de-authorizing the account (ctrl+shift+d) I tried to open up the .acsm file again and I got a new error: e_lic_already_fulfilled_by_another_user.  I'm afraid that the license was used up by Adobe Account, never mind that it actually never downloaded.
    I guess the next step is to try and get another license issued?

  • No liscense for the device type?

    So, my Digital Editions refuses to let me view my ebooks or download them.  Everytime I try
    something the "Document not liscensed for this device type" message pops up.
    Anyone know what this is all about and how to fix it?
    Thanks in advance.

    I had the same problem with my Nook, but it was because when I first installed ADE, I didn't have an Adobe user name.  It installs ADE differently when you do that.
    So I dug around on the hard drive and found Adobe stuff all over the place, including not only user areas, but the system areas also.  Deleted every reference to ADE and the Adobe stuff I knew wouldn't affect my other Adobe products and restarted, re-installed ADE and then plugged in the Nook, and THEN started ADE.  It found the Nook and it works fine now.
    I don't know if this is the fix in your case.

  • Number Range for Maintenance Order Type

    Dear All,
    Please help me in regarding for Number range  Change in Maintenance Order Type.
    I have different types of maintenance order...such as PM01,PM02, PM03, PM04, PM05, PM06, PM07, PM08.
    and i have to assign number range different for all the maintenance order type. kindly help how can i assign the same separately.
    also in case of Notification types also.
    Early response is highly appreciated.
    Thanks
    Sushant

    Greetings Sushant,
    Firstly, maintain all the Order Types you want in SPRO.
    To maintain the number ranges, you will need to go to t-code OION. Then select "Maintain Groups (F6)" and create a group with a number range for each of the Order Types that you require.  Each will be a separate interval. Then place the cursor on the unassigned Order Type and select "Assign Element Group (F7)" Repeat for each Order Type.
    Notification number ranges are maintained in t-code IW20

  • Unable to allocate channel device type sbt

    Hi,
    This is my first post on this forum so please advice me if I do something stupid.
    This oracle instance is version: 11.2.0.1
    Running on RHEL 5.6
    So, my problem is that I can't allocate sbt channel/device to crosscheck archivelogs.
    We are using Symantec's Backup Exec to manage your backups, and by looking it's log's (attached below) this should work. What I'am missing?
    Command I'm trying to run:
    RMAN> allocate channel for maintenance device type stb;
    ORA-27211: Failed to load Media Management Library
    I have check't the libobk.so is link'd from $ORACLE_HOME/lib/libobk.so -> VRTSralus/bin/libobk.so.
    BE's log:
    RUN {
    ALLOCATE CHANNEL ch0
    TYPE 'SBT_TAPE';
    SEND '**************';
    BACKUP
    INCREMENTAL LEVEL=0
    FORMAT 'BE_U'
    DATABASE FORCE PLUS ARCHIVELOG FORCE NOT BACKED UP DELETE INPUT;
    BACKUP CURRENT CONTROLFILE
    FORMAT 'BE_U';
    RELEASE CHANNEL ch0;
    connected to target database: PROD
    using target database control file instead of recovery catalog
    allocated channel: ch0
    channel ch0: SID=3987 device type=SBT_TAPE
    channel ch0: Symantec/BackupExec/1.1.0
    sent command to channel: ch0
    Thanks for your help
    Kalle
    P.S. Moved from General questions to RMAN

    im not familiar with Symantec's Backup Exec, but i think you are missing the SEND part in your manual allocation (which is present in the backup log)
    You can specify media management parameters in RMAN backup and restore jobs by the following means:
        Environment variables, which are specified with the ENV parameter of the PARMS option on the CONFIGURE or ALLOCATE CHANNEL commands
        The RMAN SEND command

  • RMAN / channels and device types

    Hello,
    I have a question.
    In the RMAN documentation (for instance in "Oracle Database Backup and Recovery Advanced User's Guide 10g Release 2") one can find the description / instructions how
    to allocate RMAN channels and define the device types.
    There are 2x described device types - DISK and SBT (Tape).
    My question is:
    IS IT POSSIBLE TO USE A PIPE AS A RMAN DEVICE TYPE ?
    If it is not possible to define direct, perhaps there is a possibility to define it
    indirect and to use a pipe to write data.
    Regards.
    Neitour

    Thank you for the link. Is it this RMAN 'duplicate database' option, what you
    would like to recommend me to use?
    I think, it is not exactly what I really need. For 'duplicate database' I will need
    to have as a source a backup of the database and not a running productive
    database.
    Is it correct?
    If it is, it is not what I'd like to do.
    I'd like to make a copy of a productive running database, which is placed on ASM
    storage, to another server creating such a way a database also placed on ASM
    storage. I'd like to do it directly. I think the best possible way can be
    RMAN / BACKUP --> PIPE --> RMAN / RESTORE.
    The issue is - how can I configure RMAN to write BACKUP into a PIPE and
    to read data for RESTORE from a PIPE.
    Any ideas?
    Regards
    Neitour

  • Allocate channel manually for RMAN restore/recovery

    How i can manually allocate channel for my backups going to tape?
    For disk backups i can do and it work...
    RUN
    ALLOCATE CHANNEL disk1 DEVICE TYPE DISK FORMAT 'J:\dbname\%U';
    restore database preview;
    }

    Hi,
    Sorry to say, on first impression "I would have fired the employee for posting the company/organization code to outside world with out any going through norms"
    Secondly, why can't you debug the code by your self ?
    I apologize if you felt bad... since it's not a professional way to discuss the issue
    - Pavan Kumar N
    Edited by: Pavan Kumar on Jun 27, 2012 11:29 PM
    Edited by: Pavan Kumar on Jun 27, 2012 11:32 PM

  • What is diffrence bet'n allocate channel & maintenance channel in RMAN Back

    Dear All,
    Please tell me the diffrence between allocate channel & maintenance channel in RMAN BACKUP.
    waiting for reply...
    Regards,
    .................

    user9161658      
         Newbie
    Handle:      user9161658
    Status Level:      Newbie (5)
    Registered:      Feb 15, 2010
    Total Posts:      67
    Total Questions:      23 (23 unresolved)
    RMAN Channel is a communication pipeline between a RMAN executable and a target or auxiliary database.
    To manually allocate a Maintenance channel in preparation for issuing a CHANGE, DELETE,or CROSSCHECK command. Note that if you use CONFIGURE to set up automatic channels, then RMAN can use these automatic channels for maintenance operations; you do not have to manually allocate them.
    refer:
    http://download.oracle.com/docs/cd/B12037_01/server.101/b10734/rcmconc1.htm

  • Difference between parallelism and allocate channel

    Whats the difference between
    Rman> run{
    allocate channel c1 device type disk;
    allocate channel c2 device type disk;
    AND
    RMAN> configure channel device type disk parallelism 2;

    Channel:
    Each channel establishes a connection from the RMAN client to a target or auxiliary database instance by starting a server session on the instance. The server session performs the backup, restore, and recovery.
    PARALLELISM:
    Configures the device types that are eligible for use in jobs that use automatic channels and sets the degree of channel parallelism. The DISK device type is the default.
    The PARALLELISM parameter specifies the number of automatic channels of the specified device type allocated for RMAN jobs. RMAN always allocates the number of channels specified by PARALLELISM, although it may actually use only a subset of these channels.
    By default, PARALLELISM = 1. Specifying CLEAR for a device type resets its settings to the default. For example, you can set PARALLELISM for disk backups to 3. If you configure automatic channels of type disk and tape, and set the default device type as disk, then RMAN allocates three disk channels when you run BACKUP DATABASE at the RMAN prompt.
    To change the parallelism for a device type to n, run a new CONFIGURE DEVICE TYPE ... PARALLELISM n command. For example, you can change configure PARALLELISM to 3 for sbt and then change it to 2 as follows:
    CONFIGURE DEVICE TYPE sbt PARALLELISM 3;
    CONFIGURE DEVICE TYPE sbt PARALLELISM 2;
    Regards
    Asif Kabir

Maybe you are looking for