Friday, June 4, 2010

Differences among RMAN "backup validate" vs "validate" vs "restore validate"

RMAN-06025: no backup of log thread 1 seq

RMAN> restore validate database archivelog all;

Starting restore at 04-JUN-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=151 device type=DISK

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/04/2010 15:13:11
RMAN-06026: some targets not found - aborting restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5717 and starting SCN of 90672563 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5716 and starting SCN of 90671257 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5715 and starting SCN of 90669865 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5714 and starting SCN of 90668491 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5713 and starting SCN of 90667265 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5712 and starting SCN of 90665604 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5711 and starting SCN of 90663969 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5710 and starting SCN of 90662183 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5709 and starting SCN of 90661731 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5708 and starting SCN of 90661695 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5707 and starting SCN of 90661598 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5706 and starting SCN of 90661547 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5705 and starting SCN of 90661493 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5704 and starting SCN of 90661408 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5703 and starting SCN of 90661365 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5702 and starting SCN of 90660916 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5701 and starting SCN of 90659319 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5700 and starting SCN of 90657704 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5699 and starting SCN of 90656102 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5698 and starting SCN of 90652339 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5697 and starting SCN of 90652021 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5696 and starting SCN of 90650642 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5695 and starting SCN of 90649992 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5694 and starting SCN of 90648769 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5693 and starting SCN of 90647889 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5692 and starting SCN of 90647013 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5691 and starting SCN of 90646962 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5690 and starting SCN of 90646911 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5689 and starting SCN of 90646821 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5688 and starting SCN of 90646779 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5687 and starting SCN of 90646734 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5686 and starting SCN of 90646312 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5685 and starting SCN of 90644781 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5684 and starting SCN of 90643259 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5683 and starting SCN of 90641885 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5682 and starting SCN of 90640382 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5681 and starting SCN of 90638947 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5680 and starting SCN of 90637825 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5679 and starting SCN of 90637740 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5678 and starting SCN of 90637663 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5677 and starting SCN of 90637584 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5676 and starting SCN of 90637499 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5675 and starting SCN of 90637411 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5674 and starting SCN of 90637324 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5673 and starting SCN of 90637250 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5672 and starting SCN of 90637163 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5671 and starting SCN of 90637086 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5670 and starting SCN of 90636883 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5669 and starting SCN of 90636724 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5668 and starting SCN of 90636636 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5667 and starting SCN of 90636558 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5666 and starting SCN of 90636476 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5665 and starting SCN of 90636388 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5664 and starting SCN of 90636303 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5663 and starting SCN of 90636218 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5662 and starting SCN of 90636136 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5661 and starting SCN of 90636051 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5660 and starting SCN of 90635969 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5659 and starting SCN of 90635885 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5658 and starting SCN of 90635690 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5657 and starting SCN of 90625609 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5656 and starting SCN of 90625536 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5655 and starting SCN of 90625449 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5654 and starting SCN of 90625375 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5653 and starting SCN of 90625291 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5652 and starting SCN of 90625203 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5651 and starting SCN of 90625116 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5650 and starting SCN of 90625031 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5649 and starting SCN of 90624943 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5648 and starting SCN of 90624858 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5647 and starting SCN of 90624727 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5646 and starting SCN of 90623981 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5645 and starting SCN of 90623013 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5644 and starting SCN of 90621913 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5643 and starting SCN of 90620903 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5642 and starting SCN of 90619822 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5641 and starting SCN of 90618825 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5640 and starting SCN of 90617732 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5639 and starting SCN of 90616742 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5638 and starting SCN of 90615632 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5637 and starting SCN of 90614548 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5636 and starting SCN of 90613448 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5635 and starting SCN of 90612441 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5634 and starting SCN of 90611356 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5633 and starting SCN of 90610270 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5632 and starting SCN of 90609238 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5631 and starting SCN of 90608182 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5630 and starting SCN of 90607097 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5629 and starting SCN of 90605993 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5628 and starting SCN of 90604905 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5627 and starting SCN of 90603852 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5626 and starting SCN of 90602754 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5625 and starting SCN of 90601669 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5624 and starting SCN of 90600597 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5623 and starting SCN of 90599503 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5622 and starting SCN of 90598417 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5621 and starting SCN of 90597407 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5620 and starting SCN of 90596318 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5619 and starting SCN of 90595262 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5618 and starting SCN of 90594182 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5617 and starting SCN of 90593103 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5616 and starting SCN of 90592013 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5615 and starting SCN of 90590931 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5614 and starting SCN of 90589814 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5613 and starting SCN of 90588736 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5612 and starting SCN of 90587642 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5611 and starting SCN of 90586576 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5610 and starting SCN of 90585477 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5609 and starting SCN of 90584397 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5608 and starting SCN of 90583310 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5607 and starting SCN of 90582216 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5606 and starting SCN of 90581135 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5605 and starting SCN of 90580204 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5604 and starting SCN of 90579118 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5603 and starting SCN of 90578026 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5602 and starting SCN of 90577109 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5601 and starting SCN of 90576016 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5600 and starting SCN of 90575101 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5599 and starting SCN of 90573998 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5598 and starting SCN of 90573068 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5597 and starting SCN of 90572084 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5596 and starting SCN of 90570989 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5595 and starting SCN of 90569918 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5594 and starting SCN of 90568818 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5593 and starting SCN of 90567741 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5592 and starting SCN of 90566643 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5591 and starting SCN of 90565551 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5590 and starting SCN of 90564469 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5589 and starting SCN of 90563378 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5588 and starting SCN of 90562411 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5587 and starting SCN of 90561315 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5586 and starting SCN of 90560224 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5585 and starting SCN of 90559127 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5584 and starting SCN of 90558193 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5583 and starting SCN of 90557099 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5582 and starting SCN of 90556180 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 5581 and starting SCN of 90555100 found to restore
RMAN-00567: Recovery Manager could not print some error messages

SQL> select sequence#, deleted,status from v$archived_log where sequence# between 5581 and 5717;

 SEQUENCE# DEL STATUS
---------- --- ----------
      5581 YES D
      5582 YES D
      5583 YES D
      5584 YES D
      5585 YES D
      5586 YES D
      5587 YES D
      5588 YES D
      5589 YES D
      5590 YES D
      5591 YES D

 SEQUENCE# DEL STATUS
---------- --- ----------
      5592 YES D
      5593 YES D
      5594 YES D
      5595 YES D
      5596 YES D
      5597 YES D
      5598 YES D
      5599 YES D
      5600 YES D
      5601 YES D
      5602 YES D

 SEQUENCE# DEL STATUS
---------- --- ----------
      5603 YES D
      5604 YES D
      5605 YES D
      5606 YES D
      5607 YES D
      5608 YES D
      5609 YES D
      5610 YES D
      5611 YES D
      5612 YES D
      5613 YES D

 SEQUENCE# DEL STATUS
---------- --- ----------
      5614 YES D
      5615 YES D
      5616 YES D
      5617 YES D
      5618 YES D
      5619 YES D
      5620 YES D
      5621 YES D
      5622 YES D
      5623 YES D
      5624 YES D

 SEQUENCE# DEL STATUS
---------- --- ----------
      5625 YES D
      5626 YES D
      5627 YES D
      5628 YES D
      5629 YES D
      5630 YES D
      5631 YES D
      5632 YES D
      5633 YES D
      5634 YES D
      5635 YES D

 SEQUENCE# DEL STATUS
---------- --- ----------
      5636 YES D
      5637 YES D
      5638 YES D
      5639 YES D
      5640 YES D
      5641 YES D
      5642 YES D
      5643 YES D
      5644 YES D
      5645 YES D
      5646 YES D

 SEQUENCE# DEL STATUS
---------- --- ----------
      5647 YES D
      5648 YES D
      5649 YES D
      5650 YES D
      5651 YES D
      5652 YES D
      5653 YES D
      5654 YES D
      5655 YES D
      5656 YES D
      5657 YES D

 SEQUENCE# DEL STATUS
---------- --- ----------
      5658 YES D
      5659 YES D
      5660 YES D
      5661 YES D
      5662 YES D
      5663 YES D
      5664 YES D
      5665 YES D
      5666 YES D
      5667 YES D
      5668 YES D

 SEQUENCE# DEL STATUS
---------- --- ----------
      5669 YES D
      5670 YES D
      5671 YES D
      5672 YES D
      5673 YES D
      5674 YES D
      5675 YES D
      5676 YES D
      5677 YES D
      5678 YES D
      5679 YES D

 SEQUENCE# DEL STATUS
---------- --- ----------
      5680 YES D
      5681 YES D
      5682 YES D
      5683 YES D
      5684 YES D
      5685 YES D
      5686 YES D
      5687 YES D
      5688 YES D
      5689 YES D
      5690 YES D

 SEQUENCE# DEL STATUS
---------- --- ----------
      5691 YES D
      5692 YES D
      5693 YES D
      5694 YES D
      5695 YES D
      5696 YES D
      5697 YES D
      5698 YES D
      5699 YES D
      5700 YES D
      5701 YES D

 SEQUENCE# DEL STATUS
---------- --- ----------
      5702 YES D
      5703 YES D
      5704 YES D
      5705 YES D
      5706 YES D
      5707 YES D
      5708 YES D
      5709 YES D
      5710 YES D
      5711 YES D
      5712 YES D

 SEQUENCE# DEL STATUS
---------- --- ----------
      5713 YES D
      5714 YES D
      5715 YES D
      5716 YES D
      5717 YES D

137 rows selected.



RMAN> restore validate database archivelog from sequence 5718;

Starting restore at 04-JUN-10
using channel ORA_DISK_1

channel ORA_DISK_1: scanning archived log G:\ARCHIVELOG\ARC0000006956_0717353775.0001
channel ORA_DISK_1: scanning archived log G:\ARCHIVELOG\ARC0000006957_0717353775.0001
channel ORA_DISK_1: scanning archived log G:\ARCHIVELOG\ARC0000006958_0717353775.0001
channel ORA_DISK_1: scanning archived log G:\ARCHIVELOG\ARC0000006959_0717353775.0001
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720200574_S3_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720200574_S3_S1 tag=FULLBK052810
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:16
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720200739_S4_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720200739_S4_S1 tag=FULLBK052810
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:16
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720200906_S5_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720200906_S5_S1 tag=FULLBK052810
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720201063_S6_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720201063_S6_S1 tag=FULLBK052810
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720201229_S7_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720201229_S7_S1 tag=FULLBK052810
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720201396_S8_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720201396_S8_S1 tag=FULLBK052810
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720201553_S9_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720201553_S9_S1 tag=FULLBK052810
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:55
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720201710_S10_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720201710_S10_S1 tag=FULLBK052810
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720201876_S11_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720201876_S11_S1 tag=FULLBK052810
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720202043_S12_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720202043_S12_S1 tag=FULLBK052810
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720202199_S13_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720202199_S13_S1 tag=FULLBK052810
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720205878_S15_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720205878_S15_S1 tag=FULLBK052810
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720206559_S17_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720206559_S17_S1 tag=TAG20100528T
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720206570_S18_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720206570_S18_S1 tag=TAG20100528T
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:03:46
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720209280_S19_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720209280_S19_S1 tag=TAG20100528T
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720268672_S21_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720268672_S21_S1 tag=TAG20100529T
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:09:52
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720268829_S22_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720268829_S22_S1 tag=TAG20100529T
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720268988_S23_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720268988_S23_S1 tag=TAG20100529T
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720270034_S25_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720270034_S25_S1 tag=TAG20100529T
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720791316_S38_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720791316_S38_S1 tag=TAG20100604T
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720791524_S39_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720791524_S39_S1 tag=TAG20100604T
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720791692_S40_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720791692_S40_S1 tag=TAG20100604T
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720791881_S41_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720791881_S41_S1 tag=TAG20100604T
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720792060_S42_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720792060_S42_S1 tag=TAG20100604T
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720792249_S43_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720792249_S43_S1 tag=TAG20100604T
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720792428_S44_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720792428_S44_S1 tag=TAG20100604T
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:04
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720793453_S46_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720793453_S46_S1 tag=TAG20100604T
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720799097_S48_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720799097_S48_S1 tag=TAG20100604T
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece S:\RMAN_BK\TEST\TEST720800182_S50_S1
channel ORA_DISK_1: piece handle=S:\RMAN_BK\TEST\TEST720800182_S50_S1 tag=TAG20100604T
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
Finished restore at 04-JUN-10


Check archivelog backup status:

RMAN> list archivelog all;


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

Key     Thrd Seq     S Low Time
------- ---- ------- - ---------
6955    1    6956    A 04-JUN-10
        Name: G:\ARCHIVELOG\ARC0000006956_0717353775.0001

6956    1    6957    A 04-JUN-10
        Name: G:\ARCHIVELOG\ARC0000006957_0717353775.0001

6957    1    6958    A 04-JUN-10
        Name: G:\ARCHIVELOG\ARC0000006958_0717353775.0001

6958    1    6959    A 04-JUN-10
        Name: G:\ARCHIVELOG\ARC0000006959_0717353775.0001

6959    1    6960    A 04-JUN-10
        Name: G:\ARCHIVELOG\ARC0000006960_0717353775.0001


This problem happens when you use controlfile rather than catalog as recovery information repository, according to Metalink Note: 235973.1 - Restore Archivelog All Validate Fails RMAN-06025 for Non-exsistent Backups, that this message can be ignored, or by using following two workrounds:
1 Using recovery catalog to do RMAN backup
2 or use following command:
RMAN> RESTORE VALIDATE CHECK LOGICAL ARCHIVELOG from sequence 5717;



Problem with "srvctl stop instance -o immediate"

Here are what happened today:
1 I tried to stop rac1 RAC instance.  Before stop the instance, I checked the instance status:
C:\Documents and Settings\Administrator>srvctl status database -d rac
Instance RAC1 is running on node site1-rac01
Instance RAC2 is running on node site1-rac02

2 Stop rac1 instance
C:\Documents and Settings\Administrator>srvctl stop instance -d rac -i rac1 –o immediate
PRKP-1002 : Error stopping instance RAC1 on node site1-rac01
CRS-0216: Could not stop resource 'ora.RAC.RAC1.inst'.

3 Check rac1 instance status:
C:\Documents and Settings\Administrator>srvctl status instance -d rac -i rac1
PRKO-2015 : Error in checking condition of instance on node: site1-rac01

4 Tried to start the instance:
C:\Documents and Settings\Administrator>srvctl start instance -d rac -i rac1
PRKP-1001 : Error starting instance RAC1 on node site1-rac01
CRS-1028: Dependency analysis failed because of:
CRS-0223: Resource 'ora.RAC.RAC1.inst' has placement error.

5 Check rac2 instance status:
C:\Documents and Settings\Administrator>srvctl status instance -d rac -i rac2
Instance rac2 is running on node site1-rac02

6 Stop rac1 instance by using “abort” option, it works without any error.
C:\Documents and Settings\Administrator>srvctl stop instance -d rac -i rac1 -o abort

7 Start rac1 instance without any errors:
C:\Documents and Settings\Administrator>srvctl start instance -d rac -i rac1

8 Check both rac1 and rac2 instances status:
C:\Documents and Settings\Administrator>srvctl status instance -d rac -i "rac1,rac2"
Instance rac1 is running on node site1-rac01
Instance rac2 is running on node site1-rac02

Lessons learned:
When stopping a RAC instance in Windows 2003 R2 platform, srvctl command with “-o immediate” option doesn’t work, use “-o abort” option instead.

Thursday, June 3, 2010

Create a date and time stamp in your batch files

Steve Wiseman's blog has a very helpful article about creating a date and time stamp in batch files, here is the link and brief summary:
1 Link:
http://www.intelliadmin.com/index.php/2007/02/create-a-date-and-time-stamp-in-your-batch-files/

2 Brief summary:

If we wanted to get the current year we could start 4 from the end, and 4 in length. Like this:
echo %date:~-4,4%
For the month we start 7 from the right (Length of Year + Length of Month + 1 Slash)
echo %date:~-7,2%
For the day we start 10 from the right (Length of Year + Length of Month + Length Of Day + 2 Slashes)
echo %date:~-10,2%
Bringing it all together. Lets say I zipped up a folder every night for archival purposes, and wanted a different filename for each day (Not sure if this pkzip syntax is correct, but that is not important for our discussion here)
pkzip c:\ImportantFolder\*.* c:\TempZip.zip
ren C:\TempZip.Zip c:\TempZip_%date:~-4,4%%date:~-7,2%%date:~-10,2%.zip
Which renames our C:\TempZip.Zip to C:\TempZip_20070215.zip
For timestamp, use:
%time:~-11,2%%time:~-8,2%%time:~-5,2%

RMAN backup script

In Windows 2003, I created following 4 scripts to do RMAN Incremental level 0 and Incremental level 1 backups:
Incremental Level 0 Backup
Script #1 - Incremental level 0

set ORACLE_SID=msrbrtrs
rman target / nocatalog cmdfile=S:\rman_bk\rtrs\level_0.rman log=S:\rman_bk\rtrs\rman_level_0_%date:~-4,4%%date:~-7,2%%date:~-10,2%-%time:~-11,2%%time:~-8,2%%time:~-5,2%.log.log




Script #2: the above script calls cmd file 

#1 - list current backups
list backup;


#2 - check backup status to see backup files are obsolete (exceed retention window) or expired (removed without using RMAN)
crosscheck backup;


#3 - delete expired backup
#delete expired backup;


#4 - delete obsolete backup files, which exceed the retention window.
delete obsolete;


#5 - check physical file corruption before RMAN backup
#backup validate database archivelog all;


#6 - check logical corruption before RMAN backup
#backup validate check logical database archivelog all;


#7 - backup database plus all archive log files.  After backup, delete all archived log files
backup incremental level 0 database plus archivelog all delete input;


#8 - verify the availability and integrity of backup pieces required by RMAN to perform the restore operations. 
#By default, RMAN checks only for physical corruption when validating.
restore database validate;
restore archivelog all validate;


#By default, RMAN checks only for physical corruption when validating.  Use command below to check logical corruption:
restore database validate check logical;




#Exit
exit;


Read more »