RMAN script for Unix

We have decided to abandon user managed hot backups and go with RMAN. Could you critizize the following approach and see if we are missing anything? I am making whole database backup and controlfile and archivelogs. I am using RMAN catalog.
In a Unix script setting all of the environment variables and then
connect target ********
connect catalog *********
configure snapshot controlfile to '${ORACLE_HOME}/snapshot_${ORACLE_SID}_${TIMESTAMP}_ctl';
run {
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
backup database plus archivelogs;
release channel c1;
release channel c2;
p.s. control file autobackup is on
Also, I have these questions:
1. How do I direct the output of this backup to a file?
2. Is there a way to check for errors within this file to see if the backup went ok?
3. Would anyone have a unix shell script example of the above?
4. How do I make sure that catalog is synched with control file and what is on the file system?
5. Is it customary to delete archive logs via RMAN script if, say, my policy is to keep it on the file system for 7 days?
thank you for any input!

Hi,
You didnot mention the db version, assumed it's 10g.
If you planned to schedule this job at os level, you might use crontab (unix). The snapshot controlfile config can set with catalog once, so it's not needed to include in your backup script. Like wise your retention can set as "recovery window of 7 days".
1. How do I direct the output of this backup to a file?
==> inside rman script you might use the following command,
set log to '/home/oracle/rmanbkp.log';
2. Is there a way to check for errors within this file to see if the backup went ok?
==> you might check in the logfile for ORA- and RMAN- errors.
3. Would anyone have a unix shell script example of the above?
I use to schedule this job either by OEM or crontab using rman script file.
4. How do I make sure that catalog is synched with control file and what is on the file system?
RMAN will do auto sync with controlfile.
5. Is it customary to delete archive logs via RMAN script if, say, my policy is to keep it on the file system for 7 days?
Upon successful backup you may delete the archivelogs or you might decide to keep it for 7 days and then delete by applying "delete obsolete" command.
Thanks,
Nirmal

Similar Messages

  • RMAN Scripts for 9i RAC

    We have just recently started to use Oracle 9i RAC on Red Hat linux 2.1. And we are going to use RMAN for backing up the archived logs.
    Currently we have 2 node cluster and the archived logs of respective nodes are on their respective local hard disk. e.g for node1 logs are archived on /arch1 and for node2 on /arch2 individually.
    Can I have some sample RMAN scripts for backing and restoring the logs of this individual nodes.?
    An early guidance is highly appreciated.
    Thanks

    you can use the same scripts as you where running before you upgraded to RAC. The main difference is that to distribute the load you can allocate channels from other nodes. A simple backup could be done as follows:
    #rman
    #connect target /
    #connect catalog rman/cat@cat
    #run{
    #allocate channel ch1 type sbt_tape;
    #allocate channel ch2 type sbt_tape;
    #configure channel 1 device type 'SBT_TAPE' connect = 'node 1'
    #configure channel 2 device type 'SBT_TAPE connect = 'node 2'
    #backup database;
    that will work (he says) but thats the main difference, remember oracle only recommend you allocate the same number of channels as you have devices (EG if you have 2 tape drives you can allocate 2 channels to maximize effiantcy)...
    hope this helps a bit,
    Marky Mark...

  • 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

  • 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

  • Compile script for Unix?

    We have just re-hosted our Forms/Reports 11g onto a Solaris server. I would like to have a script (bash) that would compile a form or plsql library that I can give to the other developers (we're all new to Unix). Ideally it would either prompt the developer for the module and db connection string (user/password@db) or allow this on the command line. Does anyone know where I might find a script to do this or an example since I'm new to shell scripts?

    If you only want to do one file at a time and are looking for a way to "fill in the blanks" rather than knowing the command line syntax, you can use the UI.  If an X session is available, the Forms Compiler will launch a GUI if no arguments are passed into it.  For example:   frmcmp.sh
    The GUI will ask the user for the file, username, password, and all of the possible compiler options.  Many of the options are check boxes.
    If X is not available then just use the command line directly:
    frmcmp_batch.sh module=/home/someuser/myforms/myapp.fmb compile_all=yes userid=scott/tiger@orcl

  • XMLImport Script for UNIX

    This may be of interest of those who have automated deployment scripts that run on the application servers.

    If you only want to do one file at a time and are looking for a way to "fill in the blanks" rather than knowing the command line syntax, you can use the UI.  If an X session is available, the Forms Compiler will launch a GUI if no arguments are passed into it.  For example:   frmcmp.sh
    The GUI will ask the user for the file, username, password, and all of the possible compiler options.  Many of the options are check boxes.
    If X is not available then just use the command line directly:
    frmcmp_batch.sh module=/home/someuser/myforms/myapp.fmb compile_all=yes userid=scott/tiger@orcl

  • RMAN Script & RMAN Configuration

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

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

  • URGENT: Where are the upgrade scripts for Tier1 ?

    I found the upgrade scripts for 3.0.6/3.0.7 to 3.0.8 for Windows NT and Solaris here on Technet, but where are the upgrade scripts for the Tier 1 platforms ? I urgently need the ugrade script for Tru64. Please help.

    Sorry for the confusion - the page should be updated very
    shortly. In the meantime, you can download the 3.0.6/3.0.7/3.0.8
    to 3.0.9 scripts for NT/2000 at:
    http://download.oracle.com/otn/nt/portal/p1831355_309_WINNT.zip
    and 3.0.6/3.0.7/3.0.8 to 3.0.9 scripts for UNIX at:
    http://download.oracle.com/otn/solaris/portal/p1831348_309_UNIX.z
    ip
    Note that these are the same scripts that are accessible from
    Metalink (NT/2000 - Patch:1831355) and (UNIX - Patch:1831348)

  • Need Help in creating Unix Shell Script for database

    Would be appreciable if some one can help in creating unix shell script for the Oracle DB 10,11g.
    Here is the condition which i want to implement.
    1. Create shell script to create the database with 10GB TB SPACE and 3 groups of redo log file(Each 300MB).
    2. Increase size of redolog file.
    3. Load sample schema.
    4. dump the schema.
    5. Create empty db (Script should check if db already exists and drop it in this case).
    6. Create backup using rman.
    7. restore backup which you have backed up.

    This isn't much of a "code-sharing" site but a "knowledge-sharing" site.  Code posted me may be from a questioner who has a problem / issue / error with his code.   But we don't generally see people writing entire scripts as responses to such questions as yours.  There may be other sites where you can get coding done "for free".
    What you could do is to write some of the code and test it and, if and when it fails / errors, post it for members to make suggestions.
    But the expectation here is for you to write your own code.
    Hemant K Chitale

  • 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 script errors out for some DB's

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

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

  • Rman dataguard script for oracle10g

    Dear Friends ,
    I am going to configure oracle10g dataguard on oracle wnterprise linux  5.0 . I am trying to do this configuration
    using RMAN .
      After succesfully configuration of the PRIMARY End as well as I am going to configure standby end .
    n the standby end I have to run the below rman script and got the syntax error :
    [oracle@server dbs]$ sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.1.0 Production on Sun Apr 29 12:59:01 2012
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to an idle instance.
    SQL> startup nomount pfile=initstan.ora
    ORACLE instance started.
    Total System Global Area  217157632 bytes
    Fixed Size                  2211928 bytes
    Variable Size             159387560 bytes
    Database Buffers           50331648 bytes
    Redo Buffers                5226496 bytes
    SQL>
    6) Run RMAN and connect to the Standby database and make an auxiliary connection to the Primary database like below :
    bash-3.2$ rman target sys@prim
    Recovery Manager: Release 11.2.0.3.0 - Production on Fri Mar 24 10:54:37 2000
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    connected to target database:PRIM (DBID=1247570709)
    RMAN> connect auxiliary sys/sys123@stan
    connected to auxiliary database: STAN (not mounted)
    RMAN
    run {
          allocate channel prmy1 type disk;
      allocate channel prmy2 type disk;
      allocate channel prmy3 type disk;
      allocate channel prmy4 type disk;
            allocate channel prmy5 type disk;
      allocate auxiliary channel stby type disk;
      duplicate target database for standby from active database
      spfile
      parameter_value_convert 'prim','stan'
      set db_unique_name='prim'
      set db_file_name_convert='/u01/app/oracle/oradata/prim/','/u01/app/oracle/oradata/stan/'
      set log_file_name_convert='/u01/app/oracle/oradata/prim/','/u01/app/oracle/oradata/stan/'
      set control_files='/u01/app/oracle/oradata/stan/control01.ctl','/u01/app/oracle/oradata/stan/control02.ctl','/u01/app/oracle/oradata/stan/control03.ctl'
      set log_archive_max_processes='5'
      set fal_client='stan'
      set fal_server='prim'
      set standby_file_management='AUTO'
      set log_archive_config='dg_config=(prim,stan)'
      set log_archive_dest_2='service=prim  ASYNC valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=prim'
      NOFILENAMECHECK
    Each and every time when I run the above script  got the below error :
    RMAN> 2> 3> 4> 5> 6> 7> 8>
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "from": expecting one of: "dorecover, db_file_name_convert, nofilenamecheck, ;"
    RMAN-01007: at line 9 column 39 file: standard input
    RMAN>
    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: "allocate, alter, backup, beginline, blockrecover, catalog, change, connect, copy, convert, create, crosscheck, configure, duplicate, debug, delete, drop, exit, endinline, flashback, host, {, library, list, mount, open, print, quit, recover, register, release, replace, report, renormalize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport, upgrade, unregister, validate"
    RMAN-01008: the bad identifier was: parameter_value_convert
    RMAN-01007: at line 2 column 1 file: standard input
    Does anybody please correct the above script for 10g or if there any document for configuring oracle10g dataguard
    using RMAN , then please help me .
    Thx in advance .. ..

    shipon_97 wrote:
    Dear Friends ,
    I am going to configure oracle10g dataguard on oracle wnterprise linux  5.0 . I am trying to do this configuration
    using RMAN .
      After succesfully configuration of the PRIMARY End as well as I am going to configure standby end .
    n the standby end I have to run the below rman script and got the syntax error :
    You cannot use FROM ACTIVE DATABASE - option, If your database version is 10g .
    Regards
    Mahir M. Quluzade

  • RMAN script error in UNIX

    I have db10.2.0.3 on SUN Solaris 10.
    I have a rman script called backup_aps2
    This is the content
    #!/usr/bin/csh -fvx
    rman target / <<EOF
    configure controlfile autobackup on;
    run
    recover copy of database with tag 'incr_update';
    backup incremental level 1 for recover of copy with tag 'incr_update'
    database;
    EOFI got this error when I ran it:
    test% ./backup_aps2
    rman target / << EOF
    /tmp/shXXXXXX: Permission deniedPlease help!
    Thanks a lot!

    Not an Oracle problem.
    A 'here-document' is automatically turned in a temporary file.
    The default directory for temporary files is /tmp.
    As per the error message, you apparently didn't read, you have no permission to create files in this directory.
    You can change the location of your temporary files for your session by setting the TMP and TMPDIR variables to an appropiate value.
    Sybrand Bakker
    Senior Oracle DBA

  • Shell script for RMAN backup

    Hi,
    on 10G R2 in AIX 6.1
    I'm looking for Shell script for RMAN backup.
    Moreover , if we should connect like this :
    rman nocatalog target sys/password@myDB << EOF
    backup as compressed backupset format '$savdir/ctl_%d_%T_%s_%p' current controlfile;
    exit
    EOFHow to avoid writting password in shell script ?
    Thank you.

    user522961 wrote:
    Can you please tell me in case of having a catalog , how to connect to catalog without writting password in script ? I mean , how to write the following in a way without password :
    #!/usr/bin/ksh
    export ORACLE_SID=myDB
    ORACLE_ENV_ASK=NO
    . /usr/local/bin/oraenv
    export savedir=/backups/myDB
    rman target /  << EOF
    connect catalog rman/password@myrepository
    backup as compressed backupset
        format '$savdir/ctl_%d_%T_%s_%p'
        include current controlfile;
    exit
    EOF:p

  • Want to create unix shell script for  Clone procedure in 11i and r12

    Want to create unix shell script for Clone procedure in 11i and r12 .Can anyone help me on this as I m new to oracle apps and scripting.
    Thanks in advance .

    user11958935 wrote:
    Thanks but I want it for application cloning ie adcfgclone and autoconfig etc .Please see old threads for similar topic/discussion.
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Automate+AND+Rapid+AND+Clone&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Automate+AND+AutoConfig&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

Maybe you are looking for