有时候想根据备份文件知道里面都有哪些内容,如下。
显示备份片的命令:
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;
}
阅读(6510) | 评论(0) | 转发(0) |