<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for Boneist&#039;s Oracle Blog</title>
	<atom:link href="http://www.orchestrapit.co.uk/?feed=comments-rss2" rel="self" type="application/rss+xml" />
	<link>http://www.orchestrapit.co.uk</link>
	<description>The ramblings of an Oracle developer</description>
	<lastBuildDate>Thu, 22 Mar 2012 12:03:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>Comment on UKOUG2011 &#8211; Day 0 (Oak Table Sunday) by Gary Campbell</title>
		<link>http://www.orchestrapit.co.uk/?p=111#comment-1506</link>
		<dc:creator>Gary Campbell</dc:creator>
		<pubDate>Thu, 22 Mar 2012 12:03:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.orchestrapit.co.uk/?p=111#comment-1506</guid>
		<description>I started putting together a spreadhseet of values on the train this morning, that will show the differential times and the absolute times - that will help prove that the calculation is accurate &amp; returning expected numbers. My &#039;worry&#039; is that it might need some sequences / series type calculations - which I had to give some extra thought to when I did my OU maths course. Like i said, to be continued... G</description>
		<content:encoded><![CDATA[<p>I started putting together a spreadhseet of values on the train this morning, that will show the differential times and the absolute times &#8211; that will help prove that the calculation is accurate &amp; returning expected numbers. My &#8216;worry&#8217; is that it might need some sequences / series type calculations &#8211; which I had to give some extra thought to when I did my OU maths course. Like i said, to be continued&#8230; G</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on UKOUG2011 &#8211; Day 0 (Oak Table Sunday) by boneist</title>
		<link>http://www.orchestrapit.co.uk/?p=111#comment-1497</link>
		<dc:creator>boneist</dc:creator>
		<pubDate>Wed, 21 Mar 2012 14:04:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.orchestrapit.co.uk/?p=111#comment-1497</guid>
		<description>Hmm. Depends on what you&#039;re taking &quot;lag&quot; to mean, I guess.

I&#039;d have thought it would be &quot;How long will it take for the Standby db to catch up to where the Primary db is now?&quot;, which is what my calculation gives you.

I really don&#039;t think your colleague&#039;s query makes that much sense - what if the sby_blocks_s2 was the same as the prim_blocks_s1? That would give you a lag time of 0, when clearly Standby is still 20 blocks behind Primary!

Or worse, what if sby_blocks_s2 was less than prim_blocks_s1 - that&#039;d give you a negative lag time! What does that even mean?

I am now joining you in the Gumbyness. &quot;NURSE! NURSE! NURSE!&quot;</description>
		<content:encoded><![CDATA[<p>Hmm. Depends on what you&#8217;re taking &#8220;lag&#8221; to mean, I guess.</p>
<p>I&#8217;d have thought it would be &#8220;How long will it take for the Standby db to catch up to where the Primary db is now?&#8221;, which is what my calculation gives you.</p>
<p>I really don&#8217;t think your colleague&#8217;s query makes that much sense &#8211; what if the sby_blocks_s2 was the same as the prim_blocks_s1? That would give you a lag time of 0, when clearly Standby is still 20 blocks behind Primary!</p>
<p>Or worse, what if sby_blocks_s2 was less than prim_blocks_s1 &#8211; that&#8217;d give you a negative lag time! What does that even mean?</p>
<p>I am now joining you in the Gumbyness. &#8220;NURSE! NURSE! NURSE!&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on UKOUG2011 &#8211; Day 0 (Oak Table Sunday) by Gary Campbell</title>
		<link>http://www.orchestrapit.co.uk/?p=111#comment-1494</link>
		<dc:creator>Gary Campbell</dc:creator>
		<pubDate>Wed, 21 Mar 2012 12:23:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.orchestrapit.co.uk/?p=111#comment-1494</guid>
		<description>Continuing with the Monty Python theme - I feel like Mr Gumby (&quot;My head hurts!&quot;) I can see the logic of comparing it with the rate of processing, over a period, with the rate of the number remaining over that time. It&#039;s just that his implementation didn&#039;t seem to give the right output. I&#039;m going to run the queries again &amp; generate actual values and pump them in to both yours and the original. Thanks for taking the time to look at this - more soon! G</description>
		<content:encoded><![CDATA[<p>Continuing with the Monty Python theme &#8211; I feel like Mr Gumby (&#8220;My head hurts!&#8221;) I can see the logic of comparing it with the rate of processing, over a period, with the rate of the number remaining over that time. It&#8217;s just that his implementation didn&#8217;t seem to give the right output. I&#8217;m going to run the queries again &amp; generate actual values and pump them in to both yours and the original. Thanks for taking the time to look at this &#8211; more soon! G</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on UKOUG2011 &#8211; Day 0 (Oak Table Sunday) by Boneist</title>
		<link>http://www.orchestrapit.co.uk/?p=111#comment-1493</link>
		<dc:creator>Boneist</dc:creator>
		<pubDate>Wed, 21 Mar 2012 11:52:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.orchestrapit.co.uk/?p=111#comment-1493</guid>
		<description>Yeah, that sort of makes sense, although I&#039;m not sure it&#039;s correct - first find out the rate at which the blocks are written - observed time period / number of blocks written.

Then multiply that by the number of blocks outstanding, which I&#039;d say would be PRIM_BLOCKS_S2 - SBY_BLOCKS_S2.

I think my calculation would be:


Lag = (time_period * block_difference_at_end_of_time_period) / number_of_blocks_added_to_sby_across_the_time_period)


or in your case:


Lag = (sample_time * (prim_blocks_s2 - sby_blocks_s2)) / (sby_blocks_s2 - sby_blocks_21)
    = 10 * (120 - 110) / (110 - 88)
    = 10 * 10 / 22
    = 4.55 seconds

But perhaps that&#039;s just me; I&#039;m really not sure why your colleague went with PRIM_BLOCKS_S1-SBY_BLOCKS_S2!</description>
		<content:encoded><![CDATA[<p>Yeah, that sort of makes sense, although I&#8217;m not sure it&#8217;s correct &#8211; first find out the rate at which the blocks are written &#8211; observed time period / number of blocks written.</p>
<p>Then multiply that by the number of blocks outstanding, which I&#8217;d say would be PRIM_BLOCKS_S2 &#8211; SBY_BLOCKS_S2.</p>
<p>I think my calculation would be:</p>
<p>Lag = (time_period * block_difference_at_end_of_time_period) / number_of_blocks_added_to_sby_across_the_time_period)</p>
<p>or in your case:</p>
<p>Lag = (sample_time * (prim_blocks_s2 &#8211; sby_blocks_s2)) / (sby_blocks_s2 &#8211; sby_blocks_21)<br />
    = 10 * (120 &#8211; 110) / (110 &#8211; 88)<br />
    = 10 * 10 / 22<br />
    = 4.55 seconds</p>
<p>But perhaps that&#8217;s just me; I&#8217;m really not sure why your colleague went with PRIM_BLOCKS_S1-SBY_BLOCKS_S2!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on UKOUG2011 &#8211; Day 0 (Oak Table Sunday) by Gary Campbell</title>
		<link>http://www.orchestrapit.co.uk/?p=111#comment-1492</link>
		<dc:creator>Gary Campbell</dc:creator>
		<pubDate>Wed, 21 Mar 2012 11:11:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.orchestrapit.co.uk/?p=111#comment-1492</guid>
		<description>Oh no! My Twitter anonymity is blown!

So, this relates to Data Guard, but the concept is more general.

My colleague had written a very simple formula to work out the latency between blocks being generated on the Primary, versus being applied on Standby.

He takes two samples, 10 seconds apart(not very exact, as he uses PERL &#039;SLEEP&#039;) from both the primary and the standby using the following queries (ignore the block#s absolute values, STANDBY should always be less that PRIMARY):

PRIMARY:
select status, sequence#, block# from v$managed_standby where process =&#039;LGWR&#039;;
STATUS                SEQUENCE#     BLOCK#
-------------------- ---------- ----------
WRITING                   42223     946888

STANDBY
select status, sequence#, block#, blocks  from v$managed_standby where process like &#039;%MRP%&#039;;

STATUS        SEQUENCE#     BLOCK#     BLOCKS
------------ ---------- ---------- ----------
APPLYING_LOG      42223     949501    1024000

So for exmaple (with easier numbers):
S1 PRIMARY=100 STANDBY=88
S2 PRIMARY=120 STANDBY=110

Anyway, to work out the lag in seconds, he&#039;s used the following:
Lag=SampleTime/(SBY_BLOCKS_S1-SBY_BLOCKS_S2)*(PRIM_BLOCKS_S1-SBY_BLOCKS_S2)

Substituting the values:
Lag=10/(88-110)*(100-110)=10/(-22)*(-10)=0.45secs

Make sense / sound reasonable? If so, what&#039;s his reasoning?

G</description>
		<content:encoded><![CDATA[<p>Oh no! My Twitter anonymity is blown!</p>
<p>So, this relates to Data Guard, but the concept is more general.</p>
<p>My colleague had written a very simple formula to work out the latency between blocks being generated on the Primary, versus being applied on Standby.</p>
<p>He takes two samples, 10 seconds apart(not very exact, as he uses PERL &#8216;SLEEP&#8217;) from both the primary and the standby using the following queries (ignore the block#s absolute values, STANDBY should always be less that PRIMARY):</p>
<p>PRIMARY:<br />
select status, sequence#, block# from v$managed_standby where process =&#8217;LGWR&#8217;;<br />
STATUS                SEQUENCE#     BLOCK#<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<br />
WRITING                   42223     946888</p>
<p>STANDBY<br />
select status, sequence#, block#, blocks  from v$managed_standby where process like &#8216;%MRP%&#8217;;</p>
<p>STATUS        SEQUENCE#     BLOCK#     BLOCKS<br />
&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<br />
APPLYING_LOG      42223     949501    1024000</p>
<p>So for exmaple (with easier numbers):<br />
S1 PRIMARY=100 STANDBY=88<br />
S2 PRIMARY=120 STANDBY=110</p>
<p>Anyway, to work out the lag in seconds, he&#8217;s used the following:<br />
Lag=SampleTime/(SBY_BLOCKS_S1-SBY_BLOCKS_S2)*(PRIM_BLOCKS_S1-SBY_BLOCKS_S2)</p>
<p>Substituting the values:<br />
Lag=10/(88-110)*(100-110)=10/(-22)*(-10)=0.45secs</p>
<p>Make sense / sound reasonable? If so, what&#8217;s his reasoning?</p>
<p>G</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on UKOUG 2011 &#8211; Social stuff by Doug Burns</title>
		<link>http://www.orchestrapit.co.uk/?p=124#comment-343</link>
		<dc:creator>Doug Burns</dc:creator>
		<pubDate>Tue, 20 Dec 2011 08:58:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.orchestrapit.co.uk/?p=124#comment-343</guid>
		<description>&lt;i&gt;which was not long after I’d met Doug Burns and let him talk me into going!&lt;/i&gt;

Sorry, who are you? Are you a member of the Oak Table Network? I only ever talk to slightly-famous people, you know ... ;-)</description>
		<content:encoded><![CDATA[<p><i>which was not long after I’d met Doug Burns and let him talk me into going!</i></p>
<p>Sorry, who are you? Are you a member of the Oak Table Network? I only ever talk to slightly-famous people, you know &#8230; <img src='http://www.orchestrapit.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Dev or DBA? Where does the responsibility lie&#8230; by Tony Johnson</title>
		<link>http://www.orchestrapit.co.uk/?p=131#comment-338</link>
		<dc:creator>Tony Johnson</dc:creator>
		<pubDate>Mon, 19 Dec 2011 17:18:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.orchestrapit.co.uk/?p=131#comment-338</guid>
		<description>Agree with Tim and boneist in that there is no definitive line between and that there is a massive crossover between the APP and Operational side. There must be cooperation between and only then will the best solution for implementation be reached. In the instances where the DBA is not involved up front based on my experience you end up having db&#039;s that are difficult to manage and do not perform as expected. If the applications groups are insistent on the doing the physical design they must also be responsible for ALL performance issues. This rarely happens.</description>
		<content:encoded><![CDATA[<p>Agree with Tim and boneist in that there is no definitive line between and that there is a massive crossover between the APP and Operational side. There must be cooperation between and only then will the best solution for implementation be reached. In the instances where the DBA is not involved up front based on my experience you end up having db&#8217;s that are difficult to manage and do not perform as expected. If the applications groups are insistent on the doing the physical design they must also be responsible for ALL performance issues. This rarely happens.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Dev or DBA? Where does the responsibility lie&#8230; by boneist</title>
		<link>http://www.orchestrapit.co.uk/?p=131#comment-328</link>
		<dc:creator>boneist</dc:creator>
		<pubDate>Sat, 17 Dec 2011 19:25:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.orchestrapit.co.uk/?p=131#comment-328</guid>
		<description>&quot;If the developers are cool they will want to pick this up and it will be one less thing I have to do. If they are not cool they will ignore it and it will be my job.&quot; &lt;---- really? There are devs who don&#039;t care about how performant there code is? Huh. (That&#039;s probably really naiive of me, but I just don&#039;t think that way! Performance is key, IMHO!)

&quot;To me the DBA and developer roles have a massive crossover.&quot; -- definitely agree with this, although I&#039;m more than happy to leave the backups and restores etc to the DBAs *{;-)</description>
		<content:encoded><![CDATA[<p>&#8220;If the developers are cool they will want to pick this up and it will be one less thing I have to do. If they are not cool they will ignore it and it will be my job.&#8221; <&#8212;- really? There are devs who don&#8217;t care about how performant there code is? Huh. (That&#8217;s probably really naiive of me, but I just don&#8217;t think that way! Performance is key, IMHO!)</p>
<p>&#8220;To me the DBA and developer roles have a massive crossover.&#8221; &#8212; definitely agree with this, although I&#8217;m more than happy to leave the backups and restores etc to the DBAs *{;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Dev or DBA? Where does the responsibility lie&#8230; by boneist</title>
		<link>http://www.orchestrapit.co.uk/?p=131#comment-327</link>
		<dc:creator>boneist</dc:creator>
		<pubDate>Sat, 17 Dec 2011 19:13:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.orchestrapit.co.uk/?p=131#comment-327</guid>
		<description>&quot;The best solution, of course, is that they talk to each other.&quot;  -- oh, so true!

You&#039;re right; I think that my general disagreement with the statement that Michael Salt said is that it isn&#039;t just the DBA&#039;s or the Dev&#039;s responsibility to create indexes, it&#039;s not that clear cut. That plus the fact that I would automatically think about creating indexes as part of the development process!</description>
		<content:encoded><![CDATA[<p>&#8220;The best solution, of course, is that they talk to each other.&#8221;  &#8212; oh, so true!</p>
<p>You&#8217;re right; I think that my general disagreement with the statement that Michael Salt said is that it isn&#8217;t just the DBA&#8217;s or the Dev&#8217;s responsibility to create indexes, it&#8217;s not that clear cut. That plus the fact that I would automatically think about creating indexes as part of the development process!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Dev or DBA? Where does the responsibility lie&#8230; by boneist</title>
		<link>http://www.orchestrapit.co.uk/?p=131#comment-326</link>
		<dc:creator>boneist</dc:creator>
		<pubDate>Sat, 17 Dec 2011 19:06:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.orchestrapit.co.uk/?p=131#comment-326</guid>
		<description>Hey Raj! Good to hear from you *{:-D

You&#039;re right - it is a combination of the both; but I still think that devs should consider creating indexes as part of the development process... or is that just me?!</description>
		<content:encoded><![CDATA[<p>Hey Raj! Good to hear from you *{:-D</p>
<p>You&#8217;re right &#8211; it is a combination of the both; but I still think that devs should consider creating indexes as part of the development process&#8230; or is that just me?!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

