Chinaunix首页 | 论坛 | 博客
  • 博客访问: 244926
  • 博文数量: 64
  • 博客积分: 1416
  • 博客等级: 上尉
  • 技术积分: 565
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-18 10:54
文章分类

全部博文(64)

文章存档

2011年(4)

2010年(60)

我的朋友

分类: Oracle

2010-03-23 20:52:35

restore是还原,物理文件恢复,是将备份还原备份时的状态,相当于copy 备份的数据文件,把档案解压缩出来,将备份的文件拷贝到原来的位置,数据极可能是不一致的
recover是恢复,使满足一致性要求,是将恢复的文件做日志应用,保持scn一致,使数据文件恢复到需要的状态,处理数据的正确性,是在resotre的基础上应用日志,将数据库处理成某个时刻的一致状态。



积累型(COMULATIVE   ERPORT):备份上一次积累型备份所改变的数据;  
增量型(INCREAMENTAL   EXPORT):备份上一次备份后改变的数据。


orecovery 和standby有什么区别

举个例子,比如1 是全备份,2是差异备份,3,4,5是日志备份,如果现在要恢复到5的时间,首先要恢复1,然后2,然后3,4,5从1--4期间都要指定为 norecovery,为什么呢?可以设想一下如果是recovery的话,此时数据库已经可以应用,比如如果在2--3之前用了recovery,则进 行2以后数据库就可以应用,此时如果有人进行数据库操作,那么3就不能恢复了。再有在2--3之间中间段的事物将会回滚,此时如果再一次恢复后面序列备份 就会出错。
ORECOVERY

Instructs the restore operation to not roll back any uncommitted transactions. Either the NORECOVERY or STANDBY option must be specified if another transaction log has to be applied. If neither NORECOVERY, RECOVERY, or STANDBY is specified, RECOVERY is the default.

SQL Server requires that the WITH NORECOVERY option be used on all but the final RESTORE statement when restoring a database backup and multiple transaction logs, or when multiple RESTORE statements are needed (for example, a full database backup followed by a differential database backup).



Note  When specifying the NORECOVERY option, the database is not usable in this intermediate, nonrecovered state.


When used with a file or filegroup restore operation, NORECOVERY forces the database to remain in the restoring state after the restore operation. This is useful in either of these situations:

A restore script is being run and the log is always being applied.


A sequence of file restores is used and the database is not intended to be usable between two of the restore operations.
RECOVERY

Instructs the restore operation to roll back any uncommitted transactions. After the recovery process, the database is ready for use.

If subsequent RESTORE operations (RESTORE LOG, or RESTORE DATABASE from differential) are planned, NORECOVERY or STANDBY should be specified instead.

If neither NORECOVERY, RECOVERY, or STANDBY is specified, RECOVERY is the default. When restoring backup sets from an earlier version of SQL Server, a database upgrade may be required. This upgrade is performed automatically when WITH RECOVERY is specified. For more information, see Transaction Log Backups .


阅读(836) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~