rman exclude表空间

Rman可以对表空间设置exclude属性,即在备份过程中跳过设置的表空间进行备份。这样可以根据自己的业务特征选择性的备份,特别是在很大的数据库中节省备份时间。

 

测试版本

SQL> select * from v$version;

 

BANNER                                                                         

----------------------------------------------------------------               

Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Prod               

PL/SQL Release 10.1.0.2.0 - Production                                         

CORE        10.1.0.2.0   Production                                                      

TNS for 32-bit Windows: Version 10.1.0.2.0 - Production                        

NLSRTL Version 10.1.0.2.0 - Production                                         

 

已有表空间

SQL> select name from v$tablespace;

 

NAME                                                                           

------------------------------                                                 

SYSTEM                                                                          

UNDOTBS1                                                                       

SYSAUX                                                                         

USERS                                                                           

TEMP                                                                           

ATEST                                                                          

BTEST                                                                           

 

7 rows selected.

 

 

设置表空间的exclude属性

C:\Documents and Settings\Administrator>rman target /

Recovery Manager: Release 10.1.0.2.0 - Production

Copyright (c) 1995, 2004, Oracle.  All rights reserved.

connected to target database: DB10 (DBID=1310023677)

 

RMAN> configure exclude for tablespace atest;    --设置

 

tablespace ATEST will be excluded from future whole database backups

new RMAN configuration parameters are successfully stored

 

RMAN> show exclude;      --查看

 

RMAN configuration parameters are:

CONFIGURE EXCLUDE FOR TABLESPACE 'ATEST';

 

 

备份数据库

RMAN> backup database;

 

Starting backup at 04-1 -11

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=145 devtype=DISK

file 5 is excluded from whole database backup

channel ORA_DISK_1: starting full datafile backupset

channel ORA_DISK_1: specifying datafile(s) in backupset

input datafile fno=00001 name=F:\ORACLE\PRODUCT\10.1.0\ORADATA\DB10\SYSTEM01.DBF

input datafile fno=00003 name=F:\ORACLE\PRODUCT\10.1.0\ORADATA\DB10\SYSAUX01.DBF

input datafile fno=00002 name=F:\ORACLE\PRODUCT\10.1.0\ORADATA\DB10\UNDOTBS01.DBF

input datafile fno=00004 name=F:\ORACLE\PRODUCT\10.1.0\ORADATA\DB10\USERS01.DBF

input datafile fno=00006 name=F:\ORACLE\PRODUCT\10.1.0\ORADATA\DB10\BTEST.DBF  

 

备份的表空间中不包括已经设置excludeatest表空间>

 

channel ORA_DISK_1: starting piece 1 at 04-1 -11

channel ORA_DISK_1: finished piece 1 at 04-1 -11

piece handle=F:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\DB10\BACKUPSET\2011_01_04\O1_MF_NNNDF_TAG20110104T112244_6L54N5HB_.BKP comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35

channel ORA_DISK_1: starting full datafile backupset

channel ORA_DISK_1: specifying datafile(s) in backupset

including current controlfile in backupset

including current SPFILE in backupset

channel ORA_DISK_1: starting piece 1 at 04-1 -11

channel ORA_DISK_1: finished piece 1 at 04-1 -11

piece handle=F:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\DB10\BACKUPSET\2011_01_04\O1_MF_NCSNF_TAG20110104T112244_6L54O9S3_.BKP comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04

Finished backup at 04-1 -11

 

清除exclude设置

RMAN> configure exclude for tablespace atest clear;

 

tablespace ATEST will be included in future whole database backups

old RMAN configuration parameters are successfully deleted

 

简单而实用的技巧,记录下。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13177610/viewspace-683214/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/13177610/viewspace-683214/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值