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

Similar Messages

  • Oracle online backup failed

    Dear all,
          I am scheduling a online backup for ECC 6.0 , oracle 10.2  to target NAS device. I have mentioned the error log.
    BR0252E Function _mkdir() failed for '
    <IPaddress>\backup\bebfoyky' at location BrDirCreate-1
    BR0253E errno 13: Permission denied
    I have created sapservice<sid> user in the NAS device. Anything i need to check more. Could anyone have any idea... please help me.
    Thanks
    Raj

    Dear Juan,
       Yes , both the users belongs to administrator group.
    @ Rishi - The Ip address which i have mentioned in my earlier mess is the IP address of the network device.
    It was working fine with another device, after changing it to the new target device i am facing this issue.
    I have changed the target network path of the NAS in the init<sid>.sap, also i have restarted the instance as well.
    Do i need to reboot the entire server to make the changes effect ?
    Kindly suggest me.
    BR0252E Function _mkdir() failed for '
    <IP address of the NAS>\backup\bebfoyky' at location BrDirCreate-1
    BR0253E errno 13: Permission denied
    Thanks
    Raj

  • Oracle online backup

    Is it possible to play future archive logs into a hot backup in the same manner that you can with a cold backup.

    Recover ...until cancel yields the error below: and the standby could actually be better described as a staging area for application development.
    QL> recover database until cancel;
    ORA-00283: recovery session canceled due to errors
    ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
    SQL> recover database using backup controlfile until cancel;
    ORA-00279: change 169829095 generated at 12/26/2006 23:38:35 needed for thread
    1
    ORA-00289: suggestion : D:\ORACLE\ADMIN\EMRDB\ARCH\ARC057892785102977.001
    ORA-00280: change 169829095 for thread 1 is in sequence #2977
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    D:\oracle\Data\EMRDB\REDO1A.LOG
    ORA-00326: log begins at change 171504873, need earlier change 169829095
    ORA-00334: archived log: 'D:\ORACLE\DATA\EMRDB\REDO1A.LOG'
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01195: online backup of file 1 needs more recovery to be consistent
    ORA-01110: data file 1: 'D:\ORACLE\DATA\EMRDB\SYSTEM.DB'

  • Oracle Online backup limitations

    Hi,
    We are using oracle 10g for SAP.
    1. In which situation oracle Online consistent backup is not useful.
    2. In a situation all online relog groups are corrupted. Is it possible recovery with online consistent backup ?
    3. In which recovery situation offline backup is good than online backup?
    Regards,
    Nani

    Hi,
    2. In a situation all online relog groups are corrupted.
    Is it possible recovery with online consistent backup ?
    Online Consistent backup only contains the offline redo log files created during a backup run. One can not get any online redo log group members from such online consistent backup. If all online redo logs are corrupted/loss then in such situation instance recovery is not possible and only incomplete partial /point-in-time recovery is possible. If the mirrored online redo log files is available then its possible to perform instance recovery.
    Please refer "Recovering from Current Online Redo Log Missing" && "Recovering from One Inactive Online Redo Log Missing" topic of this useful document [Oracle Restore and Recovery|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/97a4f439-0d01-0010-d488-d29b45e2f5ab?quicklink=index&overridelayout=true].
    I would refer this useful document  [Oracle Restore and Recovery|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/97a4f439-0d01-0010-d488-d29b45e2f5ab?quicklink=index&overridelayout=true] (specially its last part) to get more information about different scenario of Restore &recovery in Oracle.
    Regards,
    Bhavik G. Shroff

  • How RMAN do online backup?

    When doing RMAN online backup, all datafiles are not in backup mode( not like user managed backup). How oracle did that? multifiles backup at same time without redo and undo.
    Thanks.

    From Article Note:76736.1 RMAN FAQ: Recovery Manager -- Frequently Asked
    To understand why RMAN does not require extra logging or backup mode,
    you must first understand why those features are required for non-RMAN
    online backups.
    A non-RMAN online backup consists of a non-Oracle tool, such as cp or
    dd, backing up a datafile at the same time that DBWR is updating the
    file. We can't prevent the tool from reading a particular block at the
    exact same time that DBWR is updating that block. When that happens,
    the non-Oracle tool might read a block in a half-updated state, so that
    the block which is copied to the backup media might only have been
    updated in its first half, while the second half contains older data.
    This is called a "fractured block". If this backup needs to be restored
    later, and that block needs to be recovered, recovery will fail because
    that block is not usable.
    The 'alter tablespace begin backup' command is our solution for the
    fractured block problem. When a tablespace is in backup mode, and a
    change is made to a data block, instead of logging just the changed
    bytes to the redo log, we also log a copy of the entire block image
    before the change, so that we can reconstruct this block if media
    recovery finds that this block was fractured. That block image logging
    is what causes extra redo to be generated while files are in backup
    mode.
    The reason that RMAN does not require extra logging is that it
    guarantees that it will never back up a fractured block. We can make
    that guarantee because we know the format of Oracle data blocks, and we
    verify that each block that we read is complete before we copy it to the
    backup. If we read a fractured block, we read the block again to obtain
    a complete block before backing it up. non-Oracle tools are not able to
    do the same thing because they do not know how to verify the contents of
    an Oracle data block.
    Backup mode has another effect, which is to 'freeze' the checkpoint in
    the header of the file until the file is removed from backup mode.
    We do this because we cannot guarantee that the third-party backup
    tool will copy the file header prior to copying the data blocks.
    RMAN does not need to freeze the file header checkpoint because we
    know the order in which we will read the blocks, which enables us to
    capture a known good checkpoint for the file.

  • Rman script backing up a table, and OEM

    1. Please share a RMAN script backing up a table on a daily basis at a given time. The purpose is to actually see a RMAN script in the first place.
    2. Is RMAN the single most tool being used for backup and recovery, what are some of the other popular tools in this respect?
    3. Can RMAN scripts be triggered using OEM?

    goni wrote:
    1. Please share a RMAN script backing up a table on a daily basis at a given time. The purpose is to actually see a RMAN script in the first place.Well, I just searched for it and got this as one of the first 3 results, if you just want to have a look than it should be fine.
    http://oracle.ittoolbox.com/documents/sample-of-rman-script-18791
    2. Is RMAN the single most tool being used for backup and recovery, what are some of the other popular tools in this respect?It doesn't matter which are the other tools, oracle only supports the backup taken by RMAN and recommends to use it only. I must recommend you to read this following paper to know that why RMAN should be used,
    http://evdbt.com/TD_Rman.pdf
    3. Can RMAN scripts be triggered using OEM?Yes, just follow the wizards and in the end, EM shows you the same in the form of script.
    HTH
    Aman....

  • DB13 Online Backup

    Hi,
    I am taking daily online backup from BRTOOLS on a disk(BACKUP SEVER).If I want to take the online backup through DB13 in the disk what is the procedure to be used(step by step)
    Server     ECC5.0
    ORACLE  9.2.0.7.0
    Regards
    AAA

    Hello All,
    I have changed the follwing parameters in the initSID.sap profile
    backup_dev_type = disk
    backup_root_dir = <disk target>
    stage_root_dir = <disk target>
    After making changes, i schedule backup in DB13 and type
    " disk " in place of tape name.
    It is working fine in IDES but not working in Development system.
    it is showing the below error log
    Job started
    Step 001 started (program RSDBAJOB, variant &0000000000013, user ID BASIS)
    Execute logical command BRARCHIVE On host EFLTDS
    Parameters: -u / -c force -p initEFD.sap -sd -v "DISK"
    BR0002I BRARCHIVE 6.40 (15)
    BR0282E Directory
    Eflbackup\BACKUP\DEVBACKUP\sapbackup not found
    BR0182E Checking parameter/option 'archive_copy_dir' failed
    BR0007I End of offline redo log processing: adzbxsem.log 2008-10-22 11.30.36
    But i am taking the backup by BRTOOLS in development system,it is working fine.
    Waiting for reply.
    Warm Regards
    AAA

  • Oracle apps backup

    Hi
    How to backup application tier when online backup of database is active.
    Online backup of database by RMAN is scheduled but don't know how to take backup of application tier backup online.
    Please suggest as am new to apps R12
    Database : 11.1.0.7
    Applications : R12.1.3
    OS : RHEL5
    Thanks in advance.

    955685 wrote:
    Hi
    How to backup application tier when online backup of database is active.
    Online backup of database by RMAN is scheduled but don't know how to take backup of application tier backup online.
    Please suggest as am new to apps R12
    Database : 11.1.0.7
    Applications : R12.1.3
    OS : RHEL5
    Thanks in advance.You can take a snapshot of your application while it is online, or backup the files while the application is up (since you are not on Windows OS).
    https://forums.oracle.com/forums/search.jspa?threadID=&q=backup&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Online backups on BIW systems, every update is logged?

    Some years ago I was at an SAP BIW installation, they performed Oracle online backups dayly.
    For some reason, they had to restore and recover DB, and after using an online backup as a restore basis, some indexes were not usable, because they had been updated without archive log information.
    Finally, the easiest way for the system administator was using an offline backup.
    I got to know there were some updates (not critical) not being logged in the DB, so online backups, as well as standby DB would not be as useful as on OLTP systems.
    Does somebody know if this is or this is not the same nowadays? Is everything logged on a BW system? Is that a tunable configuration for some indexes? Is an online backup really useful after restoring and recovering?
    Thanks very much for your experience and answers !!
    Eva

    Hello Eva,
    > For some reason, they had to restore and recover DB, and after using an online backup as a restore basis, some indexes were not usable, because they had been updated without archive log information.
    This behaviour is absolutely normal.
    In a BW system the indexes are created / rebuild with the NOLOGGING clause, because of some performance reasons.
    > Finally, the easiest way for the system administator was using an offline backup.
    The easiest yes - but concurrently the worst one. He can identify the "new" indexes since the last online backup and only recreate this ones.
    > Does somebody know if this is or this is not the same nowadays?
    Yes the NOLOGGING clause is still used nowadays.
    > Is everything logged on a BW system?Is that a tunable configuration for some indexes?
    You can "deactivate" the NOLOGGING clause.. but then you can have some performance impacts in your BW load processes.
    Check sapnote #442763 for the customizing.
    > Is an online backup really useful after restoring and recovering?
    Yes, of course .. the ONLINE backup is the preferred method.
    If you recover your database with the BR*Tools .. your unusable indexes are automatically rebuild.
    Check sapnote #849485 for that feature.
    Regards
    Stefan

  • Need help on Oracle manual Backup and Recovery?

    Dear Gurus,
    I want to study Oracle manual Backup and Recovery(without RMAN) in detail.
    Is there any book or site, which describes more scenarios and explanation on manual backup and Recovery(without RMAN)
    Regards
    Sanjeev

    user12868781 wrote:
    Dear Gurus,
    I want to study Oracle manual Backup and Recovery(without RMAN) in detail.Why?
    My car has a flat tire. The manufacturer packed a spare tire, jack, and lug wrench in the trunk of the car at no additional cost, and described the process in the owners manual. I want to replace the flat tire without using any method other than the one involving the use of the tools designed for and provided for the job.
    Is there any book or site, which describes more scenarios and explanation on manual backup and Recovery(without RMAN)
    Regards
    Sanjeev

  • Reg: Online Backup

    Hi all,
    We are using mssql database for our one of the BWP sysem. I am trying to take online backup through DB13. But i am not getting the online/offline options in DB13 callender. May i know the proper steps to schedule online backup through DB13.
    Advance thanks.
    with regards
    Harish

    Hello,
    backups through db13 are always online. A online backup is created through the execution of a backup database or backup log command during the runtime of the SQL Server. And this is exactly what the db13 is doing, it schedules a job (for later or immediately execution) with a backup database/log command.
    A offline backup can be done, when you shutdown the SQL Server (and of course the SAP system) and do a filecopy on system level. This can't be done through db13, as the SAP system is down in that time.
    Regards
      Clas

  • Restore to a different node with RMAN and EMC Networker

    Please, really need help :)
    I took hotbackup using RMAN catalog which went to tape. Here is the script for that:
    connect target sys/****@PROD;*
    connect rcvcat rman/***@catalog;*
    *run {*
    allocate channel t1 type 'SBT_TAPE';
    send 'NSR_ENV=(NSR_SERVER="**",NSR_DATA_VOLUME_POOL=Oracle)';*
    *backup database plus archivelog;*
    *release channel t1;*
    My settings include control file autobackup as follows:
    *RMAN&gt; show all;*
    *RMAN configuration parameters are:*
    *CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 10 DAYS;*
    *CONFIGURE BACKUP OPTIMIZATION OFF; # default*
    *CONFIGURE DEFAULT DEVICE TYPE TO DISK;*
    *CONFIGURE CONTROLFILE AUTOBACKUP ON;*
    *CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '/NMO_%F/';*
    *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 '/data/backups/PROD/ora_df%t_s%s_s%p';*
    *CONFIGURE MAXSETSIZE TO UNLIMITED; # default*
    *CONFIGURE ENCRYPTION FOR DATABASE OFF; # default*
    *CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default*
    *CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default*
    *CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/data/backups/PROD/hotbkp/snapcf_PROD.f';*
    I am trying to restore this backup that is on tape (EMC Networker) to a different node. I can do this outside of Networker without any problems. However, when I try to get the backup from tape I have this issue:
    1. initPROD.ora is created and modified accordingly on a new server
    2. Export sid, startup nomount on new server
    export ORACLE_SID=PROD (on this new server)
    *rman target /*
    *startup nomount*
    3. I then run the following and get this error:
    *RMAN&gt; run {*
    *2&gt; allocate channel t1 type 'SBT_TAPE'*
    *3&gt; send 'NSR_ENV=(NSR_SERVER="***",NSR_CLIENT="********")';*
    *4&gt; restore controlfile from autobackup;*
    *5&gt; sql 'alter database mount';*
    *6&gt; sql 'alter database rename file "/data/dbf/PROD/redo01.log" to "/data/scratch/dbf/PROD/redo01.log"';*
    *7&gt; sql 'alter database rename file "/data/dbf/PROD/redo02.log to "/data/scratch/dbf/PROD/redo02.log"';*
    *8&gt; sql 'alter database rename file "/data/dbf/PROD/redo03.log to "/data/scratch/dbf/PROD/redo03.log"';*
    *9&gt; set until sequence 22; (I get this from archive logs)*
    *10&gt; set newname for datafile 1 to '/data/scratch/dbf/PROD/system01.dbf';*
    *11&gt; set newname for datafile 2 to '/data/scratch/dbf/PROD/undotbs01.dbf';*
    *12&gt; set newname for datafile 3 to '/data/scratch/dbf/PROD/sysaux01.dbf';*
    *13&gt; set newname for datafile 4 to '/data/scratch/dbf/PROD/users01.dbf';*
    *14&gt; restore database;*
    *15&gt; switch datafile all;*
    *16&gt; recover database;*
    *17&gt; alter database open resetlogs;*
    *18&gt; }*
    *allocated channel: t1*
    *channel t1: sid=149 devtype=SBT_TAPE*
    *channel t1: NMO v4.5.0.0*
    *Starting restore at 27-FEB-09*
    *released channel: t1*
    *RMAN-00571: ===========================================================*
    *RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============*
    *RMAN-00571: ===========================================================*
    *RMAN-03002: failure of restore command at 02/27/2009 22:10:43*
    *RMAN-06495: must explicitly specify DBID with SET DBID command*
    I cannot seem to pass this error. This error indicates that the db has to be either mounted or DBID set before the restore of teh controlfile. Mounting db before the restore of the controlfile does not work. Setting db id 1) does not make sense because if the primary db is down then I cannot get it, right? My primary is up now, so I was able to get db id, but setting it made the restore hang with the following:
    *RMAN&gt; run {*
    *connect target*
    *set dbid=466048808*
    *2&gt; allocate channel t1 type 'SBT_TAPE'*
    *3&gt; send 'NSR_ENV=(NSR_SERVER="***",NSR_CLIENT="********")';*
    *4&gt; restore controlfile from autobackup;*
    *5&gt; sql 'alter database mount';*
    *6&gt; sql 'alter database rename file "/data/dbf/PROD/redo01.log" to "/data/scratch/dbf/PROD/redo01.log"';*
    *7&gt; sql 'alter database rename file "/data/dbf/PROD/redo02.log to "/data/scratch/dbf/PROD/redo02.log"';*
    *8&gt; sql 'alter database rename file "/data/dbf/PROD/redo03.log to "/data/scratch/dbf/PROD/redo03.log"';*
    *9&gt; set until sequence 22; (I get this from archive logs)*
    *10&gt; set newname for datafile 1 to '/data/scratch/dbf/PROD/system01.dbf';*
    *11&gt; set newname for datafile 2 to '/data/scratch/dbf/PROD/undotbs01.dbf';*
    *12&gt; set newname for datafile 3 to '/data/scratch/dbf/PROD/sysaux01.dbf';*
    *13&gt; set newname for datafile 4 to '/data/scratch/dbf/PROD/users01.dbf';*
    *14&gt; restore database;*
    *15&gt; switch datafile all;*
    *16&gt; recover database;*
    *17&gt; alter database open resetlogs;*
    *18&gt; }*
    *connected to target database: PROD (not mounted)*
    *executing command: SET DBID*
    *using target database control file instead of recovery catalog*
    *allocated channel: t1*
    *channel t1: sid=152 devtype=SBT_TAPE*
    *channel t1: NMO v4.5.0.0*
    *Starting restore at 27-FEB-09*
    *channel t1: looking for autobackup on day: 20090227*
    *channel t1: looking for autobackup on day: 20090226*
    *channel t1: looking for autobackup on day: 20090225*
    It looks like it cannot find the autbackup of controlfile? But when I list backup while connected to the target db and rman catalog, I see that autobackup is included in every hot backup that we do:
    *BS Key Type LV Size Device Type Elapsed Time Completion Time*
    *4639 Full 7.00M SBT_TAPE 00:00:04 27-FEB-09*
    *BP Key: 4641 Status: AVAILABLE Compressed: NO Tag: TAG20090227T150141*
    *Handle: /NMO_c-466048808-20090227-01/ Media:*
    *Control File Included: Ckp SCN: 23352682865 Ckp time: 27-FEB-09*
    *SPFILE Included: Modification time: 26-FEB-09*
    I am stuck What I am doing wrong? Thank you!
    Edited by: rysalka on Feb 28, 2009 8:35 AM

    Do a list command to see if the controlfile backup is on tape.
    RMAN> list backup of controlfile;
    I suggest you to read the manual of EMC Networker or call EMC on how to restore the database to another node. I am using Veritas Netbackup, it may be similar to EMC Networke for your reference. There are a few things that need to be followed when you restore database to another node:
    1) set DB_ID, which you have done
    2) set NB_CLIENT (in your case NSR_CLIENT) to the primary node from where backup was taken
    3) configure the backup server to allow redirect restore between the two nodes.
    Hope this helps.

  • Less redo generates at the time of online backup using RMAN

    Hi,
    can someone eleborate that why less redo generates at the time of RMAN online backup in comparison of manual hotbackup.
    Thanks

    A manual hot backup (aka "OS backup" or "scripted backup") cannot handle fractured blocks. This happens when a backup command is copying out blocks from a datafile at the same time as DBWR is updating blocks. The Oracle Block Size (8KB) is generally a multiple of the OS Block size (512Bytes to 4KB or 8KB, depending on the filesystem / raw device and how the OS command copies blocks out). It is possible for DBWR to write 8KB and the OS backup utility to be concurrently reading the same Oracle block as, say, two different 4KB reads. The first half of the Oracle block may be read by one OS call and the second half by another OS call -- the two halves would be inconsistent with each other if Oracle were writing the database block at the same time.
    (Therefore a restore of such a backup would give you an inconsistent -- i.e. fractured -- block, which would be logically corrupt).
    In order to handle such issues, after a BEGING BACKUP is issued, for every first change to a database block, the whole block is written to the redo stream, not just the change vectors. (If the same database block is subsequently modified while in BACKUP mode, it is only the change vectors that have to be written to the redo stream). Once the END BACKUP is issued, the redo stream does not need to capture whole database blocks.
    If such a backup is restored, it still has fractured blocks. However, when applying the ArchiveLogs generated during the Backup, each such fractured block is "automagically repaired" because a whole image is restored from the ArchiveLog. (Subsequent changes are replayed as changes through the change vectors).
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Oracle Hot Backup Script Windows Server 2003

    Hello,
    Does anyone here have a working Oracle 10I database hot backup script for Windows Server 2003? If so can you please post it here.
    Thanks.

    Here is a basic batch script I have used for a hot backup of Oracle databases using RMAN
    Will just need to update some locations based on you environment just check all the comments and change what you need to but this can be scheduled to run regularly through the windows scheduler for database backups.
    This will take a hot backup and backup the archive logs.
    Let me know if you have any quesitons.
    REM #####################################################################
    REM # Name: rman_hot_backup_dsk.bat
    REM #
    REM # Description:
    REM #
    REM # Generic Hot backup script that accepts the SID
    REM #
    REM # Parameters: Instance Name, backup level
    REM #
    REM #####################################################################
    REM #
    REM # Check if SID was Passed
    if (%1)==() goto USAGE
    if (%2)==() goto USAGE
    REM # assign ORACLE_SID to passed SID
    set ORACLE_SID=%1
    REM # Set the hot backup level 0-full 1-incremental
    set LEVEL=%2
    REM # export the page list
    set [email protected]
    REM # assign a date we can use as part of the logfile
    set DTE=%date:~-4%%date:~4,2%%date:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%
    REM # Take the spaces out of the date string so we can use in our file name
    set DTE=%DTE: =%
    REM # set the script location
    REM # Set location of where you will put script
    set SCRIPTLOC=C:\app\oracle\scripts
    cd %SCRIPTLOC%
    REM # Set the Temporary command file that we will write our rman script to
    set CMDFILE=%SCRIPTLOC%\%ORACLE_SID%_rman_hot_backup_dsk.cmd
    REM # Remove the temporary file if it exists
    del /q %CMDFILE%
    REM # Set the logfile directory
    REM # Change based on where you want the backup logs to go
    set LOGPATH=W:\ORACLE_BACKUP\logs
    set LOGFILE=%ORACLE_SID%_rman_hot_backup_dsk_%DTE%.log
    set LOG=%LOGPATH%\%LOGFILE%
    REM # Set the path of the backup location
    REM # Change based on disk pach for you disk based backups
    set BACKLOC=\\VirtualBox\ORA_ITS03P\ORACLE_BACKUP\%ORACLE_SID%
    REM # Lets set the ORACLE_HOME for the host
    REM # Set to your actual ORACLE_HOME location
    set ORACLE_HOME=C:\app\oracle\product\10.2.0\db_1
    # Set the rest of the Oracle Environment
    # based on our ORACLE_HOME
    set LIBPATH=%ORACLE_HOME%/lib
    set LD_LIBRARY_PATH=%ORACLE_HOME%/lib
    set TNS_ADMIN=%ORACLE_HOME%/network/admin
    REM #set ORA_NLS10=%ORACLE_HOME%/nls/data
    REM Set our PATH with the ORACLE_HOME so that we have a good
    REM clean environment to work with
    set PATH=%ORACLE_HOME%/bin;%ORACLE_HOME%/OPatch;%PATH%
    REM # Write Temporary command file for RMAN backup
    echo # configure retention policy >> %CMDFILE%
    echo CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS ; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # lets start clean for our hot backup by doing full crosschecks >> %CMDFILE%
    echo change archivelog all crosscheck ; >> %CMDFILE%
    echo crosscheck backup of database; >> %CMDFILE%
    echo crosscheck backup of controlfile; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # delete all expired and obsolete backups >> %CMDFILE%
    echo allocate channel for maintenance type disk ; >> %CMDFILE%
    echo delete noprompt expired archivelog all ; >> %CMDFILE%
    echo delete noprompt expired backup ; >> %CMDFILE%
    echo delete noprompt obsolete ; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # Configure control file for auto backup >> %CMDFILE%
    echo configure controlfile autobackup on ; >> %CMDFILE%
    echo CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%BACKLOC%\%ORACLE_SID%_controlfile_%%F' ; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # Configure default device type here we use disk and set parallelism to 2 >> %CMDFILE%
    echo configure default device type to disk ; >> %CMDFILE%
    echo configure device type disk parallelism 2 ; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # Must format the default channel for the device type disk >> %CMDFILE%
    echo # other wise tmp area in creating pieces will be done in >> %CMDFILE%
    echo # the $ORACLE_HOME/dbs directory >> %CMDFILE%
    echo CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT = '%BACKLOC%\%ORACLE_SID%_hot_%%U' ; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # Configure our retention policy for this database >> %CMDFILE%
    echo configure retention policy to recovery window of 14 days ; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # Let configure our channels for our backup >> %CMDFILE%
    echo # Channel 1 disk and we indicate where it goes not taking the default >> %CMDFILE%
    echo configure channel 1 device type disk MAXPIECESIZE = 4G format '%BACKLOC%\%ORACLE_SID%_hot_%%U' ; >> %CMDFILE%
    echo # Channel 2 disk and we indicate where it goes not taking the default >> %CMDFILE%
    echo configure channel 2 device type disk MAXPIECESIZE = 4G format '%BACKLOC%\%ORACLE_SID%_hot_%%U' ; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # Backup our database with compression on >> %CMDFILE%
    echo backup as compressed backupset incremental level %LEVEL% tag hot_%LEVEL%_%DTE% DATABASE ; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # Backup our archive log files that have not been backed up >> %CMDFILE%
    echo backup as compressed backupset format '%BACKLOC%\%ORACLE_SID%_Archive_%%d_%%s_%%p_%%t' archivelog all not backed up 1 times ; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # Backup Control file for standby in case needed >> %CMDFILE%
    echo backup current controlfile for standby ; >> %CMDFILE%
    echo # >> %CMDFILE%
    echo # let put a controlfile to trace >> %CMDFILE%
    echo sql 'ALTER DATABASE BACKUP CONTROLFILE TO TRACE' ; >> %CMDFILE%
    REM # Run the RMAN backup without using the recovery catalog
    %ORACLE_HOME%\bin\rman target=/ nocatalog cmdfile=%CMDFILE% msglog=%LOG%
    REM # Remove our temporary command file
    del /q %CMDFILE%
    REM # Mail Archive backup log
    REM # This relies on the free bmail utility
    bmail -date -m %LOG% -f [email protected] -s <smtpserver> -t %PAGE_LIST% -a "HOT Backup results"
    REM # Goto end of script as we are done
    goto END
    :USAGE
    echo "Must Pass ORACLE_SID and hot backup level as parameters."
    goto END
    :END

  • 10g Physical Standby to be used for Backup through RMAN

    Dear All,
    I have 10g Database Primary and Standby Server which is operating in Maximum Performance Mode. I want to use Standby Database for performing Weekly Full and Daily Incremental Backups through RMAN. Kindly inform me is it possible, if yes how should I configure it. I will also be using Compression and Encryption while performing backups.
    Best Regards,
    Asif

    Yes, that is possible.
    Because the standby databases are in mount mode, they can be accessed through the SYS account .
    I use the following RMAN script for the same purpose. Please note that we have configure the flashback area, so we are not letting RMAN delete the archive files:
    run {
    sql 'alter system archive log current';
    sql 'alter system archive log current';
    allocate channel ch1 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
    backup
    incremental level 0
    tag full_bk_db_webshop
    format 'df_%d_t%t_s%s_p%p'
    (database include current controlfile);
    backup archivelog all;
    This script is for a FULL backup ( level 0 ). You could also use the "backup full" command
    You can easily change the level of the Backup for incremental purposes.
    Starting RMAN - if configured correctly - is the same as with an open database
    export ORACLE_SID=<STDBYSID>
    rman target / rcvcat <rman/rman>@<catalogsid>
    the user for, and the catalogsid are merely examples
    Edited by: fjfranken on Mar 24, 2009 4:07 AM

Maybe you are looking for