Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3552158
  • 博文数量: 715
  • 博客积分: 1860
  • 博客等级: 上尉
  • 技术积分: 7745
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-07 08:51
个人简介

偶尔有空上来看看

文章分类

全部博文(715)

文章存档

2023年(75)

2022年(134)

2021年(238)

2020年(115)

2019年(11)

2018年(9)

2017年(9)

2016年(17)

2015年(7)

2014年(4)

2013年(1)

2012年(11)

2011年(27)

2010年(35)

2009年(11)

2008年(11)

最近访客

分类: Oracle

2020-02-15 16:03:44

有时候想根据备份文件知道里面都有哪些内容,如下。

显示备份片的命令:
RMAN> list backuppiece '/arc/arch_bak/20200118/ orcl_675237_1_1029998715.arc';

List of Backup Pieces
BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
665128  664218  1   1   AVAILABLE   DISK        /arc/arch_bak/20200118/ orcl_675237_1_1029998715.arc


RMAN> list backupset 664218;

List of Backup Sets
===================


BS Key  Size       Device Type Elapsed Time Completion Time    
------- ---------- ----------- ------------ -------------------
664218  2.07M      DISK        00:00:00     2020-01-18 06:45:15
        BP Key: 665128   Status: AVAILABLE  Compressed: YES  Tag: TAG20200118T063141
        Piece Name: /arc/arch_bak/20200118/ orcl_675237_1_1029998715.arc


  List of Archived Logs in backup set 664218
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  2    151170  12935002549124 2020-01-18 00:10:22 12935002573331 2020-01-18 00:10:40
  2    151171  12935002573331 2020-01-18 00:10:40 12935002604252 2020-01-18 00:10:55
  2    151172  12935002604252 2020-01-18 00:10:55 12935002677557 2020-01-18 00:11:25
  2    151173  12935002677557 2020-01-18 00:11:25 12935002709431 2020-01-18 00:11:58
  2    151174  12935002709431 2020-01-18 00:11:58 12935002738160 2020-01-18 00:12:25
  2    151175  12935002738160 2020-01-18 00:12:25 12935002743377 2020-01-18 00:13:01
  2    151176  12935002743377 2020-01-18 00:13:01 12935002745224 2020-01-18 00:13:16
  2    151177  12935002745224 2020-01-18 00:13:16 12935002746697 2020-01-18 00:13:46
  2    151178  12935002746697 2020-01-18 00:13:46 12935002748284 2020-01-18 00:14:19
  2    151179  12935002748284 2020-01-18 00:14:19 12935002751045 2020-01-18 00:14:52


显示某个归档备份情况,可以看出存放在哪个备份片中:
RMAN> list backup of archivelog sequence 151202 thread 2;

List of Backup Sets
===================


BS Key  Size       Device Type Elapsed Time Completion Time    
------- ---------- ----------- ------------ -------------------
664217  3.81M      DISK        00:00:00     2020-01-18 06:45:10
        BP Key: 665127   Status: AVAILABLE  Compressed: YES  Tag: TAG20200118T063141
        Piece Name: /arc/arch_bak/20200118/ orcl_675236_1_1029998710.arc


  List of Archived Logs in backup set 664217
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  2    151202  12935003000655 2020-01-18 00:22:43 12935003012499 2020-01-18 00:23:01

显示一段时间内的归档有多少个:
list backup of archivelog time between '2020-01-18 23:30:00' and '2020-01-19 00:00:00' ;

并行恢复一段时间内归档:
run {
allocate channel t1 type disk;
allocate channel t2 type disk;
restore archivelog time between '2020-02-05 00:00:00' and '2020-02-06 00:00:00';
release channel t1;
release channel t2;
}

并行recover 数据库:
run {
allocate channel t1 type disk;
allocate channel t2 type disk;
allocate channel t3 type disk;
allocate channel t4 type disk;
allocate channel t5 type disk;
allocate channel t6 type disk;
allocate channel t7 type disk;
allocate channel t8 type disk;
 recover database;
release channel t1;
release channel t2;
release channel t3;
release channel t4;
release channel t5;
release channel t6;
release channel t7;
release channel t8;
}
阅读(6677) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~