数据库

 首页 > 数据库 > Oracle > 探索ORACLE之RMAN_02一致性备份

探索ORACLE之RMAN_02一致性备份

分享到:
【字体:
导读:
         摘要:相关链接:探索ORACLE之RMAN_01概念http://www.2cto.com/database/201205/132243.html;探索ORACLE之RMAN_02基本使用http://www.2cto.com/database/201205/132329.html在之前的已经提到过备份分为一致性备份和非.....

探索ORACLE之RMAN_02一致性备份
 
相关链接:
探索ORACLE之RMAN_01概念
http://www.2cto.com/database/201205/132243.html;
探索ORACLE之RMAN_02基本使用
http://www.2cto.com/database/201205/132329.html
 
在之前的已经提到过备份分为一致性备份和非一致性备份,它们的区别就在于数据库所处的备份状态不同,并且一致性备份不能做增量备份恢复,需停业务,一致性备份可以做到增量的备份恢复,从而不影响业务的正常流转。  www.2cto.com  
 
创建一致性备份
 创建一致性备份可以是在非归档模式下创建,并且数据库必须处于mount状态下,而且恢复的时候值能恢复到最后一次备份的状态。也就说从备份到发生故障的这段时间都将丢失。操作步骤如下:
 
1.1检查归档状态:
SQL> archive log list;
Database log mode             No Archive Mode
Automaticarchival             Disabled
Archivedestination           USE_DB_RECOVERY_FILE_DEST
Oldest onlinelog sequence     8
Current logsequence           10
SQL>
 
1.2将数据库启动到mount状态
SQL> shutdown immediate
Databaseclosed.
Databasedismounted.
ORACLE instanceshut down.
SQL> startup mount;
ORACLE instancestarted.
 
Total SystemGlobal Area  285212672 bytes
Fixed Size                  1218968 bytes
VariableSize              79693416 bytes
DatabaseBuffers          197132288 bytes
RedoBuffers                7168000 bytes
Databasemounted.  www.2cto.com  
SQL>
 
1.3执行备份
1.3.1       备份数据库
[oracle@wwldb ~]$ rman target /
 
RecoveryManager: Release 10.2.0.1.0 - Production on ÐÇÆÚÒ» 5ÔÂ 21 14:53:47 2012
 
Copyright (c)1982, 2005, Oracle.  All rights reserved.
 
connected totarget database: WWL (DBID=5520179, not open)
 
RMAN> backup database;
 
Starting backupat 21-5ÔÂ -12
using targetdatabase control file instead of recovery catalog
allocatedchannel: ORA_DISK_1
channelORA_DISK_1: sid=156 devtype=DISK
channelORA_DISK_1: starting full datafile backupset
channelORA_DISK_1: specifying datafile(s) in backupset
input datafilefno=00001 name=/DBData/WWL/system01.dbf
input datafilefno=00003 name=/DBData/WWL/sysaux01.dbf
input datafilefno=00002 name=/DBData/WWL/undotbs01.dbf
input datafilefno=00004 name=/DBData/WWL/users01.dbf
channelORA_DISK_1: starting piece 1 at 21-5ÔÂ -12
channelORA_DISK_1: finished piece 1 at 21-5ÔÂ -12
piece handle=/DBBak/bak_WWL_05_21_06nbhucb_1_1tag=TAG20120521T145403 comment=NONE
channelORA_DISK_1: backup set complete, elapsed time: 00:01:16
Finished backupat 21-5ÔÂ -12  www.2cto.com  
 
Starting ControlFile and SPFILE Autobackup at 21-5ÔÂ -12
piecehandle=/DBSoft/product/10.2.0/db_1/dbs/c-5520179-20120521-00 comment=NONE
Finished ControlFile and SPFILE Autobackup at 21-5ÔÂ -12
 
RMAN>
 
1.3.2       备份USER表空间
RMAN> backup tablespace users;
 
Starting backupat 21-5ÔÂ -12
using targetdatabase control file instead of recovery catalog
allocated channel:ORA_DISK_1
channelORA_DISK_1: sid=155 devtype=DISK
channelORA_DISK_1: starting full datafile backupset
channelORA_DISK_1: specifying datafile(s) in backupset
input datafilefno=00004 name=/DBData/WWL/users01.dbf
channelORA_DISK_1: starting piece 1 at 21-5ÔÂ -12
channelORA_DISK_1: finished piece 1 at 21-5ÔÂ -12
piecehandle=/DBBak/bak_WWL_05_21_08nbhvhe_1_1 tag=TAG20120521T151349 comment=NONE
channelORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backupat 21-5ÔÂ -12  www.2cto.com  
 
Starting ControlFile and SPFILE Autobackup at 21-5ÔÂ -12
piecehandle=/DBSoft/product/10.2.0/db_1/dbs/c-5520179-20120521-01 comment=NONE
Finished ControlFile and SPFILE Autobackup at 21-5ÔÂ -12
 
RMAN>
 
 
 
作者 吴伟龙
探索ORACLE之RMAN_02一致性备份
分享到:
重做日志文件基本维护简析
重做日志文件基本维护简析 重做日志文件最重要的用途就是用来恢复数据(其实你也可以用来logminer),它记录着system global area(sga)当中的database buffer cache(高速缓存区)的所有变更信息,记录到log buffer;不过在某些特殊情况下比如sqlldr direct等直接写入操作例外,这些例外将不会被记录。因此,使用redo l...
Oracle操作注意事项
Oracle操作注意事项   ORACLE 日期_: submitdate=DateTime.Parse(submitdate).ToString("d-M月-yyyy");   当前时间:sysdate() to_date('2002-01-02','yyyy-M-dd')    www.2cto.com   select count(1) from L_PERM where CANCEL 'Y' and (sysdate-perm_date)>3   在 PL/SQL Develop ...
  •         php迷,一个php技术的分享社区,专属您自己的技术摘抄本、收藏夹。
  • 在这里……