Home » RDBMS Server » Backup & Recovery » V$BACKUP_PIECE vs LIST BACKUP SUMMARY (oracle, 10g, windows 2003)
V$BACKUP_PIECE vs LIST BACKUP SUMMARY [message #567970] Mon, 08 October 2012 10:42 Go to next message
Karlia
Messages: 40
Registered: May 2011
Location: Algiers
Member
Hi everybody,

I tried to compare between the outputs of the RMAN COMMAND :
 list backup summary


and the results of, SQL command :
SELECT * FROM V$backup_piece where deleted='NO' 


I found much more rows in SQL command than in RMAN.

Can someone tell me what could mean the rows given by "V$BACKUP_PIECE" but not by RMAN?

Thanks.
Re: V$BACKUP_PIECE vs LIST BACKUP SUMMARY [message #568150 is a reply to message #567970] Tue, 09 October 2012 13:50 Go to previous messageGo to next message
Karlia
Messages: 40
Registered: May 2011
Location: Algiers
Member
No one !!!
Re: V$BACKUP_PIECE vs LIST BACKUP SUMMARY [message #568169 is a reply to message #568150] Wed, 10 October 2012 01:20 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
If you provide te outout of the commands, then perhaps someone can advise. It is hard to explain something one cannot see.
Re: V$BACKUP_PIECE vs LIST BACKUP SUMMARY [message #568245 is a reply to message #567970] Wed, 10 October 2012 06:09 Go to previous messageGo to next message
Karlia
Messages: 40
Registered: May 2011
Location: Algiers
Member
thank you John for the reply

Ok,I'll try to explain more ,

when i issue :

 
SELECT COUN(*) FROM V$BACKUP_PIECE where DELETED='NO';
 


it gives me :
 237 


but when i go to RMAN and issue :
 
LIST BACKUP SUMMARY;
 

i think that i shall the same number of rows , isn't it ?
but here, it gives me only : 181
where are the 56 row missed ?

for example , to be more precise , I will consider the backups that were done on august 31th, so
in sql :

select recid, set_stamp, set_count-7,status, completion_time, device_type , deleted from v$backup_piece
where deleted='NO' and completion_time between sysdate-41 and sysdate-40;

it gives :

1900	792724610	1438	A	31/08/12	DISK	NO
1901	792735310	1439	A	31/08/12	SBT_TAPE	NO
1902	792735567	1440	A	31/08/12	SBT_TAPE	NO
1903	792735872	1441	A	31/08/12	SBT_TAPE	NO
1904	792735888	1442	A	31/08/12	SBT_TAPE	NO


that means that there are five (05) BACKUPS completed on August the 31th and not yet deleted

but when i go to RMAN and issue :
RMAN> list backup summary completed between 'sysdate-41' and 'sysdate-40';


it gives :
List of Backups
===============
Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
1438    B  F  A DISK        31-AUG-12       1       1       NO         TAG20120831T011650
1440    B  F  A SBT_TAPE    31-AUG-12       1       1       NO         TAG20120831T041926
1442    B  F  A SBT_TAPE    31-AUG-12       1       1       NO         TAG20120831T042448


only three (03) rows !!! so, where are the tow (02) miessed rows ?
Re: V$BACKUP_PIECE vs LIST BACKUP SUMMARY [message #568249 is a reply to message #568245] Wed, 10 October 2012 06:15 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
I think you are confusing backupsets with backupset pieces. You might want to query v$backup_set.
Re: V$BACKUP_PIECE vs LIST BACKUP SUMMARY [message #568256 is a reply to message #567970] Wed, 10 October 2012 06:40 Go to previous messageGo to next message
Karlia
Messages: 40
Registered: May 2011
Location: Algiers
Member
No , i don't think so, with V$BACKUP_SET things are worse, it gives me more rows than V$BACKUP_PIECE, look :


select count(*) from v$backup_set s, v$backup_piece p where s.set_stamp =p.set_stamp and deleted='NO' ;


gives also :

237 rows 
instead of the 181 given by RMAN !
Re: V$BACKUP_PIECE vs LIST BACKUP SUMMARY [message #568257 is a reply to message #568256] Wed, 10 October 2012 06:44 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
gives also :


Of course as you join with v$backup_piece you can't have a different number of rows.

Regards
Michel
Re: V$BACKUP_PIECE vs LIST BACKUP SUMMARY [message #568275 is a reply to message #567970] Wed, 10 October 2012 08:02 Go to previous messageGo to next message
Karlia
Messages: 40
Registered: May 2011
Location: Algiers
Member
thanks Michel

Quote:
Of course as you join with v$backup_piece you can't have a different number of rows.


Yes, that is what i wanted to say to John, that V$BACKUP_PIECE and V$BACKUP_SET give info about the same set of rows !

any way !

I'll try to summarize my question :

is it normal that V$BACKUP_PIECE gives information about backups that are not marked DELETED (DELETED='NO')
but indeed, they are DELETED, i.e when we go to RMAN we don't find them ?


I hope now , my question is more clear.

Re: V$BACKUP_PIECE vs LIST BACKUP SUMMARY [message #568277 is a reply to message #568275] Wed, 10 October 2012 08:12 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
I can't simulate what you are seeing. The primary key to foreign key join columns of v$backup_set to v$backup_piece are SET_STAMP and SET_COUNT, do you really have rows in v$backup_piece that do not have a parent row in v$backup_set?
Re: V$BACKUP_PIECE vs LIST BACKUP SUMMARY [message #568287 is a reply to message #567970] Wed, 10 October 2012 09:10 Go to previous messageGo to next message
Karlia
Messages: 40
Registered: May 2011
Location: Algiers
Member
Thank you John,

But , i don't know why do you insist on V$BACKUP_SET!

my quesion is about V$BACKUP_PIECE , and i can it make shorter :

V$BACKUP_PIECE, what is it used for ?


However, i can tell you that in my situation V$BACKUP_SET and V$BACKUP_PIECE can be joined by , their SET_STAMP column(S), for both of them
and they are refering the same rows , but with different other information.
Re: V$BACKUP_PIECE vs LIST BACKUP SUMMARY [message #568288 is a reply to message #568287] Wed, 10 October 2012 09:18 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Quote:
But , i don't know why do you insist on V$BACKUP_SET!
Your RMAN command LIST BACKUP SUMMARY is almost certainly running a query that joins v$backup_set to v$backup_piece, but we don't know what that query is. So in order to reconcile what RMAN tells you with what the views against the repository tell you, you have to guess at what the query is: try to reverse engineer it. Otherwise you will never be able resolve the apparent contradiction. Because that is probably what your problem is: understanding what those views really mean and how RMAN is presenting the information.
It is unlikely (though always possible) that you have a corrupted RMAN repository.
Re: V$BACKUP_PIECE vs LIST BACKUP SUMMARY [message #568290 is a reply to message #568287] Wed, 10 October 2012 09:20 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
On re-reading your post, I think you perhaps are not clear on what a backupset is, and what a backup piece is. Can you define them?
Re: V$BACKUP_PIECE vs LIST BACKUP SUMMARY [message #568298 is a reply to message #567970] Wed, 10 October 2012 10:25 Go to previous messageGo to next message
Karlia
Messages: 40
Registered: May 2011
Location: Algiers
Member
Quote:
On re-reading your post, I think you perhaps are not clear on what a backupset is, and what a backup piece is. Can you define them?


Yes, indeed, i don't see what is exactly different between BACKUPSET and BACKUPPIECE, but is this the reason that V$BACKUP_PIECE is refercing rows that don't exist in RMAN and for which DELETE='NO' ?


means :

RMAN says : they are DELETED,
V$BACKUP_PIECE says : they are NOT DELETED YET
Re: V$BACKUP_PIECE vs LIST BACKUP SUMMARY [message #568300 is a reply to message #568298] Wed, 10 October 2012 10:56 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
A backupset is a logical structure. It defines a backup operation, which will generate one or more physical files: these are the backup pieces. I hate to say this, but I think you need read the docs
http://docs.oracle.com/cd/E11882_01/backup.112/e10642/toc.htm
to understand what is going on.
Re: V$BACKUP_PIECE vs LIST BACKUP SUMMARY [message #568306 is a reply to message #568298] Wed, 10 October 2012 11:13 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I have a small question: was you connected to a RMAN catalog catalog when you execute your LIST command?

Regards
Michel
Re: V$BACKUP_PIECE vs LIST BACKUP SUMMARY [message #568307 is a reply to message #568300] Wed, 10 October 2012 11:15 Go to previous messageGo to next message
Karlia
Messages: 40
Registered: May 2011
Location: Algiers
Member
Ok, thanks for this great definition

Quote:
A backupset is a logical structure. It defines a backup operation, which will generate one or more physical files: these are the
backup pieces.


and this :

Quote:
one or more physical files: these are the backup pieces


is exactly what is given by V$BACKUP_PIECE,

but the problem is why some of these pieces are referenced in V$BACKUP_PIECE whith DELETED='YES' but are absent in the pieces displayed in "LIST BACKUP SUMMARY" RMAN command ?

Re: V$BACKUP_PIECE vs LIST BACKUP SUMMARY [message #568309 is a reply to message #568307] Wed, 10 October 2012 11:17 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
In case you didn't see my post posted when you was writing yours:

Michel Cadot wrote on Wed, 10 October 2012 18:13
I have a small question: was you connected to a RMAN catalog catalog when you execute your LIST command?

Regards
Michel

Re: V$BACKUP_PIECE vs LIST BACKUP SUMMARY [message #568313 is a reply to message #568309] Wed, 10 October 2012 11:36 Go to previous message
Karlia
Messages: 40
Registered: May 2011
Location: Algiers
Member
There is no db dedicated to RMAN catalog, so the catalog here is controlfile

Sorry Michel i didn't see your question at time!
Previous Topic: OCIServerAttach returns ORA-1034 , even if database is up and running
Next Topic: Question regarding full backup strategy
Goto Forum:
  


Current Time: Fri Mar 29 10:41:39 CDT 2024