博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
oracle-rman-2
阅读量:6758 次
发布时间:2019-06-26

本文共 17371 字,大约阅读时间需要 57 分钟。

 

归档日志的备份

RMAN> list archivelog all; show archivelog deletion policy; configure archivelog deletion policy; configure archivelog deletion policy to backed up 1 times to disk; 配置归档删除策略,只要求归档备份一次到磁盘,之后归档就允许被删除。 backup archivelog all delete all input; 备份归档的同时删除所有输入的归档日志文件。 查看时已经没有归档日志。 RMAN> list archivelog all; specification does not match any archived log in the repository RMAN>  list backup;List of Backup Sets===================BS Key  Size       Device Type Elapsed Time Completion Time------- ---------- ----------- ------------ ---------------1       822.00M    DISK        00:00:43     07-APR-17        BP Key: 1   Status: AVAILABLE  Compressed: NO  Tag: TAG20170407T092004        Piece Name: /u01/app/oracle/fast_recovery_area/TESTDB/backupset/2017_04_07/o1_mf_annnn_TAG20170407T092004_dgftb4lp_.bkp  List of Archived Logs in backup set 1  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time  ---- ------- ---------- --------- ---------- ---------  1    1070    15073605   02-APR-17 15078206   02-APR-17  1    1071    15078206   02-APR-17 15078265   02-APR-17  1    1072    15078265   02-APR-17 15083471   02-APR-17  1    1073    15083471   02-APR-17 15108445   02-APR-17  1    1074    15108445   02-APR-17 15130090   02-APR-17  1    1075    15130090   02-APR-17 15148372   03-APR-17  1    1076    15148372   03-APR-17 15161574   03-APR-17  1    1077    15161574   03-APR-17 15181830   03-APR-17  1    1078    15181830   03-APR-17 15207352   03-APR-17  1    1079    15207352   03-APR-17 15224200   04-APR-17  1    1080    15224200   04-APR-17 15240128   04-APR-17  1    1081    15240128   04-APR-17 15240604   04-APR-17  1    1082    15240604   04-APR-17 15261618   04-APR-17  1    1083    15261618   04-APR-17 15290623   04-APR-17  1    1084    15290623   04-APR-17 15292478   04-APR-17  1    1085    15292478   04-APR-17 15317260   05-APR-17  1    1086    15317260   05-APR-17 15321811   05-APR-17  1    1087    15321811   05-APR-17 15336693   05-APR-17  1    1088    15336693   05-APR-17 15360955   05-APR-17  1    1089    15360955   05-APR-17 15371603   05-APR-17  1    1090    15371603   05-APR-17 15391219   06-APR-17  1    1091    15391219   06-APR-17 15403303   06-APR-17  1    1092    15403303   06-APR-17 15415725   06-APR-17  1    1093    15415725   06-APR-17 15438932   06-APR-17  1    1094    15438932   06-APR-17 15454209   06-APR-17  1    1095    15454209   06-APR-17 15464675   07-APR-17  1    1096    15464675   07-APR-17 15485971   07-APR-17  1    1097    15485971   07-APR-17 15489695   07-APR-17 查看归档的操作系统文件时,已经被删除 [oracle@cn-111-testdb archivelog]$ ls -R .: 2017_04_02  2017_04_03  2017_04_04  2017_04_05  2017_04_06  2017_04_07 ./2017_04_02: ./2017_04_03: ./2017_04_04: ./2017_04_05: ./2017_04_06: ./2017_04_07: 将归档日志文件变成了备份集 [oracle@cn-111-testdb 2017_04_07]$ ll total 841740 -rw-r----- 1 oracle oinstall 861935104 Apr  7 09:20 o1_mf_annnn_TAG20170407T092004_dgftb4lp_.bkp [oracle@cn-111-testdb 2017_04_07]$ pwd /u01/app/oracle/fast_recovery_area/TESTDB/backupset/2017_04_07

 

 

RMAN> list backup summary;

using target database control file instead of recovery catalog
List of Backups
===============
Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
1       B  F  A DISK        23-OCT-16       1       1       NO         TAG20161023T111550
2       B  F  A DISK        23-OCT-16       1       1       NO         TAG20161023T111550
3       B  F  A DISK        25-OCT-16       1       1       NO         TAG20161025T150647
4       B  F  A DISK        25-OCT-16       1       1       NO         TAG20161025T150647
5       B  F  A DISK        01-NOV-16       1       1       NO         TAG20161101T145207
6       B  F  A DISK        01-NOV-16       1       1       NO         TAG20161101T145207
7       B  F  A DISK        05-DEC-16       1       1       NO         TAG20161205T171327
8       B  F  A DISK        03-JAN-17       1       1       NO         TAG20170103T133345
9       B  F  A DISK        03-JAN-17       1       1       NO         TAG20170103T133345
10      B  F  A DISK        21-JAN-17       1       1       NO         TAG20170121T192514
11      B  F  A DISK        21-JAN-17       1       1       NO         TAG20170121T192514
12      B  F  A DISK        23-JAN-17       1       1       NO         TAG20170123T091308
13      B  F  A DISK        23-JAN-17       1       1       NO         TAG20170123T091308
14      B  F  A DISK        25-JAN-17       1       1       NO         TAG20170125T211529
15      B  F  A DISK        25-JAN-17       1       1       NO         TAG20170125T211529
16      B  F  A DISK        28-JAN-17       1       1       NO         TAG20170128T194205
17      B  F  A DISK        28-JAN-17       1       1       NO         TAG20170128T194205
18      B  F  A DISK        01-FEB-17       1       1       NO         TAG20170201T110256
19      B  F  A DISK        01-FEB-17       1       1       NO         TAG20170201T110256
20      B  F  A DISK        03-FEB-17       1       1       NO         TAG20170203T201513
21      B  F  A DISK        03-FEB-17       1       1       NO         TAG20170203T201513
RMAN> list db_unique_name all;
List of Databases
DB Key  DB Name  DB ID            Database Role    Db_unique_name
------- ------- ----------------- ---------------  ------------------
1       BAOKA    3484596173       PHYSICAL STANDBY STBAOKA
RMAN> list incarnation;
List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       BAOKA    3484596173       CURRENT 1          18-OCT-16

 

 

父化身(parent),当前化身(current),祖先化身(anc),孤儿化身(orphan)

RMAN> list incarnation;

List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       KYC      111003738        PARENT  1          26-JAN-17
6       6       KYC      111003738        CURRENT 988210     28-APR-17
5       5       KYC      111003738        ORPHAN  989509     28-APR-17
4       4       KYC      111003738        ORPHAN  989509     27-APR-17
2       2       KYC      111003738        ORPHAN  989509     27-APR-17
3       3       KYC      111003738        ORPHAN  989509     27-APR-17

 

RMAN> validate database;Starting validate at 30-APR-17using target database control file instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: SID=21 device type=DISKchannel ORA_DISK_1: starting validation of datafilechannel ORA_DISK_1: specifying datafile(s) for validationinput datafile file number=00001 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_system_d8m6of7w_.dbfinput datafile file number=00002 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_sysaux_d8m6pc11_.dbfinput datafile file number=00003 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_undotbs1_d8m6q4z2_.dbfinput datafile file number=00016 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_archi_dj5thsgt_.dbfinput datafile file number=00005 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_test_tbs_dh36clvr_.dbfinput datafile file number=00008 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_acct_dh42xjyw_.dbfinput datafile file number=00009 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_pay_dh43060y_.dbfinput datafile file number=00010 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_user1_dh432c5p_.dbfinput datafile file number=00011 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_vehicle_dh432w22_.dbfinput datafile file number=00012 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_privs1_dh5tw8pg_.dbfinput datafile file number=00013 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_freight_dh5txxoj_.dbfinput datafile file number=00014 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_message_dh5tzyr9_.dbfinput datafile file number=00015 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_settleme_dh5v1ch1_.dbfinput datafile file number=00006 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_test_und_dh36lb5q_.dbfinput datafile file number=00007 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_test_ind_dh36lzdk_.dbfinput datafile file number=00004 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_users_d8m6sv13_.dbfchannel ORA_DISK_1: validation complete, elapsed time: 00:00:01List of Datafiles=================File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------1    OK     0              35896        89600           1076879  File Name: /u01/app/oracle/oradata/KYC/datafile/o1_mf_system_d8m6of7w_.dbf  Block Type Blocks Failing Blocks Processed  ---------- -------------- ----------------  Data       0              42203  Index      0              8308  Other      0              3193File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------2    OK     0              39973        76800           1076859  File Name: /u01/app/oracle/oradata/KYC/datafile/o1_mf_sysaux_d8m6pc11_.dbf  Block Type Blocks Failing Blocks Processed  ---------- -------------- ----------------  Data       0              14486  Index      0              13320  Other      0              9021File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------3    OK     0              666          43520           1076879  File Name: /u01/app/oracle/oradata/KYC/datafile/o1_mf_undotbs1_d8m6q4z2_.dbf  Block Type Blocks Failing Blocks Processed  ---------- -------------- ----------------  Data       0              0  Index      0              0  Other      0              42854File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------4    OK     0              505          640             482125  File Name: /u01/app/oracle/oradata/KYC/datafile/o1_mf_users_d8m6sv13_.dbf  Block Type Blocks Failing Blocks Processed  ---------- -------------- ----------------  Data       0              5  Index      0              0  Other      0              130File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------5    OK     0              1216         2560            998771  File Name: /u01/app/oracle/oradata/KYC/datafile/o1_mf_test_tbs_dh36clvr_.dbf  Block Type Blocks Failing Blocks Processed  ---------- -------------- ----------------  Data       0              433  Index      0              175  Other      0              736File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------6    OK     0              1143         1280            518623  File Name: /u01/app/oracle/oradata/KYC/datafile/o1_mf_test_und_dh36lb5q_.dbf  Block Type Blocks Failing Blocks Processed  ---------- -------------- ----------------  Data       0              0  Index      0              0  Other      0              137File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------7    OK     0              1153         1280            481790  File Name: /u01/app/oracle/oradata/KYC/datafile/o1_mf_test_ind_dh36lzdk_.dbf  Block Type Blocks Failing Blocks Processed  ---------- -------------- ----------------  Data       0              0  Index      0              0  Other      0              127File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------8    OK     0              2433         2560            498843  File Name: /u01/app/oracle/oradata/KYC/datafile/o1_mf_acct_dh42xjyw_.dbf  Block Type Blocks Failing Blocks Processed  ---------- -------------- ----------------  Data       0              0  Index      0              0  Other      0              127File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------9    OK     0              2433         2560            499148  File Name: /u01/app/oracle/oradata/KYC/datafile/o1_mf_pay_dh43060y_.dbf  Block Type Blocks Failing Blocks Processed  ---------- -------------- ----------------  Data       0              0  Index      0              0  Other      0              127File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------10   OK     0              2433         2560            499442  File Name: /u01/app/oracle/oradata/KYC/datafile/o1_mf_user1_dh432c5p_.dbf  Block Type Blocks Failing Blocks Processed  ---------- -------------- ----------------  Data       0              0  Index      0              0  Other      0              127File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------11   OK     0              2433         2560            499715  File Name: /u01/app/oracle/oradata/KYC/datafile/o1_mf_vehicle_dh432w22_.dbf  Block Type Blocks Failing Blocks Processed  ---------- -------------- ----------------  Data       0              0  Index      0              0  Other      0              127File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------12   OK     0              2433         2560            530905  File Name: /u01/app/oracle/oradata/KYC/datafile/o1_mf_privs1_dh5tw8pg_.dbf  Block Type Blocks Failing Blocks Processed  ---------- -------------- ----------------  Data       0              0  Index      0              0  Other      0              127File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------13   OK     0              2433         2560            531202  File Name: /u01/app/oracle/oradata/KYC/datafile/o1_mf_freight_dh5txxoj_.dbf  Block Type Blocks Failing Blocks Processed  ---------- -------------- ----------------  Data       0              0  Index      0              0  Other      0              127File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------14   OK     0              2433         2560            531504  File Name: /u01/app/oracle/oradata/KYC/datafile/o1_mf_message_dh5tzyr9_.dbf  Block Type Blocks Failing Blocks Processed  ---------- -------------- ----------------  Data       0              0  Index      0              0  Other      0              127File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------15   OK     0              2433         2560            531799  File Name: /u01/app/oracle/oradata/KYC/datafile/o1_mf_settleme_dh5v1ch1_.dbf  Block Type Blocks Failing Blocks Processed  ---------- -------------- ----------------  Data       0              0  Index      0              0  Other      0              127File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------16   OK     0              12673        12800           990727  File Name: /u01/app/oracle/oradata/KYC/datafile/o1_mf_archi_dj5thsgt_.dbf  Block Type Blocks Failing Blocks Processed  ---------- -------------- ----------------  Data       0              0  Index      0              0  Other      0              127channel ORA_DISK_1: starting validation of datafilechannel ORA_DISK_1: specifying datafile(s) for validationincluding current control file for validationincluding current SPFILE in backup setchannel ORA_DISK_1: validation complete, elapsed time: 00:00:01List of Control File and SPFILE===============================File Type    Status Blocks Failing Blocks Examined------------ ------ -------------- ---------------SPFILE       OK     0              2Control File OK     0              594Finished validate at 30-APR-17RMAN> report schema;Report of database schema for database with db_unique_name KYCList of Permanent Datafiles===========================File Size(MB) Tablespace           RB segs Datafile Name---- -------- -------------------- ------- ------------------------1    700      SYSTEM               ***     /u01/app/oracle/oradata/KYC/datafile/o1_mf_system_d8m6of7w_.dbf2    600      SYSAUX               ***     /u01/app/oracle/oradata/KYC/datafile/o1_mf_sysaux_d8m6pc11_.dbf3    340      UNDOTBS1             ***     /u01/app/oracle/oradata/KYC/datafile/o1_mf_undotbs1_d8m6q4z2_.dbf4    5        USERS                ***     /u01/app/oracle/oradata/KYC/datafile/o1_mf_users_d8m6sv13_.dbf5    20       TEST_TBS1            ***     /u01/app/oracle/oradata/KYC/datafile/o1_mf_test_tbs_dh36clvr_.dbf6    10       TEST_UNDO1           ***     /u01/app/oracle/oradata/KYC/datafile/o1_mf_test_und_dh36lb5q_.dbf7    10       TEST_INDEX1          ***     /u01/app/oracle/oradata/KYC/datafile/o1_mf_test_ind_dh36lzdk_.dbf8    20       ACCT                 ***     /u01/app/oracle/oradata/KYC/datafile/o1_mf_acct_dh42xjyw_.dbf9    20       PAY                  ***     /u01/app/oracle/oradata/KYC/datafile/o1_mf_pay_dh43060y_.dbf10   20       USER1                ***     /u01/app/oracle/oradata/KYC/datafile/o1_mf_user1_dh432c5p_.dbf11   20       VEHICLE              ***     /u01/app/oracle/oradata/KYC/datafile/o1_mf_vehicle_dh432w22_.dbf12   20       PRIVS1               ***     /u01/app/oracle/oradata/KYC/datafile/o1_mf_privs1_dh5tw8pg_.dbf13   20       FREIGHT              ***     /u01/app/oracle/oradata/KYC/datafile/o1_mf_freight_dh5txxoj_.dbf14   20       MESSAGE              ***     /u01/app/oracle/oradata/KYC/datafile/o1_mf_message_dh5tzyr9_.dbf15   20       SETTLEMENT           ***     /u01/app/oracle/oradata/KYC/datafile/o1_mf_settleme_dh5v1ch1_.dbf16   100      ARCHI                ***     /u01/app/oracle/oradata/KYC/datafile/o1_mf_archi_dj5thsgt_.dbf17   10       TEST_TBS1            ***     /u01/app/oracle/oradata/KYC/datafile/o1_mf_test_tbs_djbo7s7m_.dbfList of Temporary Files=======================File Size(MB) Tablespace           Maxsize(MB) Tempfile Name---- -------- -------------------- ----------- --------------------1    20       TEMP                 32767       /u01/app/oracle/oradata/KYC/datafile/o1_mf_temp_d8m6qwlr_.tmp2    10       TEST_TEMP1           32767       /u01/app/oracle/oradata/KYC/datafile/o1_mf_test_tem_dh36km36_.tmp

 

转载地址:http://oxweo.baihongyu.com/

你可能感兴趣的文章
刘剑锋:友云采助力企业数字化采购的新发展
查看>>
Rainbond 5.0.4 发布,做最好用的云应用操作系统
查看>>
亚马逊宣布与西云数据达成合作,旨在进一步扩大中国业务
查看>>
java nio的基础--缓冲区
查看>>
负载均衡沙龙活动第二期现场问答汇集
查看>>
GBDT原理及利用GBDT构造新的特征-Python实现
查看>>
Android帧缓冲区(Frame Buffer)硬件抽象层(HAL)模块Gralloc的实现原理分析(10)...
查看>>
【Xamarin.Forms】在XAML中传递参数
查看>>
关于数据仓库 — 总体工具介绍
查看>>
最大的错误是不敢犯错
查看>>
跟我学交换机配置(七)
查看>>
makefile 中 $@ $^ % 2015-04-11 18:02:36
查看>>
C#强化系列文章三:实验分析C#中三种计时器使用异同点
查看>>
Linux 进程间通信(一)
查看>>
通用对象池ObjectPool的一种简易设计和实现方案
查看>>
HTTP压缩仍让加密连接处于风险之中
查看>>
乐视阿里达成百亿元销售框架
查看>>
戴尔通过提升大数据分析能力巩固“全数据”战略 帮助企业在现代数据经济中蓬勃发展...
查看>>
⑤Windows Server 8 RemoteFX体验
查看>>
《企业云桌面实施》-小技巧-03-vSAN6.5中SAS和SSD的使用建议
查看>>