归档日志的备份

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-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=21 device type=DISK
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
input datafile file number=00001 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_system_d8m6of7w_.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_sysaux_d8m6pc11_.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_undotbs1_d8m6q4z2_.dbf
input datafile file number=00016 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_archi_dj5thsgt_.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_test_tbs_dh36clvr_.dbf
input datafile file number=00008 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_acct_dh42xjyw_.dbf
input datafile file number=00009 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_pay_dh43060y_.dbf
input datafile file number=00010 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_user1_dh432c5p_.dbf
input datafile file number=00011 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_vehicle_dh432w22_.dbf
input datafile file number=00012 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_privs1_dh5tw8pg_.dbf
input datafile file number=00013 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_freight_dh5txxoj_.dbf
input datafile file number=00014 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_message_dh5tzyr9_.dbf
input datafile file number=00015 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_settleme_dh5v1ch1_.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_test_und_dh36lb5q_.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_test_ind_dh36lzdk_.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/KYC/datafile/o1_mf_users_d8m6sv13_.dbf
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
List 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 3193 File 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 9021 File 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 42854 File 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 130 File 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 736 File 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 137 File 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 127 File 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 127 File 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 127 File 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 127 File 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 127 File 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 127 File 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 127 File 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 127 File 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 127 File 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 127 channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
including current control file for validation
including current SPFILE in backup set
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
List of Control File and SPFILE
===============================
File Type Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
SPFILE OK 0 2
Control File OK 0 594
Finished validate at 30-APR-17 RMAN> report schema; Report of database schema for database with db_unique_name KYC List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 700 SYSTEM *** /u01/app/oracle/oradata/KYC/datafile/o1_mf_system_d8m6of7w_.dbf
2 600 SYSAUX *** /u01/app/oracle/oradata/KYC/datafile/o1_mf_sysaux_d8m6pc11_.dbf
3 340 UNDOTBS1 *** /u01/app/oracle/oradata/KYC/datafile/o1_mf_undotbs1_d8m6q4z2_.dbf
4 5 USERS *** /u01/app/oracle/oradata/KYC/datafile/o1_mf_users_d8m6sv13_.dbf
5 20 TEST_TBS1 *** /u01/app/oracle/oradata/KYC/datafile/o1_mf_test_tbs_dh36clvr_.dbf
6 10 TEST_UNDO1 *** /u01/app/oracle/oradata/KYC/datafile/o1_mf_test_und_dh36lb5q_.dbf
7 10 TEST_INDEX1 *** /u01/app/oracle/oradata/KYC/datafile/o1_mf_test_ind_dh36lzdk_.dbf
8 20 ACCT *** /u01/app/oracle/oradata/KYC/datafile/o1_mf_acct_dh42xjyw_.dbf
9 20 PAY *** /u01/app/oracle/oradata/KYC/datafile/o1_mf_pay_dh43060y_.dbf
10 20 USER1 *** /u01/app/oracle/oradata/KYC/datafile/o1_mf_user1_dh432c5p_.dbf
11 20 VEHICLE *** /u01/app/oracle/oradata/KYC/datafile/o1_mf_vehicle_dh432w22_.dbf
12 20 PRIVS1 *** /u01/app/oracle/oradata/KYC/datafile/o1_mf_privs1_dh5tw8pg_.dbf
13 20 FREIGHT *** /u01/app/oracle/oradata/KYC/datafile/o1_mf_freight_dh5txxoj_.dbf
14 20 MESSAGE *** /u01/app/oracle/oradata/KYC/datafile/o1_mf_message_dh5tzyr9_.dbf
15 20 SETTLEMENT *** /u01/app/oracle/oradata/KYC/datafile/o1_mf_settleme_dh5v1ch1_.dbf
16 100 ARCHI *** /u01/app/oracle/oradata/KYC/datafile/o1_mf_archi_dj5thsgt_.dbf
17 10 TEST_TBS1 *** /u01/app/oracle/oradata/KYC/datafile/o1_mf_test_tbs_djbo7s7m_.dbf List 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_.tmp
2 10 TEST_TEMP1 32767 /u01/app/oracle/oradata/KYC/datafile/o1_mf_test_tem_dh36km36_.tmp

oracle-rman-2的更多相关文章

  1. Oracle RMAN 备份一例

    Oracle RMAN备份一例: Solaris 10 + Oracle 11.2.0.3 Shell:csh,安装有bash,脚本调用bash 备份策略:周日0级备份,周一~周六1级备份,每6小时备 ...

  2. Oracle—RMAN备份(三)

    一.增量备份的相关概念 1. 在前面说明了RMAN的完整备份,完整备份是备份所用使用过的块,不备份没有使用的过的块:增量备份只备份自上次备份以来更改过的块. 2.即使RMAN的默认操作是在增量备份时扫 ...

  3. Oracle—RMAN备份(一)

    一.RMAN备份相关概念 1.RMAN备份中表空间不需要处于backup模式下,它备份数据文件,归档日志文件,控制文件,spfile和备份集片,但不备份联机重做日志文件,临时文件和口令文件. 2.备份 ...

  4. Oracle—RMAN备份(二)

    在Oracle  RMAN备份(一)中,对各种文件在RMAN中备份进行了说明, 一.备份集的复制 在RMAN 备份中,可以备份其自己的备份,即备份一个文件放在多个目录下,oralce支持最多备份四个. ...

  5. oracle rman异机恢复

      Oracle源主机 Oracle目标主机 主机平台 CentOS6.2(final) CentOs6.2(FInal) 主机名 vick rman IP地址 192.168.1.11 192.16 ...

  6. ORACLE RMAN介绍

    本地连接: $ rman target /  or $ rman target / nocatalog 远程连接: $ rman target sys/sys@sky RMAN命令执行方式: 1.单条 ...

  7. [Oracle][RMAN] Use RMAN to Migrate database from CentOS_5-11201-SingleDB to OracleLinux_5-11204-SingleDB

    リンク:How to Move/Restore DB to New Host and File System using RMAN (Doc ID 1338193.1)https://docs.ora ...

  8. [Oracle][RMAN]关于Oracle RMAN里面的Merged Incremental Backups的Tag分离机能

    关于Oracle RMAN里面的Merged Incremental Backups的机能,RMAN使用的比较多的DBA们可能会有所了解. 基本上,每次都实行同样的Backup命令即可完成BACK. ...

  9. ORACLE RMAN备份及还原(转)

    RMAN可以进行增量备份:数据库,表空间,数据文件 只有使用过的block可以被备份成backup set 表空间与数据文件对应关系:dba_data_files / v$datafile_heade ...

  10. Oracle RMAN 学习:恢复

    Oracle RMAN 学习:恢复 6 rman恢复 Rman中的恢复对应restore,recover Restore,数据修复,利用备份集的数据文件来替换已损坏的数据文件或将其恢复到另外一个位置, ...

随机推荐

  1. Oracle特殊字符转义:&和'

    Oracle特殊字符转义:&和'    我们在SQL*PLUS下执行 SQL show all命令时,可以发现一个参数:define & (hex 26),如下所示 concat . ...

  2. <Spark><Advanced Programming>

    Introduction 介绍两种共享变量的方式: accumulators:聚集信息 broadcast variables:高效地分布large values 介绍对高setup costs任务的 ...

  3. 2019.3.22 Week 11 : ZigBee power test and field test

    Test require Zigbee sample:EFR32MG13  (RF layout has ) Gateway N4010A : 2.5Ghz 1Power test 2Field te ...

  4. python-django的生命周期

    wsgi,请求封装后交给web框架(flask,django) 中间件,对请求进行校验或在请求对象中添加其他相关数据,列如(scrf[跨域],request,session) 路由匹配,根据浏览器发送 ...

  5. vuejs 1.x与2.x差异

    1.x与2.x区别 v-for列表查询中 当前下标:$index --> index 1.x 用法 v-for="v in myData" =>$index获取下标 / ...

  6. HDU 6055 17多校 Regular polygon(计算几何)

    Problem Description On a two-dimensional plane, give you n integer points. Your task is to figure ou ...

  7. 【MySQL】5.6.x InnoDB Error Table mysql.innodb_table_stats not found

    [问题描述]: 检查error log的时候发现大量warnings: [Warning] InnoDB Error Table mysql.innodb_index_stats not found ...

  8. 百练6183-人民币支付-2014正式A题

    A:人民币支付 总时间限制:  1000ms 内存限制:  65536kB 描述 从键盘输入一指定金额(以元为单位,如345),然后输出支付该金额的各种面额的人民币数量,显示100元,50元,20元, ...

  9. [LeetCode&Python] Problem 283. Move Zeroes

    Given an array nums, write a function to move all 0's to the end of it while maintaining the relativ ...

  10. Tree Recovery

    #include<stdio.h> #include<string.h> void build(int n,char*s1,char*s2) { )return ; ])-s2 ...