A special way of migration 2005-09-28 - By Gogala, Mladen
How many active/users/transactions you have in the database? I am running an OLTP database and in my case, it's not an exaggeration, at least not by much. Setting the transaction read-only ensures that all reads are consistent with respect to the certain point in time, usually the moment just before the transaction has begun. If there are any other transactions on the database, you need a consistent get, ie a get from the undo segment. If somebody wants to modify block you're reading, he or she has to copy it to an undo block. If you have any long-running transactions, as is the case with billing, you will get a huge amount of undo blocks. Of course, if your database is mostly read-only, you really can have just few blocks of undo space. For the most part, doing export with consistent=yes is inviting those lovely 1555 "snapshot too old" thingies that we all know and love. Of course, to add insult to the injury, there is a bug in 9.2.0.4 which can render your export unusable: 2666174 Export in direct path can product a corrupt export file if ORA-1555 (See ORA-1555.ora-code.com) occurs So, as far as I am concerned, "consistent=y" amounts to shooting myself in both feet. You go ahead and use it. Go ahead, make my data.
-- Mladen Gogala Ext. 121
-- --Original Message-- -- From: Mark Bole [mailto:makbo@(protected)] Sent: Wednesday, September 28, 2005 1:26 PM To: ORACLE-L@(protected) Subject: Re: A special way of migration
You stated that "The whole export will be read into undo segments". You further stated that setting consistent=y makes "the whole export 'repeatable'". These statements are mis-information.
An export, with or without consistent=y, does not consume previously unused undo space. (In fact, individual tables are always exported consistently regardless of the setting). Undo will be read as needed to create a read-consistent view of the data, just as they would for any transaction. If there is very little update activity in the database, then very little undo will need to be read.
I just started up a database and began a consistent=y export.
The export file is over 3 GB in size so far (still running).
Here is the undo usage, clearly it has nothing to do with the size of the export:
select begin_time, end_time, undoblks from v$undostat;
BEGIN_TIME END_TIME UNDOBLKS -- ---- ---- ------ -- ---- ---- ------ -- ---- -- 2005/09/28 10:14:11 2005/09/28 10:23:06 3 2005/09/28 10:04:11 2005/09/28 10:14:11 18
Gogala, Mladen wrote:
> Unfortunately, it's not a misinformation. With "consistent=y", you will > have > SET TRANSACTION READ ONLY as the first statement in the export. What > does this statement do you can read for yourself in the manual. It > wasn't an overuse of sarcasm. > > As far as logical backup goes, I would tend not to disagree, but it has > nothing to do with CONSISTENT=YES. This "read consistent export" can only > ensure consistency with respect to certain point in time if it builds a > read-consistent image of the database with respect to that point in time. > You have three guesses to guess which structures are used for building > such a consistent image. > So Mark, please read the fine manual before you accuse me of being > overly sarcastic. > > -- > Mladen Gogala > Ext. 121 >
-- Mark Bole http://www.bincomputing.com
-- http://www.freelists.org/webpage/oracle-l
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12"> <TITLE>RE: A special way of migration</TITLE> </HEAD> <BODY>
<P><FONT SIZE=2>How many active/users/transactions you have in the database? I am running</FONT> <BR><FONT SIZE=2>an OLTP database and in my case, it's not an exaggeration, at least not</FONT> <BR><FONT SIZE=2>by much. Setting the transaction read-only ensures that all reads are consistent with respect to the certain point in time, usually the moment </FONT></P>
<P><FONT SIZE=2>just before the transaction has begun. If there are any other transactions</FONT> <BR><FONT SIZE=2>on the database, you need a consistent get, ie a get from the undo segment.</FONT> <BR><FONT SIZE=2>If somebody wants to modify block you're reading, he or she has to copy it </FONT> <BR><FONT SIZE=2>to an undo block. If you have any long-running transactions, as is the</FONT> <BR><FONT SIZE=2>case with billing, you will get a huge amount of undo blocks. Of course, if</FONT> <BR><FONT SIZE=2>your database is mostly read-only, you really can have just few blocks of</FONT> <BR><FONT SIZE=2>undo space. For the most part, doing export with consistent =yes is inviting</FONT> <BR><FONT SIZE=2>those lovely 1555 "snapshot too old" thingies that we all know and love.</FONT> <BR><FONT SIZE=2>Of course, to add insult to the injury, there is a bug in 9.2 .0.4 which</FONT> <BR><FONT SIZE=2>can render your export unusable:</FONT> <BR><FONT SIZE=2>2666174 Export in direct path can product a corrupt export file if </FONT> <BR><FONT SIZE=2> ORA-1555 (See ORA-1555.ora-code.com) occurs</FONT> <BR><FONT SIZE=2>So, as far as I am concerned, "consistent=y" amounts to shooting myself in both feet. You go ahead and use it. Go ahead, make my data.</FONT></P>
<P><FONT SIZE=2>--</FONT> <BR><FONT SIZE=2>Mladen Gogala</FONT> <BR><FONT SIZE=2>Ext. 121</FONT> </P>
<P><FONT SIZE=2>-- --Original Message-- --</FONT> <BR><FONT SIZE=2>From: Mark Bole [<A HREF="mailto:makbo@(protected)">mailto :makbo@(protected)</A>] </FONT> <BR><FONT SIZE=2>Sent: Wednesday, September 28, 2005 1:26 PM</FONT> <BR><FONT SIZE=2>To: ORACLE-L@(protected)</FONT> <BR><FONT SIZE=2>Subject: Re: A special way of migration</FONT> </P>
<P><FONT SIZE=2>You stated that "The whole export will be read into undo segments". You </FONT> <BR><FONT SIZE=2>further stated that setting consistent=y makes "the whole export </FONT> <BR><FONT SIZE=2>'repeatable'". These statements are mis -information.</FONT> </P>
<P><FONT SIZE=2>An export, with or without consistent=y, does not consume previously </FONT> <BR><FONT SIZE=2>unused undo space. (In fact, individual tables are always exported </FONT> <BR><FONT SIZE=2>consistently regardless of the setting). Undo will be read as needed to </FONT> <BR><FONT SIZE=2>create a read-consistent view of the data, just as they would for any </FONT> <BR><FONT SIZE=2>transaction. If there is very little update activity in the database, </FONT> <BR><FONT SIZE=2>then very little undo will need to be read.</FONT> </P>
<P><FONT SIZE=2>I just started up a database and began a consistent=y export.< /FONT> </P>
<P><FONT SIZE=2>The export file is over 3 GB in size so far (still running).< /FONT> </P>
<P><FONT SIZE=2>Here is the undo usage, clearly it has nothing to do with the size of </FONT> <BR><FONT SIZE=2>the export:</FONT> </P>
<P><FONT SIZE=2>select begin_time, end_time, undoblks from v$undostat;</FONT> </P>
<P><FONT SIZE=2>BEGIN_TIME   ; END_TIME UNDOBLKS</FONT> <BR><FONT SIZE=2>-- ---- ---- ------ -- ---- ---- ------ -- ---- --</FONT> <BR><FONT SIZE=2>2005/09/28 10:14:11 2005/09/28 10:23:06   ; 3</FONT> <BR><FONT SIZE=2>2005/09/28 10:04:11 2005/09/28 10:14:11   ; 18</FONT> </P>
<P><FONT SIZE=2>Gogala, Mladen wrote:</FONT> </P>
<P><FONT SIZE=2>> Unfortunately, it's not a misinformation. With " ;consistent=y", you will </FONT> <BR><FONT SIZE=2>> have</FONT> <BR><FONT SIZE=2>> SET TRANSACTION READ ONLY as the first statement in the export. What </FONT> <BR><FONT SIZE=2>> does this statement do you can read for yourself in the manual. It </FONT> <BR><FONT SIZE=2>> wasn't an overuse of sarcasm.</FONT> <BR><FONT SIZE=2>> </FONT> <BR><FONT SIZE=2>> As far as logical backup goes, I would tend not to disagree, but it has </FONT> <BR><FONT SIZE=2>> nothing to do with CONSISTENT=YES. This "read consistent export" can only</FONT> <BR><FONT SIZE=2>> ensure consistency with respect to certain point in time if it builds a</FONT> <BR><FONT SIZE=2>> read-consistent image of the database with respect to that point in time.</FONT> <BR><FONT SIZE=2>> You have three guesses to guess which structures are used for building</FONT> <BR><FONT SIZE=2>> such a consistent image.</FONT> <BR><FONT SIZE=2>> So Mark, please read the fine manual before you accuse me of being </FONT> <BR><FONT SIZE=2>> overly sarcastic.</FONT> <BR><FONT SIZE=2>> </FONT> <BR><FONT SIZE=2>> -- </FONT> <BR><FONT SIZE=2>> Mladen Gogala</FONT> <BR><FONT SIZE=2>> Ext. 121</FONT> <BR><FONT SIZE=2>> </FONT> </P> <BR>
<P><FONT SIZE=2>-- </FONT> <BR><FONT SIZE=2>Mark Bole</FONT> <BR><FONT SIZE=2><A HREF="http://www.bincomputing.com" TARGET="_blank">http:/ /www.bincomputing.com</A></FONT> </P> <BR> <BR>
<P><FONT SIZE=2>--</FONT> <BR><FONT SIZE=2><A HREF="http://www.freelists.org/webpage/oracle-l" TARGET=" _blank">http://www.freelists.org/webpage/oracle-l</A></FONT> </P>
</BODY> </HTML>
|
|