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