Sql to check RMAN backup size
Hi All
Kinldy tell me how i can check the RMAN Backup size from sql command. I am taking Full,Incrimental,Cumulative and Archive log backup.
Thanks
Krishna
try this,
SQL> select ctime "Date"
2 , decode(backup_type, 'L', 'Archive Log', 'D', 'Full', 'Incremental') backup_type
3 , bsize "Size MB"
4 from (select trunc(bp.completion_time) ctime
5 , backup_type
6 , round(sum(bp.bytes/1024/1024),2) bsize
7 from v$backup_set bs, v$backup_piece bp
8 where bs.set_stamp = bp.set_stamp
9 and bs.set_count = bp.set_count
10 and bp.status = 'A'
11 group by trunc(bp.completion_time), backup_type)
12 order by 1, 2;
Date BACKUP_TYPE Size MB
03-JUL-10 Archive Log 7.31
03-JUL-10 Full 29.81
03-JUL-10 Incremental 2853.85
04-JUL-10 Archive Log 3.59
04-JUL-10 Full 7.45
04-JUL-10 Incremental 3.05
Similar Messages
-
Hi,
Can anyone tell me how can i estimate a rman backup size ?
i need to figure out the worst case so i can prepaire the proper disks
10x.The 'worst case' is the same size as the database size, WHEN image copies are used instead of backupsets. To prepare proper disk size you have to answer another question: How many backups do you plan to store? You have to define a retention policy, number of backups or number of days you want to go back in time.
Werner -
ESTIMATED RMAN BACKUP SIZE:::PLZ HELP ME
Hi all,
I wish you all happy new year :)
I have implemented a new Backup STrategy with RMAN, such I using Oracle 10G version on Linux Server. I would like To know if exists one method to estimate the size of my full and incremental backup before to lunch? I will really apreciate your help :)
Thank you all,
W
Message was edited by:
HAGGARHi,
Happy new year for you too!!!
From Metalink Note:105208.1:
There is no 'magic' formula to calculate the storage space of an RMAN backup
and there is no query that will give you a space estimate.
So, the best answer is: "Try it and see how much is used."
Check These out:
1-) https://metalink.oracle.com/metalink/plsql/f?p=130:14:4138343222012115291::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,105208.1,1,1,1,helvetica
2-) https://metalink.oracle.com/metalink/plsql/f?p=130:14:4138343222012115291::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,67221.1,1,0,1,helvetica
Cheers,
Marcello M. -
How to check RMAN backup report or log
Hi Guys,
I have RMAN schduled to backup my database daily.
Please what are the steps to check the report of the backup to see what was actually backed up and if it backup up ok
ThanksUse "LIST BACKUP" to display information about backup sets, proxy copies, and image copies. With LIST command you can list the following:
- Backups and copies that do not have the status AVAILABLE in the RMAN repository
- Backups and copies of datafiles that are available and can possibly be used in a restore operation
- Specified archived logs, backup sets, backup pieces, control file copies, datafile copies, and proxy copies
- Backups and copies restricted by tag, completion time, recoverability, or device
- Incarnations of a specified database or of all databases known to the repository
- Stored scripts in the recovery catalog
Examples on how to use LIST command are listed below:
RMAN> LIST BACKUP;
RMAN> LIST EXPIRED BACKUP;
RMAN> LIST BACKUP OF DATABASE;
RMAN> LIST BACKUP SUMMARY;
RMAN> LIST BACKUP BY FILE;
RMAN> LIST ARCHIVELOG ALL;
RMAN> LIST COPY OF DATABASE ARCHIVELOG ALL;
RMAN> LIST COPY OF DATAFILE 1, 2, 3;
RMAN> LIST BACKUP OF ARCHIVELOG FROM SEQUENCE 1437;
RMAN> LIST BACKUPSET OF DATAFILE 1;You can use the VALIDATE keyword of the BACKUP command to do the following:
- Check datafiles for physical and logical corruption
- Confirm that all database files exist and are in the correct locations
For example, you can validate that all database files and archived redo logs can be backed up by running a command as follows:
RMAN> BACKUP VALIDATE DATABASE ARCHIVELOG ALL;I suggest you read Oracle® Database Backup and Recovery Manuals:
http://www.oracle.com/pls/db102/portal.portal_db?selected=3 -
SQL to find rman backup files required for recovery?
Hi folks,
I'm looking for a sql statement that I can use to query the database and return a list of the RMAN backup files needed for a successful recovery based on a SCN or a point in time. I want to do it through SQL (not though rman) because I want to script an automated refresh process. My databases are backed up online, so I would need any archive log backups done during the database backup as well. So for example...
I do a database backup
Then do an archive log backup.
Pass a SQL script the lowest and highest scn numbers during the backup.
It returns a list of the rman backup pieces needed to do a successful recovery.
I've got a script, below, which shows the lowest and highest scn during the last full backup (all datafiles which exist have been backed up), if someone understands what I'm looking for and has done something similar, I would really appreciate any insight you may have. What I'd want to get back from the SQL is the names of the rman backup files (handles) which would be needed to get the database recovered to the highest scn during the backup.
SELECT MIN(VBD.CHECKPOINT_CHANGE#), MAX(VBD.CHECKPOINT_CHANGE#)
FROM V$BACKUP_DATAFILE VBD, V$DATAFILE VDF,
(SELECT
CREATION_CHANGE#,
MAX(COMPLETION_TIME) COMPLETION_TIME
FROM V$BACKUP_DATAFILE
WHERE CREATION_CHANGE# IN (
SELECT CREATION_CHANGE# FROM V$DATAFILE)
GROUP BY CREATION_CHANGE#
) QUERY1
WHERE VBD.CREATION_CHANGE# = VDF.CREATION_CHANGE#
AND VBD.CREATION_CHANGE# = QUERY1.CREATION_CHANGE#
AND VBD.COMPLETION_TIME = QUERY1.COMPLETION_TIME;
Thanks very much for your time,
-Adam vonNiedaIn case anyone's wondering, here's the answer. The following query returns the min and max SCN numbers contained in the last online backup.
SELECT MIN(VBD.CHECKPOINT_CHANGE#), MAX(VBD.CHECKPOINT_CHANGE#)
FROM V$BACKUP_DATAFILE VBD, V$DATAFILE VDF,
(SELECT
CREATION_CHANGE#,
MAX(COMPLETION_TIME) COMPLETION_TIME
FROM V$BACKUP_DATAFILE
WHERE CREATION_CHANGE# IN (
SELECT CREATION_CHANGE# FROM V$DATAFILE)
GROUP BY CREATION_CHANGE#
) QUERY1
WHERE VBD.CREATION_CHANGE# = VDF.CREATION_CHANGE#
AND VBD.CREATION_CHANGE# = QUERY1.CREATION_CHANGE#
AND VBD.COMPLETION_TIME = QUERY1.COMPLETION_TIME;
This next one gets the session key for that backup.
Select distinct session_key from v$backup_datafile_details
where checkpoint_change# >= <min scn# from above> and checkpoint_change# <= <max scn# from above>;
And finally, this one returns all files written out during that RMAN session, which includes control files, data files, and archived redo logs
Select handle from v$backup_piece_details
where session_key = <session key from above> order by completion_time; -
Estimate rman backup size & time
Hi DBAs,
ENV : 11gR2, Windows 2008 server, 64bit,RAM=12 gb,
DB size=370 gb., SGA=5 gb, ASMM=enabled.
We need to move this database to Windows 2012 server which runs on Hyper-V. Can you guys suggest what are the best methods to move with limited downtime ?
If we opt for RMAN, is there any way to measure to estimate backup size ? ( at-least, approximate size) and how much time it takes to complete?
Please share your thoughts !!
Thanks,
HariThank you sb92075 :
Your statement - Size depends upon how much of the 370GB are indexes
Would it mean, Rman is not going to take indexes to backup sets? or can you elaborate or refer me a link to study.
and my total indexs are of size 18GB
{code?
select segment_type, sum(bytes)/1024/1024/1024 from dba_segments where segment_type in ('INDEX PARITION','INDEX')
group by segment_type
SEGMENT_TY SUM(BYTES)/1024/1024/1024
INDEX 18.6002808
{code?
Are we able to guess approximate backup size? -
Rman backup size for Dr db is very much higher than that of primary db
Hi All,
My production database on Oracle 10.2.0.4 had a physical size of 897 Gb and logical size of around 800 Gb.
Old tables were truncated from the database and its logical size got reduced to 230 Gb.
Backup size is now 55Gb which used to be of 130 Gb before truncation.
Now this database has a DR configured. Backup of this DR database is daily taken which is used to refresh test environments.
But the backup size for DR database has not decreased. The restoration time while refreshing test environments is also same as before.
We had predicted that the backup size for DR database will also decrease and hence reducing the restoration time.
We take compressed RMAN backup.
What is the concept behind this?When you duplicate a database it will restore all the datafiles from the RMAN backup. You will find the physical space of your source database. Remove the fragmented space using object movement. Then shrink the tablespaces and take fresh RMAN backup and restore.
Regards
Asif Kabir -
Oracle11gr2,solaris10.
how do i check the size of my daily rman lvl0 backup.
i do a backup as compresses level 0.
i find the sizes listed in rman>list backupset summary; but i wanted to get as a consolidated.
My fra gets filled up after backing up the database continuously for 4 days. I remove the oldest backupset folder to release fra. I wanted to get a trend of how much rman is using each day for its backup.
Thanks
San~SQL> select ctime "Date"
2 , decode(backup_type, 'L', 'Archive Log', 'D', 'Full', 'Incremental') backup_type
3 , bsize "Size MB"
4 from (select trunc(bp.completion_time) ctime
5 , backup_type
6 , round(sum(bp.bytes/1024/1024),2) bsize
7 from v$backup_set bs, v$backup_piece bp
8 where bs.set_stamp = bp.set_stamp
9 and bs.set_count = bp.set_count
10 and bp.status = 'A'
11 group by trunc(bp.completion_time), backup_type)
12 order by 1, 2;
Date BACKUP_TYPE Size MB
03-JUL-10 Archive Log 7.31
03-JUL-10 Full 29.81
03-JUL-10 Incremental 2853.85
04-JUL-10 Archive Log 3.59
04-JUL-10 Full 7.45
04-JUL-10 Incremental 3.05refer : How to find backupset sizes for full and incremental backups answered by ebrian
How to find backupset sizes for full and incremental backups
Total questions 45 (39 unresolved) : mark the question as answered if you get the answer for your questions.
Announcement: Forums Etiquette / Reward Points
Posters, please mind these common-sense rules when participating here:
- When asking a question, provide all the details that someone would need to answer it. Consulting documentation first is highly recommended.
- When answering a question, please be courteous and respectful; there are different levels of experience represented here. A poorly worded question is better ignored than flamed - or better yet, help the poster ask a better question.
- It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
- See more tips in the FAQ
Thanks for doing your part to make this community as valuable as possible for everyone!
- OTN Edited by: rajeysh on Jul 7, 2010 2:11 AM -
Manually check the rman backup output
Can anybody guide me how to manually check the rman backup output,
There are like 300+ DBs and we are using recovery catalog .....
Plz send me some example to do that....like i have to check list, report or rman logs?1) set environment variable
$ export NLS_DATE_FORMAT='DD-MON-YYYY HH24:MI:SS'
RMAN> connect target * connect catalog *
RMAN> list backup summary;
RMAN> list backup of database completed between "to_date('2007-12-20 03:00:00','YYYY-MM-DD HH24:MI:
SS')" and "to_date('2007-12-20 06:00:00','YYYY-MM-DD HH24:MI:SS')";
My manager ask me to check rman backup report manually & this is what i am forwarding him that i will check , let me know if its not right........ -
RMAN Backups residing remotely
Oracle Version: 11.2.0.3 x64
OS: Win 2008 server x64
Hi Experts.
We need to replicate a database on one of our boxes, with very limited space on disk. The database size is roughly 200gb, free space on disk is 250gb, and the RMAN backups are roughly 80gb.
The RMAN backup pieces have been cataloged with the following path:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'd:\rman\%d\bkup_%d_%U';So, if we attempt a restore/replication on the local server, RMAN would look for backups on the local D drive, under D:\rman\<db_name>\
In the past we used to copy the RMAN backups on the local server where the replication is required, and perform the replication locally without any issues; however, with a very limited space that won't fit both the replicated instance and the RMAN copies, we're not quite sure how further proceed!?
Can we instruct the RMAN replication session to look for backups in a remote server?
We do keep 3 weeks of RMAN backups on disk, hence the 80GB RMAN backups size. As far as I remember a full backup has been performed last Sun. Can we only bring over Sun full backup (and any subsequent incremental backups)? or do we need to copy the whole thing across to the local server?
Any ideas please?
ThanksI've been trying the duplicate command with the "from active database" clause but we're getting some permissions errors that I'm not sure about:
C:\Users\oracle>rman target sys/xxx@vssrp auxiliary sys/password@vssrl
Recovery Manager: Release 11.2.0.3.0 - Production on Sat Sep 1 16:28:25 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: vssrp (DBID=1391811405)
connected to auxiliary database: vssrl (not mounted)
RMAN> run {
2> allocate channel c1 type disk;
3> allocate auxiliary channel DUP type disk;
4> duplicate target database to vssrl from active database;
5> }
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=1252 device type=DISK
allocated channel: DUP
channel DUP: SID=673 device type=DISK
Starting Duplicate Db at 01-SEP-12
contents of Memory Script:
sql clone "create spfile from memory";
executing Memory Script
sql statement: create spfile from memory
contents of Memory Script:
shutdown clone immediate;
startup clone nomount;
executing Memory Script
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 3140026368 bytes
Fixed Size 2259312 bytes
Variable Size 788530832 bytes
Database Buffers 2315255808 bytes
Redo Buffers 33980416 bytes
allocated channel: DUP
channel DUP: SID=578 device type=DISK
contents of Memory Script:
sql clone "alter system set db_name =
''vssrp'' comment=
''Modified by RMAN duplicate'' scope=spfile";
sql clone "alter system set db_unique_name =
''vssrl'' comment=
''Modified by RMAN duplicate'' scope=spfile";
shutdown clone immediate;
startup clone force nomount
backup as copy current controlfile auxiliary format 'C:\ORACLE\ORADATA\CONTROLFILE\vssrl\CONTROL01.CTL';
restore clone controlfile to 'D:\ORACLE\ORADATA\CONTROLFILE\vssrl\CONTROL02.CTL' from
'C:\ORACLE\ORADATA\CONTROLFILE\vssrl\CONTROL01.CTL';
restore clone controlfile to 'D:\ORACLE\ORADATA\vssrl\CONTROL03.CTL' from
'C:\ORACLE\ORADATA\CONTROLFILE\vssrl\CONTROL01.CTL';
alter clone database mount;
executing Memory Script
sql statement: alter system set db_name = ''vssrp'' comment= ''Modified by RMAN duplicate'' scope=spfile
sql statement: alter system set db_unique_name = ''vssrl'' comment= ''Modified by RMAN duplicate'' scope=spfile
Oracle instance shut down
Oracle instance started
Total System Global Area 3140026368 bytes
Fixed Size 2259312 bytes
Variable Size 788530832 bytes
Database Buffers 2315255808 bytes
Redo Buffers 33980416 bytes
allocated channel: DUP
channel DUP: SID=578 device type=DISK
Starting backup at 01-SEP-12
channel c1: starting datafile copy
copying current control file
released channel: c1
released channel: DUP
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/01/2012 16:29:14
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on c1 channel at 09/01/2012 16:29:14
ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-01031: insufficient privileges
ORA-17629: Cannot connect to the remote database serverAs you can see from the above, we're logging in to both databases (target and aux) as sys; also the local OS oracle user is a member of administrators and can write files on to disks.
Any idea please?
Thanks -
Why is RMAN backup of 2TB DB still 2TB when expdp dump was only 600mb ?
RDBMS version: 11.2.0.3/Oracle Linux 6.2
We took an RMAN backup of below mentioned DB.
Since DBA_SEGMENTS was showing 2TB , I thought RMAN backup size will be half of that .ie. 1TB . But the RMAN backup size was 1.95 TB!
expdp of the full DB was only 600mb !
SQL> select sum(bytes/power(1024,3)) from dba_segments;
SUM(BYTES/POWER(1024,3))
2056.27728
SQL> select sum(bytes/power(1024,3)) sumbytesGB, sum(maxbytes/power(1024,3)) sumMaxBytes from dba_data_files;
SUMBYTESGB SUMMAXBYTES
5451 427.998978
SQL> col file_name format a75
SQL> set pages 300
SQL> select file_name, bytes/power(1024,3) bytesGB, maxbytes/power(1024,3) from dba_data_files;
FILE_NAME BYTESGB MAXBYTES/POWER(1024,3)
+CMS_DATA/bcmsprd/datafile/cms_s_asset_xa_dat_01.dbf 20 0
+CMS_DATA/bcmsprd/datafile/cms_s_asset_xa_dat_02.dbf 20 0
+CMS_DATA/bcmsprd/datafile/cms_s_asset_xa_dat_03.dbf 20 0
+CMS_DATA/bcmsprd/datafile/cms_s_asset_xa_dat_04.dbf 20 0
+CMS_DATA/bcmsprd/datafile/cms_s_asset_xa_dat_05.dbf 20 0
+CMS_DATA/bcmsprd/datafile/cms_s_asset_xa_dat_06.dbf 20 0
+CMS_DATA/bcmsprd/datafile/cms_s_asset_xa_dat_07.dbf 20 0
+CMS_DATA/bcmsprd/datafile/cms_s_asset_xa_dat_08.dbf 20 0
+CMS_DATA/bcmsprd/datafile/users.271.803502221 6 31.9999847
+CMS_DATA/bcmsprd/datafile/undotbs1.265.803502221 20 20
+CMS_DATA/bcmsprd/datafile/sysaux.272.803502221 10 31.9999847
+CMS_DATA/bcmsprd/datafile/system.260.803502221 10 31.9999847
+CMS_DATA/bcmsprd/datafile/undotbs2.261.803502407 20 20
+CMS_DATA/bcmsprd/datafile/undotbs3.267.803502407 20 20
+CMS_DATA/bcmsprd/datafile/cms_s_asset_xa_dat_09.dbf 20 0
+CMS_DATA/bcmsprd/datafile/cms_s_asset_xa_dat_10.dbf 20 0
<snipped>RMAN does a backup of all formatted blocks --- even if rows have been deleted and the blocks are "logically empty". expdp, obviously, does not backup deleted rows. Similarly, if you've created a table and then subsequently truncated it, the blocks would remain formatted and be candidates for RMAN Backups. Truncated tables would be "empty" and would result in 0 rows exported.
So, you'd have this issue if you've deleted a large number of rows and/or issued truncates.
Hemant K Chitale -
Rman Backupset size is exceeding the database size
Hi
my rman backup size is exceeding the database backup size and occupying the full mountpoint. and finally due to space issue, backup is failing.
Below is the RMAN script
run {
backup
incremental level 0
tag ASCPLVL0
database plus archivelog ;
delete noprompt backupset completed before 'sysdate - 4/24' ;
Please look into this
Regards
M. SatyanveshAre you using compression?
Ans: No
The size of an RMAN backup isn't always proportional to the size of the database.
Ans: yeah I know, but it should be somewhere near to database size(lets say 100gb or 150 gb variance)
How many archivelogs are you backing up with your database? This is possibly a factor in the size of your db backup.
Ans: archive log count per day is 18 and size is 34gb
Have you got a retention policy in place and do you regularly delete obsolete backups/archivelogs?
Ans: yes
Are you taking this backup as part of a backup strategy? or is this just a one off for some other purpose which would seem to be the case.
Ans: This is production systesm so its a part of backup strategy -
Backup size of transaction log
Hi,
I want to check the backup size of Transaction logs?
please help
REgards
BilalTry the below query?
SELECT
CONVERT(CHAR(100), SERVERPROPERTY('Servername')) AS Server,
msdb.dbo.backupset.database_name,
CASE msdb..backupset.type
WHEN 'D' THEN 'Database'
WHEN 'L' THEN 'Log'
END AS backup_type,
msdb.dbo.backupset.backup_size
FROM msdb.dbo.backupmediafamily
INNER JOIN msdb.dbo.backupset ON msdb.dbo.backupmediafamily.media_set_id = msdb.dbo.backupset.media_set_id
WHERE (CONVERT(datetime, msdb.dbo.backupset.backup_start_date, 102) >= GETDATE() - 7)
ORDER BY
msdb.dbo.backupset.database_name,
msdb.dbo.backupset.backup_finish_date -
How to check the size of rman backups to tape
instead of asking tsm person to check, how do I check how big is a rman backup sent to tape?
query to find the backupset sizes
SQL> select ctime "Date"
2 , decode(backup_type, 'L', 'Archive Log', 'D', 'Full', 'Incremental') backup_type
3 , bsize "Size MB"
4 from (select trunc(bp.completion_time) ctime
5 , backup_type
6 , round(sum(bp.bytes/1024/1024),2) bsize
7 from v$backup_set bs, v$backup_piece bp
8 where bs.set_stamp = bp.set_stamp
9 and bs.set_count = bp.set_count
10 and bp.status = 'A'
11 group by trunc(bp.completion_time), backup_type)
12 order by 1, 2;
Date BACKUP_TYPE Size MB
03-JUL-10 Archive Log 7.31
03-JUL-10 Full 29.81
03-JUL-10 Incremental 2853.85
04-JUL-10 Archive Log 3.59
04-JUL-10 Full 7.45
04-JUL-10 Incremental 3.05 -
How to find total size of RMAN backup files?
Hi there
env: Oracle 10gR2, RHEL 64bit
My client has a production database where rman backups are taken: Level-0 backup every Sunday and Level-1 Monday thru Saturday.
I have very limited access to this production database because it is being managed by third party and they won't provide me my required info (not sure why). I do not have access to their rman repository. To connect to the database I have to login to an intermediate server and then login to the database server. I have no access to Enterprise Manager. So in short, my access is limited. I want to gather the information on total size of rman backup files - both for a Level-0 and Level-1 backups separately. I understand that this info can be retrieved from rman repository. Are there any data dictionary views/tables where I may get this info?
Best regardsHi,
Have you searched in forum check this:https://forums.oracle.com/thread/1097939
HTH
Maybe you are looking for
-
When I go to finalize my movie on iMovie or attempt to publish it, this message appears.
-
I am preparing to wipe my hard disk and do a clean install of Tiger. However, I want to save my iPhoto library, *keeping all of the albums and metadata intact*. How do I do that?
-
Hi, I have number of outbound deliveries for the same customer and ship to party. While invoicing them it is creating only one invoice. But my requirement is to create, one invoice for one outbound delivery. Could anybody tell me how can I control it
-
Onedrive for Business: file checker
Hi to all, I've used filechecker tools for checking the naming compatibility for a set of files ready to be uploded on onedrive for bussiness. Using filechecker on network path (like \\server\folde) on folder that contains 400 files and 62 subfolders
-
Headphone jack got stuck in my apple mac pro
the headphone jack got stuck in my apple mac pro.. and they are saying i need to change the mother board .. is that true?