使用RMAN 排除表空间备份_Oracle数据库_黑客防线网安服务器维护基地--Powered by WWW.RONGSEN.COM.CN

使用RMAN 排除表空间备份

作者:黑客防线网安Oracle维护基地 来源:黑客防线网安Oracle维护基地 浏览次数:0

黑客防线网安网讯:    在RMAN的备份中,可以通过Exclude命令排除某些不需要备份的表空间。 这样可以缩减备份的容量,对备份进行适当优化和调整。 排除某个表空间可以使用类似如下命令: configure exclude fo...

    在RMAN的备份中可以通过Exclude命令排除某些不需要备份的表空间
这样可以缩减备份的容量对备份进行适当优化和调整

排除某个表空间可以使用类似如下命令:
configure exclude for tablespace users;

其设置可以在RMAN中通过show exclude命令来查看。
如果将来想临时增加排除表空间的备份,可以通过以下命令实现:
backup database noexclude;

如果想取消排除设置则可以使用如下命令:
CONFIGURE EXCLUDE FOR TABLESPACE users CLEAR;

此外常用的排除备份命令还有:
BACKUP DATABASE SKIP READONLY, SKIP OFFLINE;

以下是一个简单的测试过程。
执行备份:


[oracle@test126 udump]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Mon Oct 9 06:47:19 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.

connected to target database: EYGLE (DBID=2590148133)

RMAN> configure exclude for tablespace users;

using target database control file instead of recovery catalog
tablespace USERS will be excluded from future whole database backups
new RMAN configuration parameters are successfully stored

RMAN> backup full database;

Starting backup at 09-OCT-06
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=527 devtype=DISK
file 4 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=/opt/oracle/oradata/eygle/system01.dbf
input datafile fno=00003 name=/opt/oracle/oradata/eygle/sysaux01.dbf
input datafile fno=00002 name=/opt/oracle/oradata/eygle/undotbs01.dbf
channel ORA_DISK_1: starting piece 1 at 09-OCT-06
channel ORA_DISK_1: finished piece 1 at 09-OCT-06
piece handle=/opt/oracle/flash_recovery_area/EYGLE/backupset/

2006_10_09/o1_mf_nnndf_TAG20061009T070612_2lm135od_.bkp tag=TAG20061009T070612 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:48
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
channel ORA_DISK_1: starting piece 1 at 09-OCT-06
channel ORA_DISK_1: finished piece 1 at 09-OCT-06
piece handle=/opt/oracle/flash_recovery_area/EYGLE/backupset/

2006_10_09/o1_mf_ncnnf_TAG20061009T070612_2lm14ppc_.bkp tag=TAG20061009T070612 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 09-OCT-06

RMAN> exit


Recovery Manager complete.


然后关闭数据库,我们可以进行一次恢复尝试:


[oracle@test126 udump]$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Oct 9 07:07:28 2006

Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning and Data Mining options

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/opt/oracle/oradata/eygle/system01.dbf

    黑客防线网安服务器维护方案本篇连接:http://www.rongsen.com.cn/show-13331-1.html
网站维护教程更新时间:2012-03-23 00:53:47  【打印此页】  【关闭
我要申请本站N点 | 黑客防线官网 |  
专业服务器维护及网站维护手工安全搭建环境,网站安全加固服务。黑客防线网安服务器维护基地招商进行中!QQ:29769479

footer  footer  footer  footer