备份脚本:
#!/bin/sh
source /home/oracle/.bash_profilecd $ORACLE_HOME/bin./rman target / catalog rman/rman@244 msglog=/home/oracle/work/log/rman_bk_L0_`date '+%Y%m%d%H%M%S'`.log <<EOFrun {
allocate channel c1 type disk;
backup incremental level 0 filesperset 5 tag 'dbL0' format '/mnt/raid/rman_bk/ora_o_%d_%t%s%p%u' database skip readonly include current controlfile;
sql 'alter system archive log current' ;
backup(archivelog all format '/mnt/raid/rman_bk/ora_a_%d_%t%s%p%u');
release channel c1;
}list backup;
exit;EOF
数据文件 控制文件 Spfile 文件都成功备份完毕,可是以前的归档日志都被我删了,新的归档日志还保留着,以后恢复是否还能完全恢复,还是只能恢复到当前时间点?
备份日志如下:
Starting Control File and SPFILE Autobackup at 2006-11-22 20:36:32
piece handle=/oracle/product/9.2.0.4/dbs/c-810128133-20061122-00 comment=NONE
Finished Control File and SPFILE Autobackup at 2006-11-22 20:36:37sql statement: alter system archive log currentStarting backup at 2006-11-22 20:36:51
current log archived
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 11/22/2006 20:36:56
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file /mnt/raid/oradata/arch/lrdb/1_5084.dbf
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3RMAN>
#!/bin/sh
source /home/oracle/.bash_profilecd $ORACLE_HOME/bin./rman target / catalog rman/rman@244 msglog=/home/oracle/work/log/rman_bk_L0_`date '+%Y%m%d%H%M%S'`.log <<EOFrun {
allocate channel c1 type disk;
backup incremental level 0 filesperset 5 tag 'dbL0' format '/mnt/raid/rman_bk/ora_o_%d_%t%s%p%u' database skip readonly include current controlfile;
sql 'alter system archive log current' ;
backup(archivelog all format '/mnt/raid/rman_bk/ora_a_%d_%t%s%p%u');
release channel c1;
}list backup;
exit;EOF
数据文件 控制文件 Spfile 文件都成功备份完毕,可是以前的归档日志都被我删了,新的归档日志还保留着,以后恢复是否还能完全恢复,还是只能恢复到当前时间点?
备份日志如下:
Starting Control File and SPFILE Autobackup at 2006-11-22 20:36:32
piece handle=/oracle/product/9.2.0.4/dbs/c-810128133-20061122-00 comment=NONE
Finished Control File and SPFILE Autobackup at 2006-11-22 20:36:37sql statement: alter system archive log currentStarting backup at 2006-11-22 20:36:51
current log archived
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 11/22/2006 20:36:56
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file /mnt/raid/oradata/arch/lrdb/1_5084.dbf
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3RMAN>
解决方案 »
- oracle 系统存储过程
- 急!!!大虾救命 执行SQLLOAD 存在跳过的逻辑记录
- 关于inputtime between ... and ... 取上个月的一周的数据问题(急)
- 在线等:如何在创建游标的select语句中使用变量
- 关于Oracle中Commit的用法
- 在oracle 9I中无法备份(导出),请问问题可能出现在什么地方
- 存储过程的问题(在线等待)
- 请问在ROSE2002中的哪个工具可以用来做数据库建模
- 有谁用过sql plus copy 命令?来者有分!!在线等候!!
- oracle 1053 服务没有及时响应启动或控制请求
- 求救:oracle自动调用一个函数或者过程怎么设置?
- 高分求救:oracle 10.1.0.2.0在把外键禁用后,再启用外键时,提示未连接到oracle错误,如何处理?
但从上面来看,你在1_5084.dbf之前做了全备份,而且以后的归档日志已经丢了,所以只能恢复到1_5084.dbf那个时间之前。
用resetlog重起数据库,并进行全库备份,这样以后的操作就没问题了。但之前的备份都没用了
#!/bin/sh
source /home/oracle/.bash_profilecd $ORACLE_HOME/bin./rman target / catalog rman/rman@244 msglog=/home/oracle/work/log/rman_bk_L0_`date '+%Y%m%d%H%M%S'`.log <<EOFrun {
sql 'alter system archive log current' ;
allocate channel c1 type disk;
backup database filesperset 5 tag 'dbFull' format '/mnt/raid/rman_bk/ora_o_%d_%t%s%p%u'
plus archivelog format '/mnt/raid/rman_bk/ora_a_%d_%t%s%p%u'
delete all input ;
release channel c1;
}list backup;
exit;EOF
run {
allocate channel c1 type disk;
backup full tag 'dbfull' filesperset 5 format '/mnt/raid/rman_bk/ora_o_%d_%t%s%p%u' database ;
sql 'alter system archive log current' ;
backup filesperset 3 archivelog all delete input;
release channel c1;
}
参考 http://www.csdb.cn/viewPaper.jsp?tipid=1148522318476