|
原帖由 shooterchan 于 2008-3-29 15:34 发表 ![]()
1、数据库是根据scn来选择需要应用的archivelog,先恢复再应用。数据库读取archivelog中的改变向量的file_id,来确定什么记录需要恢复到特定文件中。
2、我的理解是可以不需要恢复整个备份集,但是需要遍历备份集去筛选所需的archivelog。试试这个
recover database delete archivelog maxsize>archivelog size
recoverOptionList
Specifies various recovery options.
DELETE ARCHIVELOG [MAXSIZE integer [K|M|G]]
Deletes archived logs restored from backups or copies that are no longer needed. RMAN does not delete archived logs that were already on disk before the RESTORE command started.
If you do not specify MAXSIZE, then RMAN deletes restored archived logs as they are applied. If you specify MAXSIZE, then RMAN will not use more than integer amount of disk space for restored archived logs. If recovery requires the restore of a log larger than the MAXSIZE value, then RMAN reports an error indicating that you should increase the MAXSIZE value. If MAXSIZE is smaller than the backup set containing the logs, then RMAN must read the backup set more than once. Hence, RMAN issues a warning that MAXSIZE should be increased.
正是我想要的。
原帖由 ZALBB 于 2008-4-10 14:33 发表 ![]()
奇怪,楼主为什么认为:需要从备份集中恢复出归档日志给RMAN使用? RMAN 自己根据备份信息去找需要的备份日志!
因为我的归档空间不足以一次把需要的archivelog全部restore后再apply~
我需要的是让rman先restore一部分archivelog,应用后删除,然后继续restore剩下的archivelog再应用...
看样子DELETE ARCHIVELOG [MAXSIZE integer [K|M|G]]提供了这个功能.
看了网上对这个的参数的说法,发现有些问题,所以
自己翻译一下:
用来删除已经不需要的从备份集或备份镜像中restore的archivelog.RMAN不会删除在restore之前已经存在于磁盘上的archivelog。
如果你指定MAXSIZE,RMAN将删除restore后已经应用的archivelog.如果指定的MAXSIZE,RMAN将用小于MAXSIZE的磁盘空间来restore archivelog.如果recover需要的restore的某个archivelog的大小超过MAXSIZE,RMAN将返回一个错误,提醒你应该增大MAXSIZE的大小.如果MAXSIZE小于archivelog的备份集的大小,RMAN必须重复读取多次同一个archivelog的备份集.RMAN将发出一个警告:应该增大MAXSIZE.
也就是说我某次恢复需要应用备份集中的300G的archivelog,但是归档目录只剩下100G可用空间。
可以用下面的语法来让rman实现自动删除已经应用的archivelog并保持每次只restore100G
recover database delete archivelog maxsize 100G;
每个archivelog的大小应该小于100G(否则抱错)
每个archivelog的备份集应该小于100G否则会很慢(多次读取一个备份集),并会报出警告.
不知道我理解的对不对~
 |
|