RAC+ADG 异机恢复,控制文件自动恢复
发表于:2026-11-03 作者:千家信息网编辑
千家信息网最后更新 2026年11月03日,1、首先要设置控制文件自动备份2、自动化恢复脚本,使用如下命令restore controlfile from autobackup;此命令会找到最新的控制文件进行恢复,以下做一个测试来验证。多次备份
千家信息网最后更新 2026年11月03日RAC+ADG 异机恢复,控制文件自动恢复
1、首先要设置控制文件自动备份
2、自动化恢复脚本,使用如下命令
restore controlfile from autobackup;此命令会找到最新的控制文件进行恢复,以下做一个测试来验证。
多次备份数据文件,生成多个控制文件备份。然后进行恢复操作,发现找到最近备份的控制文件进行恢复,我们也可以按照时间进行控制文件的删除。操作过程如下:
RMAN> show all;RMAN configuration parameters for database with db_unique_name ORCL are:CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # defaultCONFIGURE BACKUP OPTIMIZATION ON;CONFIGURE DEFAULT DEVICE TYPE TO DISK; # defaultCONFIGURE CONTROLFILE AUTOBACKUP ON;CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # defaultCONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # defaultCONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # defaultCONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # defaultCONFIGURE MAXSETSIZE TO UNLIMITED; # defaultCONFIGURE ENCRYPTION FOR DATABASE OFF; # defaultCONFIGURE ENCRYPTION ALGORITHM 'AES128'; # defaultCONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # defaultCONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # defaultCONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_orcl1.f'; # defaultRMAN> delete backup of controlfile completed before 'sysdate-1/10';using channel ORA_DISK_1List of Backup PiecesBP Key BS Key Pc# Cp# Status Device Type Piece Name------- ------- --- --- ----------- ----------- ----------2 2 1 1 AVAILABLE DISK /u01/app/oracle/product/11.2.0/dbhome_1/dbs/c-1515642676-20180927-004 4 1 1 AVAILABLE DISK /u01/app/oracle/product/11.2.0/dbhome_1/dbs/c-1515642676-20180927-01Do you really want to delete the above objects (enter YES or NO)? noRMAN> RMAN> list backup of controlfile;List of Backup Sets===================BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------------2 Full 17.70M DISK 00:00:02 27-SEP-2018 11:08:08 BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20180927×××10806 Piece Name: /u01/app/oracle/product/11.2.0/dbhome_1/dbs/c-1515642676-20180927-00 Control File Included: Ckp SCN: 794221 Ckp time: 27-SEP-2018 11:08:06BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------------4 Full 17.70M DISK 00:00:05 27-SEP-2018 11:09:18 BP Key: 4 Status: AVAILABLE Compressed: NO Tag: TAG20180927×××10913 Piece Name: /u01/app/oracle/product/11.2.0/dbhome_1/dbs/c-1515642676-20180927-01 Control File Included: Ckp SCN: 794259 Ckp time: 27-SEP-2018 11:09:13BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------------6 Full 17.70M DISK 00:00:01 27-SEP-2018 14:13:46 BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20180927×××41345 Piece Name: /u01/app/oracle/product/11.2.0/dbhome_1/dbs/c-1515642676-20180927-02 Control File Included: Ckp SCN: 801298 Ckp time: 27-SEP-2018 14:13:45BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------------8 Full 17.70M DISK 00:00:01 27-SEP-2018 14:15:02 BP Key: 8 Status: AVAILABLE Compressed: NO Tag: TAG20180927×××41501 Piece Name: /u01/app/oracle/product/11.2.0/dbhome_1/dbs/c-1515642676-20180927-03 Control File Included: Ckp SCN: 801359 Ckp time: 27-SEP-2018 14:15:01BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------------10 Full 17.70M DISK 00:00:01 27-SEP-2018 14:16:06 BP Key: 10 Status: AVAILABLE Compressed: NO Tag: TAG20180927×××41605 Piece Name: /u01/app/oracle/product/11.2.0/dbhome_1/dbs/c-1515642676-20180927-04 Control File Included: Ckp SCN: 801655 Ckp time: 27-SEP-2018 14:16:05BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------------12 Full 17.70M DISK 00:00:01 27-SEP-2018 14:16:27 BP Key: 12 Status: AVAILABLE Compressed: NO Tag: TAG20180927×××41626 Piece Name: /u01/app/oracle/product/11.2.0/dbhome_1/dbs/c-1515642676-20180927-05 Control File Included: Ckp SCN: 801678 Ckp time: 27-SEP-2018 14:16:26RMAN> restore controlfile to '/tmp/control01.clt' from autobackup;Starting restore at 27-SEP-2018 14:28:50using channel ORA_DISK_1channel ORA_DISK_1: looking for AUTOBACKUP on day: 20180927channel ORA_DISK_1: AUTOBACKUP found: c-1515642676-20180927-05channel ORA_DISK_1: restoring control file from AUTOBACKUP c-1515642676-20180927-05channel ORA_DISK_1: control file restore from AUTOBACKUP completeFinished restore at 27-SEP-2018 14:28:53RMAN>
文件
控制
备份
命令
多个
数据
时间
脚本
过程
测试
生成
自动化
验证
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
手磨咖啡
科技股互联网
互联网 科技
互联网 科技公司
北京互联网科技有限公司
美国互联网科技
互联网科技ppt模板
重庆科技学院互联网
创业天下互联网科技有限公司
互联网金融中的现代科技
昊天互联网科技有限公司
本届互联网博览会上的黑科技
互联网科技创新的路径
爱医互联网络科技
科技大学互联网
产业互联网科技服务公司
互联网科技包装股
保山互联网科技靠谱吗
广州三三互联网科技有限公司
北京品多多互联网科技有限公司
鸠鸠互联网科技
齐家互联网科技
时间互联网络科技
知域互联网科技有限公司大骗子
众安科技工业互联网合作
广州有谷有贝互联网科技有限公司
信承诺互联网科技有限公司
亚光科技低轨卫星互联网
重庆科技产业互联网有哪些
如何强化互联网金融科技