大橙子网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
Oracle11gR1的新特性,Rman备份UNDO表空间时排除已经提交的会话对应的数据,提高了Rman备份的效率。
创新互联服务项目包括茅箭网站建设、茅箭网站制作、茅箭网页制作以及茅箭网络营销策划等。多年来,我们专注于互联网行业,利用自身积累的技术优势、行业经验、深度合作伙伴关系等,向广大中小型企业、政府机构等提供互联网行业的解决方案,茅箭网站推广取得了明显的社会效益与经济效益。目前,我们服务的客户以成都为中心已经辐射到茅箭省份的部分城市,未来相信会继续扩大服务区域并继续获得客户的支持与信任!官方文档:http://docs.oracle.com/cd/B28359_01/server.111/b28279/chapter1.htm#AREANO02323
我们知道,UNDO表空间主要用于存储前镜像数据,这些数据在回滚以及恢复过程中可能被用到。但是一个生产数据库的UNDO表空间可能会变得非常巨大,而备份完整的UNDO数据文件在恢复时一般可能用到的比例很小。
测试一下:
--数据库版本 sys@ORCL>select * from v$version; BANNER ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production PL/SQL Release 11.2.0.4.0 - Production CORE 11.2.0.4.0 Production TNS for Linux: Version 11.2.0.4.0 - Production NLSRTL Version 11.2.0.4.0 - Production --创建环境 zx@ORCL>insert into t1 select * from dba_segments; 5887 rows created. zx@ORCL>insert into t1 select * from dba_segments; 5887 rows created. zx@ORCL>insert into t1 select * from dba_segments; 5887 rows created. zx@ORCL>insert into t1 select * from dba_segments; 5887 rows created. zx@ORCL>insert into t1 select * from dba_segments; 5887 rows created. zx@ORCL>insert into t1 select * from dba_segments; 5887 rows created. zx@ORCL>insert into t1 select * from dba_segments; 5887 rows created. zx@ORCL>insert into t1 select * from dba_segments; 5887 rows created. zx@ORCL>insert into t1 select * from dba_segments; 5887 rows created. zx@ORCL>commit; Commit complete. zx@ORCL>delete from t1; 288463 rows deleted. zx@ORCL>select status,sum(bytes)/1024/1024 from dba_undo_extents group by status; STATUS SUM(BYTES)/1024/1024 --------------------------- -------------------- UNEXPIRED 9.125 EXPIRED .4375 ACTIVE 89.125 zx@ORCL>commit; Commit complete. --两次备份undo表空间文件 RMAN> backup datafile 5; Starting backup at 2016-12-22 13:09:27 using channel ORA_DISK_1 channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set input datafile file number=00005 name=/u02/app/oracle/oradata/orcl/undotbs2_01.dbf channel ORA_DISK_1: starting piece 1 at 2016-12-22 13:09:27 channel ORA_DISK_1: finished piece 1 at 2016-12-22 13:09:28 piece handle=/u02/app/oracle/product/11.2.4/db1/dbs/3aro4007_1_1 tag=TAG20161222T130927 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 2016-12-22 13:09:28 Starting Control File and SPFILE Autobackup at 2016-12-22 13:09:28 piece handle=/u02/app/oracle/product/11.2.4/db1/dbs/c-1444351641-20161222-0f comment=NONE Finished Control File and SPFILE Autobackup at 2016-12-22 13:09:31 --查看备份后的文件大小 RMAN> list backup of datafile 5; List of Backup Sets =================== --第一次备份文件大小99.27M BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ ------------------- 87 Full 99.27M DISK 00:00:03 2016-12-22 12:11:54 BP Key: 87 Status: AVAILABLE Compressed: NO Tag: TAG20161222T121151 Piece Name: /u02/app/oracle/product/11.2.4/db1/dbs/36ro3sk7_1_1 List of Datafiles in backup set 87 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- ------------------- ---- 5 Full 9042031 2016-12-22 12:11:51 /u02/app/oracle/oradata/orcl/undotbs2_01.dbf --第二次备份文件大小2.16M BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ ------------------- 89 Full 2.16M DISK 00:00:01 2016-12-22 12:34:42 BP Key: 89 Status: AVAILABLE Compressed: NO Tag: TAG20161222T123441 Piece Name: /u02/app/oracle/product/11.2.4/db1/dbs/38ro3tv1_1_1 List of Datafiles in backup set 89 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- ------------------- ---- 5 Full 9042576 2016-12-22 12:34:41 /u02/app/oracle/oradata/orcl/undotbs2_01.dbf --查看操作系统文件大小 [oracle@rhel6 release]$ ls -lh /u02/app/oracle/product/11.2.4/db1/dbs/36ro3sk7_1_1 -rw-r----- 1 oracle oinstall 100M Dec 22 12:11 /u02/app/oracle/product/11.2.4/db1/dbs/36ro3sk7_1_1 [oracle@rhel6 release]$ ls -lh /u02/app/oracle/product/11.2.4/db1/dbs/38ro3tv1_1_1 -rw-r----- 1 oracle oinstall 2.2M Dec 22 12:34 /u02/app/oracle/product/11.2.4/db1/dbs/38ro3tv1_1_1这个新特性也有一些限制
- Compatible parameter must be set to 11.0 or higher
- Backup must use a disk or OSB channel
- For 'backup copy of
MOS文档:RMAN 11G : RMAN UNDO backup optimization (文档 ID 406468.1)
A Complete Understanding of RMAN Compression (文档 ID 563427.1)
另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。