Showing posts with label Archivelog. Show all posts
Showing posts with label Archivelog. Show all posts

Thursday, May 22, 2014

Restore archivelog to non-default location

Script to restore the archivelog to non-default location
run
 {
 set archivelog destination to '/SHARED/backup1';
  restore archivelog sequence 4 force;
 }
Output:-

RMAN> run
2> {
3> set archivelog destination to '/SHARED/backup1';
4>  restore archivelog sequence 4 force;
5> }

executing command: SET ARCHIVELOG DESTINATION

Starting restore at 23-MAY-14
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 archived log restore to user-specified destination
archived log destination=/SHARED/backup1
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=4
channel ORA_DISK_1: reading from backup piece +DATA/cvrman/backupset/2014_05_22/annnf0_new_arch_bkp_0.330.848234723
channel ORA_DISK_1: piece handle=+DATA/cvrman/backupset/2014_05_22/annnf0_new_arch_bkp_0.330.848234723 tag=NEW_ARCH_BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
Finished restore at 23-MAY-14

Sunday, May 18, 2014

Change archivelog and delete

RMAN>change archivelog all
backed up 1 times to device type disk
delete;
Ouput of the script execution
released channel: ORA_DISK_2

released channel: ORA_DISK_3

released channel: ORA_DISK_4

released channel: ORA_DISK_5

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=20 device type=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: SID=24 device type=DISK

allocated channel: ORA_DISK_3

channel ORA_DISK_3: SID=25 device type=DISK

allocated channel: ORA_DISK_4

channel ORA_DISK_4: SID=58 device type=DISK

allocated channel: ORA_DISK_5

channel ORA_DISK_5: SID=60 device type=DISK

List of Archived Log Copies for database with db_unique_name CVRMAN

=====================================================================



Key     Thrd Seq     S Low Time

------- ---- ------- - ---------

70      1    4       A 15-MAY-14

        Name: +DATA/cvrman/archivelog/2014_05_17/thread_1_seq_4.295.847791843



68      1    5       A 15-MAY-14

        Name: +DATA/cvrman/archivelog/2014_05_17/thread_1_seq_5.296.847791841



72      1    6       A 15-MAY-14

        Name: +DATA/cvrman/archivelog/2014_05_17/thread_1_seq_6.304.847791845



74      1    7       A 15-MAY-14

        Name: +DATA/cvrman/archivelog/2014_05_17/thread_1_seq_7.284.847791839



69      1    8       A 15-MAY-14

        Name: +DATA/cvrman/archivelog/2014_05_17/thread_1_seq_8.315.847791843



71      1    9       A 15-MAY-14

        Name: +DATA/cvrman/archivelog/2014_05_17/thread_1_seq_9.269.847791843



67      1    12      A 15-MAY-14

        Name: +DATA/cvrman/archivelog/2014_05_17/thread_1_seq_12.310.847791839



75      1    13      A 15-MAY-14

        Name: +DATA/cvrman/archivelog/2014_05_17/thread_1_seq_13.311.847791847



84      1    1       A 17-MAY-14

        Name: /SHARED/backup1/CVRMAN_1_1_847769732.arc



78      1    1       A 17-MAY-14

        Name: +DATA/cvrman/archivelog/2014_05_17/thread_1_seq_1.301.847792345



79      1    2       A 17-MAY-14

        Name: +DATA/cvrman/archivelog/2014_05_17/thread_1_seq_2.289.847792561



80      1    3       A 17-MAY-14

        Name: +DATA/cvrman/archivelog/2014_05_17/thread_1_seq_3.328.847792661



81      1    4       A 17-MAY-14

        Name: +DATA/cvrman/archivelog/2014_05_17/thread_1_seq_4.292.847802345



82      1    5       A 17-MAY-14

        Name: +DATA/cvrman/archivelog/2014_05_17/thread_1_seq_5.312.847802453



83      1    6       A 17-MAY-14

        Name: +DATA/cvrman/archivelog/2014_05_17/thread_1_seq_6.332.847836579



85      1    7       A 17-MAY-14

        Name: +DATA/cvrman/archivelog/2014_05_18/thread_1_seq_7.288.847857575





Do you really want to delete the above objects (enter YES or NO)?

Saturday, May 17, 2014

Crosscheck backup of archivelog



RMAN> crosscheck backup of archivelog all
2> device type disk
3> completed between "sysdate-5" and "sysdate";

released channel: ORA_DISK_1
released channel: ORA_DISK_2
released channel: ORA_DISK_3
released channel: ORA_DISK_4
released channel: ORA_DISK_5
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=20 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=24 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=25 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=58 device type=DISK
allocated channel: ORA_DISK_5
channel ORA_DISK_5: SID=60 device type=DISK
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=+DATA/cvrman/backupset/2014_05_17/annnf0_arch_thread_0.285.847790639 RECID=175 STAMP=847790638
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=+DATA/cvrman/backupset/2014_05_17/annnf0_tag20140517t094051_0.316.847791655 RECID=182 STAMP=847791654
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=+DATA/cvrman/backupset/2014_05_17/annnf0_full_archivelog_bkp_0.323.847792569 RECID=188 STAMP=847792568
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=+DATA/cvrman/backupset/2014_05_17/annnf0_full_archivelog_bkp_0.299.847792567 RECID=189 STAMP=847792567
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=+DATA/cvrman/backupset/2014_05_17/annnf0_full_archivelog_bkp_0.329.847792661 RECID=194 STAMP=847792661
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/SHARED/backup1/9jp8gs2l_1_1 RECID=225 STAMP=847802453
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=+DATA/cvrman/backupset/2014_05_18/annnf0_tag20140518t021313_0.322.847851195 RECID=230 STAMP=847851193
Crosschecked 7 objects

Wednesday, May 14, 2014

Listing Archivelog between two times using RMAN



1.List the archivelog between two times

RMAN> list archivelog time between "to_date('14-MAY-2014 10:14:41','dd-mon-yyyy hh24:mi:ss')" and "to_date('15-MAY-2014 01:33:53','dd-mon-yyyy hh24:mi:ss')";


2.Output of the archivelog.

List of Archived Log Copies for database with db_unique_name CVRMAN
=====================================================================

Key     Thrd Seq     S Low Time
------- ---- ------- - --------------------
38      1    3       A 14-MAY-2014 10:14:41
        Name: +DATA/cvrman/archivelog/2014_05_15/thread_1_seq_3.298.847589635

39      1    4       A 15-MAY-2014 01:33:53
        Name: +DATA/cvrman/archivelog/2014_05_15/thread_1_seq_4.271.847589869