Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Does RMAN backup unused blocks as well ?

flying_penguinFeb 18 2016 — edited Feb 28 2016

DB version : 11.2.0.4

OS         : RHEL 6.6

If I remember correctly, RMAN backs up only used blocks. I created a 20GB tablespace as shown below. When I backed it up, the backup piece is only 4MB in size as shown below.

SQL> create tablespace TEST_TS3 datafile '+DATA_DG' size 20G

autoextend on

maxsize 32767m

extent management local

uniform size 4M

segment space management auto; 

Tablespace created.

SQL>

SQL> select tablespace_name, bytes/1024/1024 from dba_Data_Files where tablespace_name = 'TEST_TS3';

TABLESPACE_NAME                BYTES/1024/1024

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

TEST_TS3                                 20480

Backing up TEST_TS3 tablespace which is not used by any segments ( empty )

RMAN> backup tablespace TEST_TS3 format='/u05/RMAN_BKP/TBS_%U_%T.rmbk' tag=TEST_TS3_BKP ;

Starting backup at 18-FEB-16

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=4941 instance=HMAGPRD2 device type=DISK

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00144 name=+DATA_DG/hmagprd2/datafile/test_ts3.413.904152141

channel ORA_DISK_1: starting piece 1 at 18-FEB-16

channel ORA_DISK_1: finished piece 1 at 18-FEB-16

piece handle=/u05/RMAN_BKP/TBS_03qu8hg2_1_1_20160218.rmbk tag=TEST_TS3_BKP comment=NONE

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

Finished backup at 18-FEB-16

$

$ ls -lh /u05/RMAN_BKP/TBS_03qu8hg2_1_1_20160218.rmbk

-rw-r----- 1 oracle oinstall 4.1M Feb 18 17:29 /u05/RMAN_BKP/TBS_03qu8hg2_1_1_20160218.rmbk

But , in real production world, RMAN backup size seems to be much higher.

The following production DB is 27.5 TeraBytes in size as reflected in the physical layer ( DBA_DATA_FILES.BYTES column )

SQL> select sum(bytes/1024/1024/1024) bytesGB from dba_Data_Files;

   BYTESGB

----------

27885.3252

But, at the logical layer , the space consumed is only 16.5 TB as reflected in DBA_EXTENTS.BYTES column

SQL> select sum(bytes/1024/1024/1024) bytesGB from dba_extents;

   BYTESGB

----------

16621.316

But, the RMAN Backup size came to 20 Terabytes which is nearly 4TB more than the space consumed at the logical layer (DBA_EXTENTS.BYTES).

Why is this ?

This post has been answered by Vsevolod Afanassiev on Feb 18 2016
Jump to Answer

Comments

Srini Chavali-Oracle

XE is not patch-able - there is no support available.

1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 27 2016
Added on Feb 18 2016
12 comments
13,525 views