资源预览内容
第1页 / 共11页
第2页 / 共11页
第3页 / 共11页
第4页 / 共11页
第5页 / 共11页
第6页 / 共11页
第7页 / 共11页
第8页 / 共11页
第9页 / 共11页
第10页 / 共11页
亲,该文档总共11页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
1、 备份前的准备启动数据库到 mount修改 archive 模式( alter database archivelog; )启动到 open打开 raman连接数据库(connect target /)然后进行备份2、全备份(backup database)0 级分量备份(backup incremental level 0 database)3、Archivelog 的备份(backup database plus archivelog delete input;)表空间的备份(backup tablespace 表空间)控制文件的备份(backup current controlfile/backup database include current controlfile)4、批命令备份(callocate channel cha1 type disk;backupformat “路径”tag 标签名称database;release channel cha1;)5、自动备份run allocate channel c1 type disk;backupincremental level 1format /u01/rmanbak/inc0_%u_%Ttag monday_inc1database;release channel c1rootdb-oracle # crontab -e -u Oracle45 23 * * 0 rman target/ msglog=bakl0.log cmdfile=bakl045 23 * * 1 rman target/ msglog=bakl2.log cmdfile=bakl245 23 * * 2 rman target/ msglog=bakl2.log cmdfile=bakl245 23 * * 3 rman target/ msglog=bakl1.log cmdfile=bakl145 23 * * 4 rman target/ msglog=bakl2.log cmdfile=bakl245 23 * * 5 rman target/ msglog=bakl2.log cmdfile=bakl245 23 * * 6 rman target/ msglog=bakl2.log cmdfile=bakl2再启动 service crond restart 就可以了6、备份控制文件Dbid= 1273224634示例:startup failed: ORA-01078: failure in processing system parametersLRM-00109: could not open parameter file /u01/app/Oracle/product/10.2.0/db_1/dbs/initorcl.orastarting Oracle instance without parameter file for retrival of spfileOracle instance startedTotal System Global Area 159383552 bytesFixed Size 1218268 bytesVariable Size 54528292 bytesDatabase Buffers 100663296 bytesRedo Buffers 2973696 bytesRMAN set dbid 1273224634executing command: SET DBIDRMAN restore spfile from /u01/app/Oracle/flash_recovery_area/ORCL/autoback RMAN-00571: =RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =RMAN-00571: =RMAN-00558: error encountered while parsing input commandsRMAN-01006: error signalled during parseRMAN-02001: unrecognized punctuation symbol /RMAN restore spfile from /u01/app/Oracle/flash_recovery_area/ORCL/autobackup/2011_03_12/o1_mf_s_745580370_6qompo30_.bkp;Starting restore at 12-MAR-11using target database control file instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: sid=36 devtype=DISKchannel ORA_DISK_1: autobackup found: /u01/app/Oracle/flash_recovery_area/ORCL/autobackup/2011_03_12/o1_mf_s_745580370_6qompo30_.bkpchannel ORA_DISK_1: SPFILE restore from autobackup completeFinished restore at 12-MAR-11RMAN shutdown immediateOracle instance shut downRMAN startup;connected to target database (not started)Oracle instance starteddatabase mounteddatabase openedTotal System Global Area 247463936 bytesFixed Size 1218772 bytesVariable Size 79693612 bytesDatabase Buffers 163577856 bytesRedo Buffers 2973696 bytes7、Controlfile 文件丢失示例RMAN connect target /connected to target database (not started)RMAN startup nomount;Oracle instance startedTotal System Global Area 247463936 bytesFixed Size 1218772 bytesVariable Size 79693612 bytesDatabase Buffers 163577856 bytesRedo Buffers 2973696 bytesRMAN restore controlfile from autobackup;Starting restore at 12-MAR-11using target database control file instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: sid=156 devtype=DISKrecovery area destination: /u01/app/Oracle/flash_recovery_areadatabase name (or database unique name) used for search: ORCLchannel ORA_DISK_1: autobackup found in the recovery areachannel ORA_DISK_1: autobackup found: /u01/app/Oracle/flash_recovery_area/ORCL/autobackup/2011_03_12/o1_mf_s_745590355_6qoxgo3y_.bkpchannel ORA_DISK_1: control file restore from autobackup completeoutput filename=/u01/app/Oracle/oradata/orcl/control01.ctloutput filename=/u01/app/Oracle/oradata/orcl/control02.ctloutput filename=/u01/app/Oracle/oradata/orcl/control03.ctlFinished restore at 12-MAR-11RMAN alter database mount;database mountedreleased channel: ORA_DISK_1RMAN recover database;Starting recover at 12-MAR-11Starting implicit crosscheck backup at 12-MAR-11allocated channel: ORA_DISK_1channel ORA_DISK_1: sid=156 devtype=DISKCrosschecked 4 objectsFinished implicit crosscheck backup at 12-MAR-11Starting implicit crosscheck copy at 12-MAR-11using channel ORA_DISK_1Finished implicit crosscheck copy at 12-MAR-11searching for all files in the recovery areacataloging files.cataloging doneList of Cataloged Files=File Name: /u01/app/Oracle/flash_recovery_area/ORCL/autobackup/2011_03_12/o1_mf_s_745590355_6qoxgo3y_.bkpusing channel ORA_DISK_1starting media recoveryarchive log thread 1 sequence 1 is already on disk as file /u01/app/Oracle/oradata/orcl/redo01.logarchive log filename=/u01/app/Oracle/oradata/orcl/redo01.log thread=1 sequence=1media rec
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号