Rman delete archivelog until time 2hrs

guys,
I want to use this inside rman.
rman{
RUN{
ALLOCATE CHANNEL ch01 TYPE DISK FORMAT 'blah lah';
BACKUP
ARCHIVELOG ALL
DELETE archivelog until time "older than 2 hrs ago" backed up 1 times to device type sbt; ;
RELEASE CHANNEL ch01;
how do i translate this "older than 2 hrs ago" to RMAN language
Edited by: user2579172 on Mar 29, 2010 1:19 PM

this served my purpose :
DELETE archivelog until time "sysdate-1/30" backed up 1 times to device type disk ;
but
rman is prompting whether to delete the archivelogs or not
ex:
List of Archived Log Copies
Key Thrd Seq S Low Time Name
4303374 1 11623
Do you really want to delete the above objects (enter YES or NO)?
Error occurred getting response - assuming NO response
released channel: ch01
RMAN>
HOW i heck I tell RMAN inside the run {   to delete the archive logs without prompting me for YES OR NO                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Delete archivelogs on a manual standby with RMAN

    Hi,
    Using Oracle 10.2.0.3 Standard Edition, I created a manual physical standby database with a standby controlfile. FRA is configured on both servers.
    I want to use RMAN (recovery catalog in the controlfile) to delete archivelogs on the standby server using the following command:
    rman target /
    delete archivelog until time 'sysdate-5';
    The synchronisation is monitored on a daily basis so there's no risk to delete an archivelog that is not applied.
    My question: Is there a risk of corruption of the RMAN catalog (in the controlfile) in the event of a failover? I mean, will I be able to perform my RMAN backup as it becomes the primary?
    Thanks
    Christophe

    I don't see a problem with this statement. In 10g - even when a controlfile is missing backup information for whatever reason - backups can be recataloged.
    Werner

  • Rman syntext for deleting archivelogs

    I am looking for rman syntax to delete all archivelogs but leave last 30 minutes on the disk. I tried following but it did not work
    delete archivelog until time ‘sysdate – 30/(24* 60)’
    any help would be appreciated.
    Thanks,
    mkjoco

    There was no error but RMAN was keep deleting extra logs that were created after the requested time. But good news is that it is working now with following command:
    "delete copy of archivelog all completed before 'sysdate - 30/(24*60)';"
    I found this on the net. It seems to me that RMAN was looking for first SCN time, in the log with "UNTIL TIME " but with "COPY OF" its look for file creation time.
    Don't take my words this is my guess .... If someone can verify this would be nice
    Thanks

  • Deleting Archivelogs

    Hey, I am running a 11.2.0.3 RAC in archivelog mode.
    I plan to modify my backup strategy.
    Instead of a rman backup I just want to run a datapump export for three users of the database.
    My plan:
    One LEVEL 0 backup on disk, on ftp server and on local disk.
    In a case of a failure I would use the fullbackup to restore the skeleton of the database. On top I would import the users from the datapump export.
    I need the archivelogs, due to the fact that I have standby database in place.
    Question:
    If I DO NOT backup the archivelogs, will the archivelogs get deleted automatically or will the FRA run out of diskspace ?
    Until now I just this command:
    delete force noprompt archivelog all backed up 1 times to device type disk completed before 'sysdate -2';
    I can´t use this any further right ?
    Can I do this instead ?
    delete archivelog until time ‘SYSDATE-2′;    ????
    Chris

    Hey, I see the prob. With an old level 0 backup I cant´t restore until the end with the remaining archivelogs.
    So, I changed my backup idea:
    The plan is to backup the database once a week and keep the archivelogs for 8 days.
    Instead of a daily incremental level 1 backup I would just export the users with datapump and also back up archivelogs.
    All backups are transfered to a backup server.
    Here my schedule:
    Sun:
    run {BACKUP incremental level 1 for recover of copy with tag 'Fullbackup' database plus archivelog;
    recover copy of database with tag 'Fullbackup';}
    Mon-Sat:
    backup archivelog all not backed up 1 times;
    delete force noprompt archivelog all backed up 1 times to device type disk completed before 'sysdate -8';
    Does this make sense ?
    Chris

  • Deleting Archivelog files.

    I'm trying to do some cleanup of my archivelog files that are over 30 days old that have been backed up using the command:
    delete archivelog until time 'sysdate -30';
    I get an ORA-15028 saying that a file is currently being accessed.
    My question is how can I find out what is trying to access a file that is close to 40 days old?

    Note the difference betweeen 'UNTIL TIME' and 'COMPLETED BEFORE'
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta008.htm#sthref121
    Is your "latest" Level 0 backup more than 30 days old ? Or do you have Retention Policy exceeding 30 days ?

  • Set until time WITH RMAN

    Hi
    I have tested the codes too but it doesn't seem to be able to recover the database (including the tablespace which I have dropped). Why?
    # RMAN backup
    run
    allocate channel ch1 type disk;
    sql 'alter system archive log current';
    backup format '/backup/orcl/%d_t%t_s%s_p%p'
    filesperset=4
    database;
    release channel ch1;
    RMAN > list backup;
    File LV Type Ckp SCN Ckp Time Name
    1 Full 4072944 06-JUL-05 /oracle/oradata/system01.dbf
    8 Full 4072944 06-JUL-05 /oracle/oradata/tools01.dbf
    12 Full 4072944 06-JUL-05 /oracle/oradata/test01.dbf
    # Drop tablespace
    drop tablespace test including contents;
    # RMAN Recovery
    shutdown immediate;
    startup mount;
    # time is set to after rman backup and before tablespace dropped
    RMAN>
    run {
    set until time "to_date('06-07-2005 16:50:00','dd-mm-yyyy hh24:mi:ss')";
    restore database;
    recover database;
    RMAN > list backup;
    File LV Type Ckp SCN Ckp Time Name
    1 Full 4072944 06-JUL-05 /oracle/oradata/system01.dbf
    8 Full 4072944 06-JUL-05 /oracle/oradata/tools01.dbf
    12 Full 4072944 06-JUL-05
    Why is the RMAN list empty for the deleted tablespace? That's the reason why there is nothing to reover from?

    check at sql prompt
    select substr(name,1,50),status
      2    from v$datafileYours test01.dbf file should have status recover and filename should be missing.
    Khurram

  • How to delete archivelogs ???????

    Dear Experts,
    I am looking for a way to delete archive logs through RMAN's backup command, something like this:
    BACKUP ARCHIVELOG all delete input until time 'sysdate-5/24';
    We are on Oracle 10g Release 2 (10.2.0.3), IBM - AIX 5.3.
    I would like to retain archivelog's generated in the last 5 hours on disk and let RMAN delete anything else older than that. When I am using the above command, RMAN is throwing errors on my face:
    RMAN>  BACKUP ARCHIVELOG all delete input until time 'sysdate-5/24';
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "until": expecting one of: "archivelog, backup, backupset, channel, copy, controlfilecopy, current, database, datafile, datafilecopy, delete, diskratio, db_recovery_file_dest, filesperset, format, from, force, include, keep, (, maxsetsize, noexclude, nokeep, not, pool, plus, reuse, recovery, ;, skip, spfile, setsize, tablespace, tag, to"
    RMAN-01007: at line 1 column 36 file: standard input
    RMAN>I know RMAN has DELETE command but we are having issues when using BACKUP and DELETE. We are receiving intermittent errors during BACKUP command due to media manager and the backup fails. However, RMAN script continues and is happily removing archive logs from disk whether backed up or not.
    I did try to look into manuals and google, but I think I am little dumb to extract information.
    Your help is appreciated.
    Regards
    Edited by: Oracle Lover3 on Nov 16, 2008 11:45 PM
    OS & DB version added

    Try
    RMAN> run
    2> {
    3> set until time "to_date(to_char(sysdate-5/24,'DD-MM-YYYY HH24:MI:SS'),'DD-MM-YYYY HH24:MI:SS')";
    4> backup archivelog all delete input;
    5> }I think it will not work i have tested it recently..
    Khurram

  • Rman delete old file and recover

    Hi Friends,
    after full backup.
    we use below syntax to delete old file.
    delete noprompt archivelog until time '(SYSDATE - 10)';
    However, we get a message that file is used and delete failure. ramn stop process.
    my question:
    does the old archivelog file is deleted ot not?
    If the old archivelog file is delete, do we have any command like sql rollback to recover it?
    any other commane to recover mis comman in ramn.
    or we must recover it?
    Thanks,
    ji

    user589812 wrote:
    Hi Friends,
    after full backup.
    we use below syntax to delete old file.
    delete noprompt archivelog until time '(SYSDATE - 10)';
    However, we get a message that file is used and delete failure. ramn stop process.
    Please paste the error here.
    my question:
    does the old archivelog file is deleted ot not?
    If the old archivelog file is delete, do we have any command like sql rollback to recover it?
    any other commane to recover mis comman in ramn.
    or we must recover it?
    Thanks,
    jithere is no any command sort of rolback to recover archivelog,if you have backup of archivelog then you can restore
    archivelog from this archivelog backupset.
    RMAN>restore archivelog all
    Khurram

  • RMAN and Point IN time recovery

    1. We have a table with bad data.
    2. We know that data was entered via the GUI exactly one week ago.
    3. I have an RMAN database full back-up that was taken the same day but before the table was screwed.
    4. the database in archivelog mode.
    5. we will be happy to restore the database in the condition before the change occured
    5. when I restore database via RMAN, and do:
    recover UNTIL TIME '16-MAR-2005';
    Oracle restore bad data, and if I put time or scn I get a message that the database incarnation is wrong!
    Is there any other way to do it?
    TIA

    Thanks Laurent! I was able to restore it only until Mar. 17?
    1. RMAN> reset database to incarnation 2;
    2. RMAN> restore database until time "timestamp '2005-03-15 00:00:00.00'";
    RMAN-03002: failure of recover command at 03/29/2005 19:44:11
    RMAN-06555: datafile 1 must be restored from backup created before 15-MAR-05
    3. My backup was created on Mar. 16, :
    RMAN> restore database until time "timestamp '2005-03-17 00:00:00.00'";
    RMAN-03002: failure of restore command at 03/29/2005 19:46:55
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 4 found to restore
    RMAN-06023: no backup or copy of datafile 3 found to restore
    4. RMAN>Restore database; OK
    5. RMAN>Recover database; internal error!
    RMAN-03002: failure of recover command at 03/29/2005 20:08:02
    ORA-00283: recovery session canceled due to errors
    RMAN-11003: failure during parse/execution of SQL statement: alter database reco
    ver logfile 'G:\ORACLE\ORA10G\FLASH_RECOVERY_DATA\ORCLSRMA\CONTROLFILE\2005_03_2
    3\O1_MF_1_14_14442T9B_.ARC'
    ORA-00283: recovery session canceled due to errors
    ORA-00600: internal error code, arguments: [3021], [1], [15], [2], [0], [419057]
    , [0], [416789]
    6. RMAN> recover database until time "timestamp '2005-03-17 00:00:00.00'"; OK
    7.RMAN> recover database until time "timestamp '2005-03-17 00:00:00.00'"; OK
    8. RMAN> alter database open resetlogs; OK
    9. RMAN> list incarnation;
    List of Database Incarnations
    DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
    1 1 ORCLSRMA 2671268838 PARENT 1 09-MAR-04
    2 2 ORCLSRMA 2671268838 PARENT 318842 01-MAR-05
    3 3 ORCLSRMA 2671268838 ORPHAN 380529 25-MAR-05
    5 5 ORCLSRMA 2671268838 CURRENT 409286 29-MAR-05
    4 4 ORCLSRMA 2671268838 ORPHAN 416789 25-MAR-05

  • Set until time clause to restore controlfile

    Hello
    How can I use "set until" clause to restore the controlfile ?
    The database is already in archivelog mode.
    RMAN>
    run {
    set until time "TO_DATE('2011-02-24 09:30:00','yyyy-mm-dd hh24:mi:ss')";
    restore controlfile from autobackup;
    RMAN>
    RMAN> 2> 3> 4>
    executing command: set until time
    using target database control file instead of recovery catalog
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of set command at 02/24/2011 09:52:54
    ORA-01507: database not mountedThis is the rman backup log:
    Starting Control File and SPFILE Autobackup at 24-FEB-11
    piece handle=/oracle/ora1020/dbs/c-1270860316-20110224-01 comment=NONE
    Finished Control File and SPFILE Autobackup at 24-FEB-11I can also confirm that it was backed up.
    ls -l /oracle/ora1020/dbs/c-1270860316-20110224-01
    -rw-r-----  1 oracle dba 7143424 Feb 24 09:25 /oracle/ora1020/dbs/c-1270860316-20110224-01

    For Datafiles and ArchiveLogs :
    SET UNTIL works because RMAN can query the Controlfile (that is already present) {OR the Catalog, if available} to determine the Database Incaranation and identify all the BackupSets, BackupPieces and SCNs for datafiles.
    For Controlfiles :
    SET UNTIL needs to be able to query a source or determine a default location. If a Catalog is available, it can query the catalog. In the absence of the catalog, it can only determine the expected location to restore from on the basis of the AUTOBACKUP location and FORMAT.
    When you have AutoBackup to Disk, using an FRA and have the AUTOBACKUP FORMAT set correctly you will notice that the controlfile backups go to a directory that has the date as part of the directory name. RMAN can "query" the backups it finds in each of the folders in the autobackup location and determine the correct piece to restore from. This is predicated on the FORMAT being the expected format. That is why the example also shows how you set the FORMAT before you do the restore -- to "tell" RMAN what format to expect. (Remember that it has no repository -- controlfile or catalog -- to query so it doesn't know the backup piece names, unless they follow the expected location and format !)
    All of this works well on disk. On tape, it has to actually send it's requests to the Medial Management Layer -- it is the Media Management Layer that maintains the catalog of tapes and files on tapes. (Remember that RMAN still doesn't have a repository that it can query !).
    Going back to my earlier comment that SET UNTIL is used for Datafiles and Archivelogs : Because it is much easier for RMAN to query a known repository for all the information it needs.
    Hemant K Chitale

  • How to delete archivelog file at standby database

    Hi All,
    I'm running Physical Standby Database on ASM. At standby database, I can see all logs using asmcmd:
    ASMCMD> ls
    thread_1_seq_14.330.625772527
    thread_1_seq_15.346.625772527
    thread_1_seq_16.329.625772527
    thread_1_seq_17.327.625772559
    thread_1_seq_18.324.625772599
    thread_1_seq_19.341.625772367
    thread_1_seq_2.325.625772329
    But when I run RMAN to delete all these archivelogs, its give me error:
    oradr:/u01/app/oracle$rman rcvcat rman/rman@rman target /
    Recovery Manager: Release 10.2.0.3.0 - Production on Thu Jun 28 13:50:41 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    connected to target database: AIXDB (DBID=2438430915, not open)
    connected to recovery catalog database
    RMAN> delete archivelog all;
    Starting implicit crosscheck backup at 28-JUN-07:01:50:56
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of delete command at 06/28/2007 13:50:56
    RMAN-12010: automatic channel allocation initialization failed
    RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog
    RMAN> register database;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of register command at 06/28/2007 13:51:06
    RMAN-08040: full resync skipped, control file is not current or backup
    Even it is not registering it. So how to delete archivelog file at standby database.
    Thanks in Advance
    Rakesh

    This appears related to Bug 3298797 that was supposed to be fixed in 10.2.0.1. The workaround is to switch over to the standby, register the standby and then switch back.

  • RMAN in 10g database deletes archivelog files before standby receives them

    Hi all,
    We currently have problem with our Oracle 10gR1 database on Windows 2000 server in that the RMAN backups on the primary database delete archivelogs before the standby database can receive current and new archivelogs from primary database. What happens is that RMAN backs up the archivelogs and deletes them from disk before the archivelogs are sent to the standby. The standby then looks for these archivelogs on the primary but is unable to locate them. Whenever this happens, the production database (primary) hangs and we have to restart the instance on the primary. We have our Data Guard setup in maximum performance mode so this should not happen.
    As a short term fix, we have changed the backups to have RMAN backup and delete the archive logs 15 minutes older than current time so that the standby can receive the logs and not have problems. Besides this fix is there a long term solution to the problem or is it a bug in Oracle 10g? The issue came up after we upgraded from 9i to 10g and never saw it before in 9i with RMAN and Data Guard physical standby databases.
    Thanks
    Ben Prusinski, Oracle DBA

    thanks for answer...
    did you managed to make it 'work'?
    according to doc. if set on standby it should:
    <>
    Then, these files are eligible for deletion:
    Archived redo log files in the flash recovery area that
    were applied on the standby database.
    <>
    and this is to my understanding irespective to retention policy...unfortunately report obsolete does not report applied archived logs as eligable for deletion.
    How this works in your case?
    regards.
    goran

  • Delete archivelogs with rman

    I have this setting on one database: 10.2.0.3 on linux x86
    CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
    When a backup occurs, i issue the following at the end:
    delete noprompt obsolete device type disk;
    Which delete an old backup and old archivelogs on the server.
    Situation: It happen rarely, but still, sometimes, I have to manualy delete archivelogs to make space.
    Here is what i do: Ensure that the archivelogs which I am about to delete are backed up.
    Then I issue the following Rman command:
    crosscheck archivelog all;
    delete noprompt expired archivelog all;
    which tells Rman that the archivelogs are not on the os anymore.
    Is there a way to delete archivelogs with rman or oracle, not manually on the os?
    note: i do not want to delete a backupset will doing so.
    This is temporary solution. More disk space is comming and new backup scenario will be in place for this database.

    Exists many ways to make this, as:
    DELETE NOPROMPT FORCE COPY OF ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-1';
    or
    BACKUP ARCHIVELOG all DELETE ALL INPUT;
    or
    BACKUP ARCHIVELOG all NOT BACKED UP 2 TIMES DELETE ALL INPUT;
    ...

  • How to delete archivelog with RMAN in the Primary and Standby database?

    Hello,
    I am working on Oracle 10gR2.
    My question is :
    How could I implement a automatized and secure way of:
    1) Delete archivelogs on my PRIMARY server only when these logs are successfully TRANSFERED to all my standby databases?
    2) Delete archivelogs on my STANDBY server only when these logs are sucessfully APPLIED to the database?
    Thanks a lot for your help!

    on 10G
    CONFIGURE ARCHIVELOG DELETION POLICY TO [CLEAR | NONE | APPLIED ON STANDBY];
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/rman.htm#CHDBEICE
    Coskan Gundogar
    http://coskan.wordpress.com

  • How to fix RMAN-20207: UNTIL TIME is before RESETLOGS time

    Early this morning, in my haste to get a point in time restore and recovery started, I forgot to restore the controlfile as the 1st step.
    I used the current database control file, and now I have "RMAN-06004: ORACLE error from recovery catalog database: RMAN-20207: UNTIL TIME is before RESETLOGS time". I have a recovery catalog database. This is Oracle 8.1.7.4.
    Here was my script syntax:
    export ORACLE_SID=myname
    export ORACLE_HOME=/x01/oracle/product/8.1.7
    export LOG=/x01/admin/recover/point_in_time_${ORACLE_SID}_${TimeStamp}.log
    echo "Starting Time: `date`" > $LOG
    /x01/oracle/product/8.1.7/bin/rman <<! | tee -a ${LOG}
    set echo on;
    connect target
    connect catalog myuser/mypass@mycatalog
    startup nomount pfile='/x01/admin/myname/pfile/initmyname.ora';
    alter database mount;
    run {
    set until time "to_date('2006-12-02:03:00:00','yyyy-mm-dd:hh24:mi:ss')";
    allocate channel t1 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.opt)';
    allocate channel t2 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.opt)';
    restore database;
    recover database;
    release channel t1;
    release channel t2;
    Alter Database Open Resetlogs;
    sql "alter tablespace temp01 add tempfile ''/x01/myname/temp1/temp01_01.tmp'' SIZE 5308416 REUSE AUTOEXTEND ON NEXT 5242880 MAXSIZE 2097217536";
    sql "alter tablespace temp01 add tempfile ''/x01/myname/temp1/temp01_02.tmp'' SIZE 5308416 REUSE AUTOEXTEND ON NEXT 5242880 MAXSIZE 2097217536";
    exit
    echo "Finished Time: `date`" >> ${LOG}
    Can I do the following to try to restore the controlfile? First, I would shutdown my database.
    export ORACLE_SID=myname
    export ORACLE_HOME=/x01/oracle/product/8.1.7
    export LOG=/x01/admin/rman/recover/db_point_in_time_8i_${ORACLE_SID}_${TimeStamp}.log
    echo "Starting Time: `date`" > $LOG
    /x01/oracle/product/8.1.7/bin/rman <<! | tee -a ${LOG}
    set echo on;
    connect target
    connect catalog myuser/mypass@mycatalog
    startup nomount pfile='/x01/admin/myname/pfile/initmyname.ora';
    alter database mount;
    run {
    set until time "to_date('2006-12-02:03:00:00','yyyy-mm-dd:hh24:mi:ss')";
    allocate channel t1 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.opt)';
    allocate channel t2 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.opt)';
    restore controlfile to '/x01/disk/control01.ctl';
    replicate controlfile from '/x01/disk/control01.ctl';
    recover database;
    release channel t1;
    release channel t2;
    Alter Database Open Resetlogs;
    sql "alter tablespace temp01 add tempfile ''/x01/myname/temp1/temp01_01.tmp'' SIZE 5308416 REUSE AUTOEXTEND ON NEXT 5242880 MAXSIZE 2097217536";
    sql "alter tablespace temp01 add tempfile ''/x01/myname/temp1/temp01_02.tmp'' SIZE 5308416 REUSE AUTOEXTEND ON NEXT 5242880 MAXSIZE 2097217536";
    exit
    echo "Finished Time: `date`" >> ${LOG}
    I have a new incarnation of the database too -
    List of Database Incarnations
    DB Key Inc Key DB Name DB ID CUR Reset SCN Reset Time
    1 2 MYNAME 1849293826 NO 1 06-AUG-03
    1 25874 MYNAME 1849293826 NO 750748990 26-SEP-03
    1 143681 MYNAME 1849293826 NO 6610874669464 12-AUG-05
    1 265345 MYNAME 1849293826 YES 6611455777113 14-DEC-06
    What is the fastest way to fix this situation without having to restore the entire database?
    Thanks,
    Message was edited by:
    user521040

    Here is the "revised" script - I have not run this again on the Production system, but I might get a chance - finding corruption on the disk. I will test out later on a development database:
    #!/usr/bin/ksh
    TimeStamp=`date +%Y%m%d_%H%M%S`
    export ORACLE_SID=myname
    export ORACLE_HOME=/x01/oracle/product/8.1.7
    export LOG=/x01/admin/rman/recover/8i_${ORACLE_SID}_${TimeStamp}.log
    echo "Starting Time: `date`" > $LOG
    /x01/oracle/product/8.1.7/bin/rman <<! | tee -a ${LOG}
    set echo on;
    connect target
    connect catalog myuser/mypass@mycat1
    startup nomount pfile='/x01/admin/myname/pfile/initmyname.ora';
    run {
    set until time "to_date('2006-11-25:18:08:00','yyyy-mm-dd:hh24:mi:ss')";
    allocate channel t1 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.opt)';
    allocate channel t2 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.opt)';
    allocate channel t3 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.opt)';
    allocate channel t4 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.opt)';
    restore controlfile to '/x01/disk/control01.ctl';
    replicate controlfile from '/x01/disk/control01.ctl';
    alter database mount;
    restore database;
    recover database;
    Alter Database Open Resetlogs;
    sql "alter tablespace temp01 add tempfile ''/x01/myname/temp1/temp01_01.tmp'' SIZE 5308416 REUSE AUTOEXTEND ON NEXT 5242880 MAXSIZE 20
    97217536";
    sql "alter tablespace temp01 add tempfile ''/x01/myname/temp1/temp01_02.tmp'' SIZE 5308416 REUSE AUTOEXTEND ON NEXT 5242880 MAXSIZE 20
    97217536";
    release channel t1;
    release channel t2;
    release channel t3;
    release channel t4;
    exit
    echo "Finished Time: `date`" >> ${LOG}
    Message was edited by:
    user521040

Maybe you are looking for

  • Cannot install CS3 on Win-7 64-Bit

    I have a brand new Win-7 64-bit system. I still have the install files for CS3 Web Premium that I downloaded 3 years ago. I have had various problems. Installed at first and programs hung or failed to open. I tried going back to a restore point and i

  • MSI GX620 Display failed?

    Hi All, I was using my laptop earlier today and i have the laptop screen as primary display and an external LCD as secondary. For the last few days i've noticed a kind of whining / squeak coming from the laptop whenever i restart it from sleep mode.

  • A app on my apple acct that is not mine & I can not get rid of it

    a app on my apple acct that is not mine & I can not get rid of it

  • Printing in Black

    I have an All in One C7280 HP printer and have not in the last two years been able to figure out how to just print in black.  Not greyscale... not color...just black.  My other HP printer would allow me to set it to color, greyscale or black, fast dr

  • I restored my mac to factory settings, now mac states there is no OS X installed?

    I restored my mac to factory settings to erase all data. On restarting the mac, it prompts me to sign in with my Apple ID to install the operating system OS X Mountain lion. When I sign in, it tells me that I have not purchased OS X Mountain lion. Wh