[20141027]12c rman copy的分段备份.txt

[20141027]12c rman copy的分段备份.txt

--12G rman下可以实现copy的分段备份,而11G下可以仅仅支持备份集的分段备份.做一个测试看看.

--11G:
SCOTT@test> @ver1
PORT_STRING                    VERSION        BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx            11.2.0.3.0     Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

RMAN> report schema ;

using target database control file instead of recovery catalog
Report of database schema for database with db_unique_name TEST

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    770      SYSTEM               ***     /u01/app/oracle11g/oradata/test/system01.dbf
2    920      SYSAUX               ***     /u01/app/oracle11g/oradata/test/sysaux01.dbf
3    718      UNDOTBS1             ***     /u01/app/oracle11g/oradata/test/undotbs01.dbf
4    768      USERS                ***     /u01/app/oracle11g/oradata/test/users01.dbf
5    100      EXAMPLE              ***     /u01/app/oracle11g/oradata/test/example01.dbf
6    64       RMAN                 ***     /u01/app/oracle11g/oradata/test/rman01.dbf
7    64       TOOLS                ***     /u01/app/oracle11g/oradata/test/tools01.dbf
8    64       TEST                 ***     /u01/app/oracle11g/oradata/test/test01.dbf
9    64       TESTMSSM             ***     /u01/app/oracle11g/oradata/test/testmssm01.dbf
10   1        UNDOTBS2             ***     /u01/app/oracle11g/oradata/test/undotbs02.dbf
11   100      TEST16K              ***     /u01/app/oracle11g/oradata/test/test16k01.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    250      TEMP                 32767       /u01/app/oracle11g/oradata/test/temp01.dbf

--example表空间占用100M.分成3段看看.

RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO BACKUPSET;

new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters are successfully stored
released channel: ORA_DISK_1

RMAN> backup as backupset  section size 40M datafile 5 format "/data/testtest/example_%U";

Starting backup at 2014-10-27 10:33:08
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
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=/u01/app/oracle11g/oradata/test/example01.dbf
backing up blocks 1 through 5120
channel ORA_DISK_1: starting piece 1 at 2014-10-27 10:33:10
channel ORA_DISK_2: starting full datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/app/oracle11g/oradata/test/example01.dbf
backing up blocks 5121 through 10240
channel ORA_DISK_2: starting piece 2 at 2014-10-27 10:33:11
channel ORA_DISK_3: starting full datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/app/oracle11g/oradata/test/example01.dbf
backing up blocks 10241 through 12800
channel ORA_DISK_3: starting piece 3 at 2014-10-27 10:33:12
channel ORA_DISK_1: finished piece 1 at 2014-10-27 10:33:13
piece handle=/data/testtest/example_1upm3mf6_1_1 tag=TAG20141027T103309 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_2: finished piece 2 at 2014-10-27 10:33:13
piece handle=/data/testtest/example_1upm3mf6_2_1 tag=TAG20141027T103309 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_3: finished piece 3 at 2014-10-27 10:33:13
piece handle=/data/testtest/example_1upm3mf6_3_1 tag=TAG20141027T103309 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:02
Finished backup at 2014-10-27 10:33:14

$ ll -l /data/testtest/example_*
-rw-r-----  1 oracle11g oinstall 35528704 2014-10-27 10:33:11 /data/testtest/example_1upm3mf6_1_1
-rw-r-----  1 oracle11g oinstall 36077568 2014-10-27 10:33:12 /data/testtest/example_1upm3mf6_2_1
-rw-r-----  1 oracle11g oinstall  1474560 2014-10-27 10:33:13 /data/testtest/example_1upm3mf6_3_1

RMAN> backup as copy section size 40M datafile 5;
Starting backup at 2014-10-27 10:53:21
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=398 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=591 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=14 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 10/27/2014 10:53:25
RMAN-06580: the SECBYTES option cannot be used with AS COPY

--可以发现11G不支持backup as copy的section size.

--在12c测试看看.

SYS@ztest> @ver1
PORT_STRING                    VERSION        BANNER                                                                               CON_ID
------------------------------ -------------- -------------------------------------------------------------------------------- ----------
IBMPC/WIN_NT64-9.1.0           12.1.0.1.0     Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production              0

RMAN> report schema ;

Report of database schema for database with db_unique_name ZTEST

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    780      SYSTEM               ***     E:\APP\ADMINISTRATOR\ORADATA\ZTEST\SYSTEM01.DBF
2    64       TOOLS                ***     E:\APP\ADMINISTRATOR\ORADATA\ZTEST\TOOLS01.DBF
3    890      SYSAUX               ***     E:\APP\ADMINISTRATOR\ORADATA\ZTEST\SYSAUX01.DBF
5    725      UNDOTBS1             ***     E:\APP\ADMINISTRATOR\ORADATA\ZTEST\UNDOTBS01.DBF
6    337      USERS                ***     E:\APP\ADMINISTRATOR\ORADATA\ZTEST\USERS01.DBF

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    947      TEMP                 32767       E:\APP\ADMINISTRATOR\ORADATA\ZTEST\TEMP01.DBF

RMAN> backup as copy section size 150M datafile 6 format 'r:\user01_%U';
Starting backup at 2014-10-27 15:07:05
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=251 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=366 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=252 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00006 name=E:\APP\ADMINISTRATOR\ORADATA\ZTEST\USERS01.DBF
backing up blocks 1 through 19200
channel ORA_DISK_2: starting datafile copy
input datafile file number=00006 name=E:\APP\ADMINISTRATOR\ORADATA\ZTEST\USERS01.DBF
backing up blocks 19201 through 38400
channel ORA_DISK_3: starting datafile copy
input datafile file number=00006 name=E:\APP\ADMINISTRATOR\ORADATA\ZTEST\USERS01.DBF
backing up blocks 38401 through 43200
output file name=R:\USER01_DATA_D-ZTEST_I-2431369005_TS-USERS_FNO-6_02PM46GQ tag=TAG20141027T150706
channel ORA_DISK_3: datafile copy complete, elapsed time: 00:00:03
output file name=R:\USER01_DATA_D-ZTEST_I-2431369005_TS-USERS_FNO-6_02PM46GQ tag=TAG20141027T150706
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:10
output file name=R:\USER01_DATA_D-ZTEST_I-2431369005_TS-USERS_FNO-6_02PM46GQ tag=TAG20141027T150706
channel ORA_DISK_2: datafile copy complete, elapsed time: 00:00:09
Finished backup at 2014-10-27 15:07:17

--可以发现文件被分成3个部分,看看备份结果.
RMAN> list copy ;

specification does not match any control file copy in the repository
specification does not match any archived log in the repository
List of Datafile Copies
=======================

Key     File S Completion Time     Ckp SCN    Ckp Time
------- ---- - ------------------- ---------- -------------------
1       6    A 2014-10-27 15:07:07 3236146    2014-10-27 15:07:06
        Name: R:\USER01_DATA_D-ZTEST_I-2431369005_TS-USERS_FNO-6_02PM46GQ
        Tag: TAG20141027T150706

d:\tools\sqltemp>ls -l R:\USER01*
ls -l R:\USER01*
-rw-rw-rw-   1 user     group    353902592 Oct 27 15:07 R:\USER01_DATA_D-ZTEST_I-2431369005_TS-USERS_FNO-6_02PM46GQ

--形成1个文件,通过这种方式可以加快backup as copy的备份.

时间: 2024-09-20 08:38:07

[20141027]12c rman copy的分段备份.txt的相关文章

[20151116]rman 全备份以及增量0级备份.txt

[20151116]rman 全备份以及增量0级备份.txt --前一阵子写了一篇将as copy作为增量0级备份的帖子,今天对比全备份以及增量0级备份的不同. 1.测试环境: SCOTT@book> @ &r/ver1 PORT_STRING                    VERSION        BANNER ------------------------------ -------------- --------------------------------------

[20160721]rman与undo表空间备份.txt

[20160721]rman与undo表空间备份.txt --//UNDO表空间主要用于存储前镜像数据,这些数据在回滚以及恢复过程中可能被用到. --//一般生产数据库的UNDO表空间可能会变得非常巨大,甚至包括多个数据文件,而备份完整的UNDO数据文件在恢复时一般可能用到的比 --//例很小.所以UNDO的很大一部分备份是多余的,在Oracle11g中,Oracle引入了一个新的特性RMAN UNDO备份优化. --//在RMAN备份UNDO表空间时,提交事务的UNDO信息将不再备份,这个特性

[20130803]ORACLE 12C RMAN 功能增强.txt

[20130803]ORACLE 12C RMAN 功能增强.txt 在oracle 12c rman中可以直接输入sql语句,缺点就是仅仅输出最大仅仅80列,不知道如何调整. d:\tmp>rman target sys/xxxx@test01p Recovery Manager: Release 12.1.0.1.0 - Production on Fri Aug 2 22:53:49 2013 Copyright (c) 1982, 2013, Oracle and/or its affi

[20171129]rman input memory buffer 5.txt

[20171129]rman input memory buffer 5.txt --//Input Memory Buffers如何测试,不清楚.不过找到一本电子书.摘要如下: Oracle RMAN 11g Backup and Recovery.pdf 作者:Robert G. Freeman Matthew Hart 页数:689 出版社:Mc graw hill 出版号: ISBN: 978-0-07-162861-7         MHID: 0-07-162861-4 RMAN

[20171116]11GR2控制文件自动备份.txt

20171116]11GR2控制文件自动备份.txt SYS@book> @ &r/ver1 PORT_STRING                    VERSION        BANNER ------------------------------ -------------- -------------------------------------------------------------------------------- x86_64/Linux 2.4.xx  

[20151117]关于增量备份.txt

[20151117]关于增量备份.txt SCOTT@book> @ &r/ver1 PORT_STRING                    VERSION        BANNER ------------------------------ -------------- -------------------------------------------------------------------------------- x86_64/Linux 2.4.xx      

[20161220]rman恢复时间点的疑问.txt

[20161220]rman恢复时间点的疑问.txt --昨天在恢复时遇到缺少归档的问题,自己开始感觉奇怪,做一点分析记录. RMAN> list backupset summary ; List of Backups =============== Key     TY LV S Device Type Completion Time     #Pieces #Copies Compressed Tag ------- -- -- - ----------- -----------------

[20161220]rman tag format标识2.txt

[20161220]rman tag format标识2.txt --别人问的问题,想全备份与归档放在不同目录,并且归档要求至少备份2次.我以前写过一个例子,链接: http://blog.itpub.net/267265/viewspace-2089074/ --例子: backup as compressed backupset full database tag='full 20161220' format '/home/oracle/backup/full20161220_%U'    

使用RMAN实现异机备份恢复(WIN平台)

--=================================-- 使用RMAN实现异机备份恢复(WIN平台)--=================================     在有些情况下,如数据库服务器处于磁盘空间的压力或成本控制需要将数据文件备份到异机,使用RMAN可以完成该工作.基于Windows平台所需完成的配置相对简单,仅仅是添加账户与使用新增的帐户来启动数据库服务以及设置共享路径.    下面给出具体描述.    一.配置数据库服务器与备份目的主机    1.