<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" 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/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>The Pythian Blog</title>
	
	<link>http://www.pythian.com/news</link>
	<description>News and views from Pythian DBAs</description>
	<lastBuildDate>Fri, 20 Nov 2009 22:53:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/PythianGroupBlog" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Blogrotate #7: The Weekly Roundup of News for System Administrators</title>
		<link>http://feedproxy.google.com/~r/PythianGroupBlog/~3/A27Zvo0mgeM/</link>
		<comments>http://www.pythian.com/news/5575/blogrotate-7-the-weekly-roundup-of-news-for-system-administrators/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 20:15:28 +0000</pubDate>
		<dc:creator>Brad Hudson</dc:creator>
				<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Technical Blog]]></category>
		<category><![CDATA[Blogrotate]]></category>
		<category><![CDATA[Chrome OS]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[gnu]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[gpl]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.pythian.com/news/?p=5575</guid>
		<description><![CDATA[Is it Friday already?  Where has the week gone?  Whatever, we&#8217;ve got lots of good news tidbits for you this week, including several follow-ups to previous stories.  Enough jaw-jacking, let&#8217;s get to the news.
Operating Systems
This week we got an early alpha of Google Chrome OS, which is slated for full release sometime [...]]]></description>
			<content:encoded><![CDATA[<p>Is it Friday already?  Where has the week gone?  Whatever, we&#8217;ve got lots of good news tidbits for you this week, including several follow-ups to previous stories.  Enough jaw-jacking, let&#8217;s get to the news.</p>
<h3>Operating Systems</h3>
<p>This week we got an early alpha of <a href="http://www.google.com">Google</a> Chrome OS, which is slated for full release sometime in Q4 of 2010.  <a href="http://blogs.zdnet.com">ZDNet blogs</a>  and <a href="http://arstechnica.com">Ars technica</a> have three good first looks at Chrome.  First up is <a href="http://blogs.zdnet.com/bio.php#hughes">Adrian Kingsley-Hughes</a> article <a href="http://blogs.zdnet.com/hardware/?p=6258&#038;tag=content;col1">Chrome OS &#8211; The good, the bad and the ugly, and how it fits in with Windows, Mac and Linux</a>.</p>
<p>For a more security related view, <a href="http://blogs.zdnet.com/bio.php#naraine">Ryan Naraine</a> has an early look into Chrome OS security with <a href="http://blogs.zdnet.com/security/?p=4969&#038;tag=content;col1">Inside the Google Chrome OS security model</a>.</p>
<p>Lastly, <a href="http://arstechnica.com/author/jon-stokes/">Jon Stokes</a> at <a href="http://arstechnica.com">Ars Technica</a> has his own first look with screenshots in <a href="http://arstechnica.com/open-source/news/2009/11/chromeos-announcement.ars?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss">Chrome OS: Internet failing at PC &gt; PC failing at Internet</a>.<br />
<span id="more-5575"></span></p>
<p>There&#8217;s a new <a href="http://fedoraproject.org/">Fedora</a> in town.  The popular Linux desktop put out by <a href="http://www.redhat.com">Red Hat</a> released its newest version.  <a href="http://www.pythian.com/news/author/fraser/">Bill</a> has gone crazy for Fedora articles today, so here&#8217;s a point form list of what he found.</p>
<ul>
<li><a href="http://fedoraproject.org/wiki/Fedora_12_Announcement">Fedora 12 Release Announcement</a>.  The announcement has links to the feature list, release notes, download page, etc.
</li>
<li>The Red Hat press release about Fedora 12 called <a href="http://www.redhat.com/about/news/prarchive/2009/fedora-12.html">Fedora 12 Unites Latest Features and Usability Into Compelling Free Distribution</a>.</li>
<li><a href="http://arstechnica.com/open-source/news/2009/11/tip-of-the-hat-fedora-12-a-strong-update.ars?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss">Tip of the hat: Fedora 12 a strong update</a> by <a href="http://arstechnica.com/author/ryan-paul/">Ryan Paul</a> goes through some initial impressions of Fedora 12 and what it brings to the table.
</li>
<li><a href="http://www.linux-mag.com/author/720">Christopher Smart</a> at <a href="http://www.linux-mag.com/cache/7618/1.html?utm_source=feedburner&#038;utm_medium=feed&#038;utm_campaign=Feed%253A+LinuxMagazine+%2528Linux+Magazine%253A+Top+Stories%2529">Linux Magazine</a> has his own first look in <a href="http://www.linux-mag.com/cache/7618/1.html?utm_source=feedburner&#038;utm_medium=feed&#038;utm_campaign=Feed%253A+LinuxMagazine+%2528Linux+Magazine%253A+Top+Stories%2529">Fedora, Still Pushing The Envelope</a>.
</li>
<li>And finally the first major bug has been reported and fixed in Fedora 12.  <a href="http://lwn.net/Articles/362592/rss">Fedora 12 lets unprivileged users install packages</a> has the initial information about the bug,  and <a href="https://www.redhat.com/archives/fedora-announce-list/2009-November/msg00012.html">PackageKit change</a> has information on the fix.
</li>
</ul>
<p>Have you ever wondered just how much you can take out of Windows and still have a usable system?  The Minwin project set out to find that out for you.  <a href="http://arstechnica.com/author/ohrmazd/">Warren Rumak</a> discusses Minwin and what it&#8217;s all about in <a href="http://arstechnica.com/microsoft/news/2009/11/inside-minwin-the-windows-7-kernel-slims-down.ars">Inside &#8220;MinWin&#8221;: the Windows 7 kernel slims down</a>.</p>
<h3>Data Centers</h3>
<p><a href="http://slashdot.org/~ScuttleMonkey/">Scuttlemonkey</a> at <a href="http://slashdot.org">SlashDot</a> posted a question about how to evaluate a datacenter.  This question has elicited a flurry of discussion on the topic with some good (and bad) stories, but buried inside are many good thoughts on criteria that would be useful in any evaluation.  Read more in &#8220;<a href="http://it.slashdot.org/story/09/11/09/1953241/How-Do-You-Evaluate-a-Data-Center">How Do You Evaluate a Data Center?</a>&#8220;.</p>
<p><a href="http://www.datacenterknowledge.com">Data Center Knowledge</a> has an interesting article by Kevin Normandeau.  It&#8217;s all about how a greener datacenter can pay off in the long run.  &#8220;&#8230;Amazon, Toyota, and Nike, have realized that focusing on limiting energy calories in the datacenter and elsewhere pays profitability dividends on the financial side&#8221; says the article, which draws on a <a href="http://whitepapers.datacenterknowledge.com/whitepaper6924/">whitepaper from IDC</a> on the subject.</p>
<p>Also at <a href="http://www.datacenterknowledge.com">Data Center Knowledge</a>, Rick Miller has a note about Rackspace expanding its headquarters with a new 120,000 square foot expansion.  See <a href="http://www.datacenterknowledge.com/archives/2009/11/16/rackspace-expands-its-headquarters/">Rackspace Expands Its Headquarters</a> for more, and a video tour of one of their offices.</p>
<h3>Hardware</h3>
<p><a href="http://news.cnet.com">Cnet news</a> has an article about the recently released <a href="http://www.squaretrade.com">Square Trade</a> survey of laptop reliability.   Square Trade is a warranty provider who offer coverage for many brands of laptops so they should know.  See <a href="http://news.cnet.com/8301-17938_105-10400447-1.html">Who makes the most reliable laptops</a> for some excerpts from the report, and the full report can be found in <a href="http://www.squaretrade.com/pages/laptop-reliability-1109">PDF format</a> from the Square Trade website.</p>
<h3>Security</h3>
<p>A follow up from last week regarding the Microsoft &#8220;sudo&#8221; patent.  According to <a href="http://arstechnica.com/author/ryan-paul/">Ryan Paul</a> this patent does not cover sudo at all.  Read more about it in <a href="http://arstechnica.com/open-source/news/2009/11/microsofts-psuedo-sudo-patent-doesnt-really-cover-sudo.ars?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss">Microsoft&#8217;s pseudo sudo patent doesn&#8217;t really cover sudo</a>.</p>
<p>A follow up to a post from a couple of weeks ago&#8212;there is now an exploit for the mentioned SSL/TLS attack vector. <a href="http://search.theregister.co.uk/?author=Dan%20Goodin">Dan Goodin</a> at <a href="http://theregister.co.uk">The Register</a> has more in his article <a href="http://www.theregister.co.uk/2009/11/14/ssl_renegotiation_bug_exploited/">Researcher busts into Twitter via SSL reneg hole</a>.  More technical details on the exploit can be found in <a href="http://www.educatedguesswork.org/2009/11/understanding_the_tls_renegoti.html">Understanding the TLS Renegotiation Attack</a>.</p>
<h3>Software</h3>
<p>A follow up to last week&#8217;s article, <a href="http://www.microsoft.com">Microsoft</a> confirms the Windows 7 USB/DVD download tool contained GPLv2 code and has indicated that they will provide the source/binaries for the tool under the GPL.  <a href="http://port25.technet.com/members/Peter-Galli.aspx">Peter Galli </a>from Microsoft&#8217;s Open Source division has more in <a href="http://port25.technet.com/archive/2009/11/13/update-on-the-windows-7-download-tool-or-microsoft-to-open-source-the-windows-7-download-tool.aspx">Update on the Windows 7 USB/DVD Tool</a>.</p>
<h3>Internet</h3>
<p>The UN-backed Internet Governance Forum was on last week in Egypt.  One of the hot topics was ownership of the DNS root domain, which is currently controlled by the US.  This made sense when the internet was only in the US universities, but with the global nature of the &#8216;Net, there is no good reason for a single country to have control of something that controls the basic functionality of the internet.  <a href="http://arstechnica.com/author/nate-anderson/">Janna Quitney Anderson</a> has more in  <a href="http://arstechnica.com/tech-policy/news/2009/11/igf-2009-america-surrender-the-root-zone-file.ars">IGF attendees: America, surrender the root zone file!</a></p>
<h3>Virtualization</h3>
<p>A follow-up review on <a href="http://www.vmware.com/products/fusion/">VMWare Fusion 3</a>, running Windows 7 in OSX.  <a href="http://arstechnica.com/author/dave-girard/">Dave Girard</a> has put Fusion through its paces; read about his results in <a href="http://arstechnica.com/apple/news/2009/11/vmware-fusion-3-review.ars">Running Windows 7 under OS X: Ars reviews VMware Fusion 3</a>.</p>
<p>That&#8217;ll do it for this week&#8217;s edition.  As always feel free to add your own news or perspective in the comments.  See y&#8217;all next week!</p>
<img src="http://feeds.feedburner.com/~r/PythianGroupBlog/~4/A27Zvo0mgeM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.pythian.com/news/5575/blogrotate-7-the-weekly-roundup-of-news-for-system-administrators/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.pythian.com/news/5575/blogrotate-7-the-weekly-roundup-of-news-for-system-administrators/</feedburner:origLink></item>
		<item>
		<title>Log Buffer #170: a Carnival of the Vanities for DBAs</title>
		<link>http://feedproxy.google.com/~r/PythianGroupBlog/~3/VRBw5SHxYtE/</link>
		<comments>http://www.pythian.com/news/5567/log-buffer-170-a-carnival-of-the-vanities-for-dbas/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 17:44:45 +0000</pubDate>
		<dc:creator>David Edwards</dc:creator>
				<category><![CDATA[Log Buffer]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Technical Blog]]></category>

		<guid isPermaLink="false">http://www.pythian.com/news/?p=5567</guid>
		<description><![CDATA[This is the 170th edition of Log Buffer, the weekly review of database blogs. Welcome. Let&#8217;s kick off this week with a double-helping of&#160;.&#160;.&#160;.&#160;
SQL Server
There are lots of good technical posts this week.  The SSIS Junkie has some observations and a straw poll on sort transform arbitration. He writes, &#8220;This post was prompted by [...]]]></description>
			<content:encoded><![CDATA[<p>This is the 170<sup>th</sup> edition of <a href="http://www.pythian.com/news/about-log-buffer"><em>Log Buffer</em></a>, the weekly review of database blogs. Welcome. Let&#8217;s kick off this week with a double-helping of&nbsp;.&nbsp;.&nbsp;.&nbsp;</p>
<h3>SQL Server</h3>
<p>There are lots of good technical posts this week.  <a href="http://sqlblog.com/blogs/jamie_thomson">The SSIS Junkie</a> has some observations and a straw poll on <a href="http://sqlblog.com/blogs/jamie_thomson/archive/2009/11/12/sort-transform-arbitration-ssis.aspx">sort transform arbitration</a>. He writes, &#8220;This post was prompted by a thread on the MSDN SSIS forum today where the poster was asking how he could replicate the behaviour of SSIS’s Sort transform using T-SQL, specifically he wanted to know how the Sort transform chooses what data to pass through when the &#8216;Remove Duplicates&#8217; option is checked.&#8221;</p>
<p>Another poll, courtesy of <a href="http://sqlblog.com/blogs/tibor_karaszi"><strong>Tibor Karaszi</strong></a>: <a href="http://sqlblog.com/blogs/tibor_karaszi/archive/2009/11/18/do-you-perform-log-backup-for-the-model-database.aspx">do you perform log backup for the model database?</a></p>
<p><a href="http://sqlblog.com/blogs/eric_johnson"><strong>Eric Johnson</strong></a> has a lesson in <a href="http://sqlblog.com/blogs/eric_johnson/archive/2009/11/13/ssis-2008-looping-through-rows-in-a-table.aspx">looping through rows in a table in SSIS 2008</a>, which begins, &#8220;When writing code against a SQL Server, as we usually are doing in SSIS Packages, you often need to iterate over all the rows in a table. This can be done using an SSIS Foreach Loop Container, but the how is not obvious.&#8221;</p>
<p><a href="http://www.simple-talk.com/community/blogs/tony_davis">Simple-Talk&#8217;s <strong>Tony Davis</strong></a> wonders, <a href="http://www.simple-talk.com/community/blogs/tony_davis/archive/2009/11/13/76413.aspx">Do Scalar UDFs give SQL Server a Bad Name?</a> &#8220;Many developers seem to regard SQL Server as if it were a science-fiction alien planet where unsuspecting crew-members in blue jumpers occasionally die horribly; everything is suddenly unsafe, and potentially malicious: nothing really works properly and so any serious code should be kept well away from it. Is this developer ignorance, or is their fear justified?&#8221;</p>
<p>From <a href="http://sqlblog.com/blogs/merrill_aldrich"><strong>Merrill Aldrich</strong></a> comes a <a href="http://sqlblog.com/blogs/merrill_aldrich/archive/2009/11/17/trick-question-part-quattro.aspx">trick question  &#8212; part quattro</a>. Spoiler: TPH is an evil trap.  As a commenter says: &#8220;Very interesting, I&#8217;ve never heard this vehement an argument against TPH before.&#8221;</p>
<p><span id="more-5567"></span></p>
<p><a href="http://weblogs.sqlteam.com/peterl">Thinking outside the box</a> lets us in on <a href="http://weblogs.sqlteam.com/peterl/archive/2009/11/12/How-to-tell-if-you-are-running-in-a-virtual.aspx">how to tell if you are running on a virtual environment</a>, with a handy little bit of code.</p>
<p><a href="http://sqlblog.com/blogs/kalen_delaney"><strong>Kalen Delaney</strong></a> elucidates <a href="http://sqlblog.com/blogs/kalen_delaney/archive/2009/11/13/update-locks.aspx">UPDATE Locks</a>, &#8220;&nbsp;.&nbsp;.&nbsp;.&nbsp;a hybrid of SHARED and EXCLUSIVE locks. [Contrary] to what you might think, UPDATE locks are not just acquired for UPDATE operations.&#8221;</p>
<p><a href="http://www.stephenforte.net"><strong>Stephen Forte</strong></a> shows how <a href="http://www.stephenforte.net/PermaLink,guid,5e0d935e-694d-4532-9c2f-610aa45039fa.aspx">SQL Server R2 Does SQL Azure</a>.  </p>
<p>Now that <strong>PASS 2009</strong> in Seattle, Washington has passed, it&#8217;s time to fondly look back on it. <a href="http://kendalvandyke.blogspot.com"><strong>Kendal Van Dyke</strong></a> shares his experiences and some photos in <a href="http://kendalvandyke.blogspot.com/2009/11/looking-back-pass-summit-2009-day-4.html">Looking Back – PASS Summit 2009 Day 4</a>.</p>
<p><a href="http://sqlblog.com/blogs/jonathan_kehayias"><strong>The Rambling DBA</strong></a>, <strong>Jonathan Kehayias</strong> does so with <a href="http://sqlblog.com/blogs/jonathan_kehayias/archive/2009/11/12/the-benefits-of-attending-pass-realized.aspx">the benefits of attending PASS realized</a>: &#8220;&nbsp;.&nbsp;.&nbsp;.&nbsp;as a testament to the value of attending this conference the very first session I attended, diagnosed and provided information for a problem that has existed in one of my servers for many weeks but was impossible to diagnose unless you knew what you were looking at.&#8221;</p>
<p><strong>Thomas LaRock</strong>, <a href="http://thomaslarock.com">SQL Rockstar</a> concurs: <a href="http://thomaslarock.com/2009/11/the-highlander">&#8220;If you want to grow your skills, then you need to connect, learn, and share with others. And there is no better place to do that than at PASS.&#8221;</a></p>
<p>Not that PASS was the only game in town. Just down the coast a bit, <a href="http://www.xaprb.com/blog"><strong>Baron Schwartz</strong></a> gives his <a href="http://www.xaprb.com/blog/2009/11/17/recap-of-portland-opensql-camp-2009/">recap of Portland OpenSQL Camp 2009</a>.</p>
<p><a href="http://www.chesnok.com/daily"><strong>Selena Marie Deckelmann</strong></a> reports that <a href="http://www.chesnok.com/daily/2009/11/16/opensqlcamp-was-awesome">OpenSQLCamp was awesome!</a></p>
<h3>PostgreSQL</h3>
<p><a href="http://okbob.blogspot.com"><strong>Pavel Stehule</strong></a> has some news of <a href="http://okbob.blogspot.com/2009/11/longtime-plpgsql-misfeature-removed.html">a longtime plpgsql misfeature removed</a>. He writes, &#8220;plpgsql is good language &#8211; simple, robust with good error diagnostic. But it had one bizarre behave. plpgsql connects two worlds &#8211; procedural ADA like code and SQL statements. Usually there are not problems. But there are one exception &#8211; collision of identifiers.&#8221;</p>
<p>In the latest in his <a href="http://www.depesz.com/index.php/tag/pg85/"><em>Waiting for 8.5</em></a> series, <a href="http://www.depesz.com"><strong>Hubert Lubacziewski</strong></a> introduces and tests something new: <a href="http://www.depesz.com/index.php/2009/11/18/waiting-for-8-5-triggers-on-columns">TRIGGERS on columns</a>.</p>
<h3>MySQL</h3>
<p>On <a href="http://code.openark.org/blog">code.openark.org</a>, <strong>Shlomi Noach</strong> is surprised by <a href="http://code.openark.org/blog/mysql/questions-or-queries">questions or queries</a>. He writes, &#8220;I was used to checking for the &#8216;questions&#8217; global status variables&nbsp;.&nbsp;.&nbsp;.&nbsp; So, for example, I could run com_select/questions to learn the SELECT ratio out of all queries. &nbsp;.&nbsp;.&nbsp;.&nbsp; Apparently, as of 5.0.72-5.0.76 &#038; 5.1.31 this has changed. A new status variable was introduced, called &#8216;queries&#8217;.&#8221;  What&#8217;s the difference? Is this good or bad?  Shlomi and his readers kick it around.</p>
<p><a href="http://venublog.com"><strong>Venu Anuganti</strong></a> also was surprised, in his case by <a href="http://venublog.com/2009/11/17/innodb-tablespace-corruption">InnoDB Tablespace Corruption</a>: &#8220;When&nbsp;.&nbsp;.&nbsp;.&nbsp;InnoDB crashes, it automatically recovers during the next start by rolling back/forward based on what was pending and un-flushed/un-committed changes at the time of crash. &nbsp;.&nbsp;.&nbsp;.&nbsp;  [On] one of the servers; we ran out of disk space&nbsp;.&nbsp;.&nbsp;.&nbsp;on data directory&nbsp;.&nbsp;.&nbsp;.&nbsp;and server was running for few hours in this mode&nbsp;.&nbsp;.&nbsp;.&nbsp; [It] became un-available and not responding after a while. Only option left was to kill the server process and its PID along with cleaning the stuff to get the space back. After I (re)started the server&nbsp;.&nbsp;.&nbsp;.&nbsp; the tablespace is corrupted.&#8221;</p>
<p>From <a href="http://www.adaniels.nl/articles"><strong>Arnold Daniels</strong></a> comes a version of <a href="http://www.adaniels.nl/articles/versioning-mysql-data">versioning MySQL data</a>, which Arnold introduces thus: &#8220;&nbsp;.&nbsp;.&nbsp;.&nbsp;You’re probably using a versioning control system&nbsp;.&nbsp;.&nbsp;.&nbsp;to safeguard your data. Advantages of using a VCS are that you can walk to the individual changes for a document, see who made each change and revert back to specific revision if needed. These are features which would also be nice for data stored in a database. With the use of triggers we can implement versioning for data stored in a MySQL db.&#8221; Example code follows.</p>
<p>On <a href="http://www.mysqlperformanceblog.com">the MySQL Perfomance Blog</a>, <strong>Morgan Tocker</strong> qualifies his earlier piece on why you don’t want to shard: &#8220;What I didn’t mention was that if you’ve established that you will need to eventually shard, is it better to just get it out of the way early?  My answer is almost always no. That is to say I disagree with a statement I’ve been hearing recently; <a href="http://www.mysqlperformanceblog.com/2009/11/16/shard-early-shard-often">&#8217;shard early, shard often&#8217;</a>&#8221;</p>
<p>Morgan also mentions that <a href="http://www.mysqlperformanceblog.com/2009/11/16/interviews-for-infinidb-and-tokudb-are-next">interviews for InfiniDB and TokuDB are next</a>: &#8220;I’d like to announce that <strong>Robert Dempsey</strong> (InfiniDB storage engine) and <strong>Bradley C. Kuszmaul</strong> (TokuDB storage engine) have also accepted an interview. If you have any questions about either storage engine, please post them here by Friday 20th November.&#8221;</p>
<p>Here&#8217;s a new blog to watch, particularly if you&#8217;re new to MySQL or Drizzle: <strong>Kent Bozlinski&#8217;s</strong> <a href="http://www.learningdrizzle.com">Learning Drizzle</a>.  Kent says, &#8220;I’m not really scared of rain after living in Seattle for seven years. I am a little scared of sticking my neck out and writing about something which (for the moment) I know almost nothing about.&#8221; The post is <a href="http://www.learningdrizzle.com/?p=3">Drizzle is Scary (A Little)</a>.</p>
<h3>Oracle</h3>
<p>Maybe you&#8217;ve already heard about the fabulous unpopularity of the new My Oracle Support. <a href="http://optimaldba.blogspot.com"><strong>Daniel Fink</strong></a> comes back with some data and commentary on just that, with his <a href="http://optimaldba.blogspot.com/2009/11/my-oracle-support-survey-results.html">My Oracle Support Survey Results</a>. </p>
<p><a href="http://richardfoote.wordpress.com"><strong>Richard Foote</strong></a> asks, <a href="http://richardfoote.wordpress.com/2009/11/12/1094">An index only performs how much work???</a>, the result of looking into exactly why index rebuilds can improve performance so significantly.</p>
<p><a href="http://kerryosborne.oracle-guy.com"><strong>Kerry Osborne</strong></a> gives a lesson on <a href="http://kerryosborne.oracle-guy.com/2009/11/fixing-bad-index-hints-in-sql-profiles-automatically">fixing bad index hints in SQL Profiles (automatically)</a>.  He says, &#8220;With 10g and 11g, it appears the goal [or Outlines] has swung away from the “locking” concept and towards allowing the optimizer more flexibility. &nbsp;.&nbsp;.&nbsp;.&nbsp;I must say that I find this decision to be irritating at best. &nbsp;.&nbsp;.&nbsp;.&nbsp; One of the main offenders in this regard is the use of a new format available for index hints as of 10g.&#8221;</p>
<p><a href="http://optimizermagic.blogspot.com">Inside the Oracle Optimizer</a> covers similar turf in answering to the question, <a href="http://optimizermagic.blogspot.com/2009/11/what-should-i-do-with-old-hints-in-my.html">What should I do with old hints in my workload?</a>, or more specifically, &#8220;When moving from 10g to 11g, should hints in existing SQL be removed?&#8221;</p>
<p><a href="http://tkyte.blogspot.com"><strong>Tom Kyte</strong></a> wants your opinions on <a href="http://tkyte.blogspot.com/2009/11/comparative-window-functions.html">comparative window functions</a>: &#8220;&nbsp;.&nbsp;.&nbsp;.&nbsp;they could be getting better in the near future. &nbsp;.&nbsp;.&nbsp;.&nbsp;analytics [could be allowed] to access the current row value to be compared against any other row value in a defined window. &nbsp;.&nbsp;.&nbsp;.&nbsp; I&#8217;ve already supplied them with my feedback (which started with &#8220;this is an awesome idea&#8221;) &#8211; and you can too &#8211; by posting it here. They&#8217;ll be checking back to see what you say.&#8221;</p>
<p>If you like staying on top of fresh things, perhaps <a href="http://only4left.jpiwowar.com"><strong>John Piwowar&#8217;s</strong></a> method of <a href="http://only4left.jpiwowar.com/2009/02/retrieving-oracle-patches-with-wget">retrieving Oracle patches with wget</a> would also appeal to you.</p>
<p>And that is all for now. If you think I&#8217;ve missed a worthwhile DB blog from this week, please mention it in a comment.</p>
<p><em>Log Buffer</em> will be back in a week&#8217;s time.  See you then!</p>
<img src="http://feeds.feedburner.com/~r/PythianGroupBlog/~4/VRBw5SHxYtE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.pythian.com/news/5567/log-buffer-170-a-carnival-of-the-vanities-for-dbas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.pythian.com/news/5567/log-buffer-170-a-carnival-of-the-vanities-for-dbas/</feedburner:origLink></item>
		<item>
		<title>Upgrading to Fedora 12?  You might need more /boot space!</title>
		<link>http://feedproxy.google.com/~r/PythianGroupBlog/~3/7II3dbBqAS8/</link>
		<comments>http://www.pythian.com/news/5539/upgrading-to-fedora-12-you-might-need-more-boot-space/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 22:04:14 +0000</pubDate>
		<dc:creator>Don Seiler</dc:creator>
				<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.pythian.com/news/?p=5539</guid>
		<description><![CDATA[Today, I had a spare Fedora 11 machine sitting next to me, so I thought I&#8217;d try the upgrade to the newly-released Fedora 12, aka &#8220;Constantine.&#8221;  Fedora support cycles are rather short compared to Ubuntu, so Fedora 11 will likely be de-supported in 6 to 7 months.  Normally I&#8217;d wait a little longer [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I had a spare <a href="http://fedoraproject.org/">Fedora</a> 11 machine sitting next to me, so I thought I&#8217;d try the upgrade to the newly-released <a href="https://fedoraproject.org/get-fedora">Fedora 12</a>, aka &#8220;Constantine.&#8221;  Fedora support cycles are rather short compared to Ubuntu, so Fedora 11 will likely be de-supported in 6 to 7 months.  Normally I&#8217;d wait a little longer into the Fedora 12 cycle for others to find the fun upgrade bugs and have them fixed for me, but I didn&#8217;t mind having to re-install from scratch on this machine if I needed to.</p>
<p>Following the <a href="http://docs.fedoraproject.org/install-guide/f12/en-US/html/ch17s02.html">Fedora documentation</a>, I decided to use the &#8220;preupgrade&#8221; tool.  Everything was going smoothly until the machine restarted to begin installation of the new packages.  I got a message that there wasn&#8217;t enough space in my /boot partition.  Specifically, the message claimed that there was insufficient disk space in /mnt/sysimage/boot.  I found this rather odd and troubling, since I had let the Fedora installer determine the /boot partition size when I originally installed Fedora 11.</p>
<p>Turns out that this is a known problem with the preupgrade tool.  A kind soul in #fedora on IRC directed me to the list of <a href="https://fedoraproject.org/wiki/Common_F12_bugs#Preupgrade_free_space_check_on_.2Fboot_not_thorough">common Fedora 12 bugs</a>, in particular the preupgrade free space check.  I installed the updated preupgrade package as directed, but again got the error.  That&#8217;s when I followed the next link for <a href="https://fedoraproject.org/wiki/How_to_use_PreUpgrade#Not_enough_space_in_.2Fboot">additional tips to free up space in /boot</a>.  The first was to remove obsolete kernels, which I had already done.  The next was to run tune2fs on /boot filesystem to free up reserved blocks, which aren&#8217;t needed for /boot.  I strongly suggest you visit the links provided for helpful screenshots and commands to follow.</p>
<p>After making these changes, the upgrade worked and am I&#8217;m the proud owner of a Fedora 12 Constantine laptop, with a slightly brighter shade of blue desktop than that crusty old Fedora 11.  ;)</p>
<img src="http://feeds.feedburner.com/~r/PythianGroupBlog/~4/7II3dbBqAS8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.pythian.com/news/5539/upgrading-to-fedora-12-you-might-need-more-boot-space/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.pythian.com/news/5539/upgrading-to-fedora-12-you-might-need-more-boot-space/</feedburner:origLink></item>
		<item>
		<title>New Oracle ACE at Pythian</title>
		<link>http://feedproxy.google.com/~r/PythianGroupBlog/~3/h54Sj-ptxFY/</link>
		<comments>http://www.pythian.com/news/5441/new-oracle-ace-at-pythian/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 17:59:30 +0000</pubDate>
		<dc:creator>Alex Gorbachev</dc:creator>
				<category><![CDATA[Business Blog]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Pythian]]></category>
		<category><![CDATA[Technical Blog]]></category>
		<category><![CDATA[ACE]]></category>
		<category><![CDATA[congratulation]]></category>

		<guid isPermaLink="false">http://www.pythian.com/news/?p=5441</guid>
		<description><![CDATA[ I recently nominated my colleague and good friend Christo Kutrovsky for the Oracle ACE program. Today, I&#8217;m excited to share that he has been accepted and is now part of the community of 200+ Oracle ACEs and Oracle ACE Directors.
Christo has been an active blogger on our blog and has made numerous top-class presentations [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.pythian.com/news/wp-content/uploads/oracle_ace_blk.gif" alt="Oracle ACE" title="oracle_ace_blk" width="155" height="39" align="right" /> I recently nominated my colleague and good friend <a href="http://www.pythian.com/news/author/kutrovsky">Christo Kutrovsky</a> for the <a href="http://www.oracle.com/technology/community/oracle_ace/index.html">Oracle ACE</a> program. Today, I&#8217;m excited to share that he has been accepted and is now <a href="http://apex.oracle.com/pls/otn/f?p=19297:4:0::NO:4:P4_ID:1300">part of the community</a> of <a href="http://apex.oracle.com/pls/otn/f?p=19297:3:0:::::">200+</a> Oracle ACEs and Oracle ACE Directors.</p>
<p>Christo has been an <a href="http://www.pythian.com/news/author/kutrovsky/">active blogger</a> on our blog and has made numerous top-class presentations at Oracle Conference world-wide. He has also been an active contributor on the <a href="http://www.freelists.org/list/oracle-l">Oracle-L</a> list.</p>
<p>Christo has been always representing an independent voice in the community and it&#8217;s a pleasure to have him on board. I&#8217;m looking forward to his contributions to the Oracle ACE program and the Oracle community at large.</p>
<p>Welcome Christo!</p>
<img src="http://feeds.feedburner.com/~r/PythianGroupBlog/~4/h54Sj-ptxFY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.pythian.com/news/5441/new-oracle-ace-at-pythian/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.pythian.com/news/5441/new-oracle-ace-at-pythian/</feedburner:origLink></item>
		<item>
		<title>Oracle Parallel Query Sorting and Index Creation Performance Problems</title>
		<link>http://feedproxy.google.com/~r/PythianGroupBlog/~3/SPqJTk89llk/</link>
		<comments>http://www.pythian.com/news/5379/oracle-parallel-query-sorting-performance-problems/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 19:34:10 +0000</pubDate>
		<dc:creator>Christo Kutrovsky</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Technical Blog]]></category>
		<category><![CDATA[11.2]]></category>
		<category><![CDATA[order by]]></category>
		<category><![CDATA[PQ sort]]></category>

		<guid isPermaLink="false">http://www.pythian.com/news/?p=5379</guid>
		<description><![CDATA[Ever wondered why recreating certain indexes takes forever, even when you do so in parallel? Ever wondered why certain PQ queries just don&#8217;t run that fast?
Here&#8217;s a serious performance bug that&#8217;s been in Oracle for a while, and finally there are hints of it been fixed, but only partially.
The bug happens when performing sorting operations [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wondered why recreating certain indexes takes forever, even when you do so in parallel? Ever wondered why certain PQ queries just don&#8217;t run that fast?</p>
<p>Here&#8217;s a serious performance bug that&#8217;s been in Oracle for a while, and finally there are hints of it been fixed, but only partially.</p>
<p>The bug happens when performing sorting operations in parallel, and the source data is already well sorted. The &#8220;ranger&#8221; doesn&#8217;t do a good job of properly assigning row ranges to sorter processes, and ~90% of the rows end up being sent to the same parallel process, regardless of the level of parallelism. So even if you have 256 CPUs, only about 10% performance improvement is achieve, instead of a factor of your parallelism when running the query in parallel.</p>
<p>For example, if the non parallel sort/index creation took 45 minutes, running with parallel 32 will take 41 minutes, instead of the possible 1.4 minutes (assuming you have sufficient horsepower).</p>
<p><span id="more-5379"></span></p>
<p>When running a &#8220;Sort&#8221; operation in parallel, there are 2 sets of parallel processes. Producers and consumers. The number of producer/consumer pairs depends on your parallelism settings. So in the case of parallel 32 there are 32 producers and 32 consumers. This is well illustrated in the Oracle documentation HERE (Oracle web based documentation down, will update later). As each &#8216;producer&#8217; is reading data it is sending it to the appropriate consumer for that &#8220;range&#8221;. For example, consumer 1 takes A-B, consumer 2 takes C-F, consumer 3 G-L and etc. The exact split is dynamically calculated by the &#8220;Ranger&#8221; process. Unfortunately it doesn&#8217;t work so good with sorted data.</p>
<p>The same applies to index creation. Index creation is basically a big sort, followed by writing out the result set into a B-Tree structure. Index creation suffers from the exact same ranging issues, at least until 11.2.</p>
<p>Here&#8217;s an example: </p>
<pre class="brush: sql">
-- Create mini-sample table
create table mytest_s as select rownum r from dual connect by level &lt;=400000;

-- Fetch only 1 row, no need to fetch all
begin
  for c in ( select /*+PARALLEL(t,4)*/ * from mytest_s t order by 1) loop
    exit;
  end loop;
end;
/
select dfo_number &quot;d&quot;, tq_id as &quot;t&quot;, server_type, num_rows,rpad(&#039;x&#039;,round(num_rows*10/nullif(max(num_rows) over (partition by dfo_number, tq_id, server_type),0)),&#039;x&#039;) as &quot;pr&quot;, round(bytes/1024/1024) mb,  process, instance i,round(ratio_to_report (num_rows) over (partition by dfo_number, tq_id, server_type)*100) as &quot;%&quot;, open_time, avg_latency, waits, timeouts,round(bytes/nullif(num_rows,0)) as &quot;b/r&quot;
from v$pq_tqstat order by dfo_number, tq_id, server_type desc, process;

d t SERVER_TYPE   NUM_ROWS pr           MB PROCESS I    %  OPEN_TIME AVG_LATENCY   WAITS   TIMEOUTS  b/r
- - ----------- ---------- ----------- --- ------- - ---- ---------- ----------- ------- ---------- ----
1 0 Ranger             372 xxxxxxxxxx    0 QC      1  100          0           0       0          0   11

1 0 Producer        126144 xxxxxxxxxx    1 P012    1   32          0           0      19          2    6
1 0 Producer         47304 xxxx          0 P013    1   12          0           0       8          1    6
1 0 Producer        110376 xxxxxxxxx     1 P014    1   28          0           0      17          2    6
1 0 Producer        116176 xxxxxxxxx     1 P015    1   29          0           0      16          0    6

1 0 Consumer          7885               0 P008    1    2          0           0       6          1    5
1 0 Consumer          7884               0 P009    1    2          0           0       6          1    6
1 0 Consumer          7884               0 P010    1    2          0           0       7          2    6
1 0 Consumer        376347 xxxxxxxxxx    2 P011    1   94          0           0      16          4    6

1 1 Producer          5536 xxxxxxxxxx    0 P008    1   55          0           0     577        568    3
1 1 Producer          4508 xxxxxxxx      0 P011    1   45          0           0     587        571    4

1 1 Consumer           100 xxxxxxxxxx    0 QC      1  100          0           0       1          0  161
</pre>
<p>As you can see from this test case, the sorter processes (4 consumers) had a very uneven split, with 94% of the rows been sent to only one consumer. I tested this case with parallel 64, and in that case 90% gets sent to 1 consumer, with the other 10% evenly distributed on the remaining ones.</p>
<p>This essentially reduces your execution time by at most 10%.</p>
<p>A very similar thing happens if you create an index. I did, however, catch an anomaly in the test case. With parallel 4, the distribution is 66/34/0/0, while with parallel 8, it&#8217;s 100/0/0/0/0/0/0/0. I.e., terrible as all the work will be performed by 1 process, absolutely the same as Serial, only a little worse as there will be inter-process communication.</p>
<pre class="brush: sql">
create index on mytest_s (r) parallel 4;
select dfo_number &quot;d&quot;, tq_id as &quot;t&quot;, server_type, num_rows,rpad(&#039;x&#039;,round(num_rows*10/nullif(max(num_rows) over (partition by dfo_number, tq_id, server_type),0)),&#039;x&#039;) as &quot;pr&quot;, round(bytes/1024/1024) mb,  process, instance i,round(ratio_to_report (num_rows) over (partition by dfo_number, tq_id, server_type)*100) as &quot;%&quot;, open_time, avg_latency, waits, timeouts,round(bytes/nullif(num_rows,0)) as &quot;b/r&quot;
from v$pq_tqstat order by dfo_number, tq_id, server_type desc, process;

SERVER_TYPE   NUM_ROWS pr          MB PROCESS  I   %  OPEN_TIME AVG_LATENCY      WAITS   TIMEOUTS        b/r
----------- ---------- ----------- -- -------- - --- ---------- ----------- ---------- ---------- ----------
Ranger              12 xxxxxxxxxx   0 QC       1 100          0           0          1          0       3974
Producer        132601 xxxxxxxxxx   2 P004     1  33          0           0         19          1         18
Producer         95265 xxxxxxx      2 P005     1  24          0           0         14          2         18
Producer         95265 xxxxxxx      2 P006     1  24          0           0         14          1         18
Producer         79497 xxxxxx       1 P007     1  20          0           0         11          0         18

Consumer        262308 xxxxxxxxxx   4 P000     1  66          0           0         76         73         18
Consumer           164              0 P001     1   0          0           0         77         74         19
Consumer           164              0 P002     1   0          0           0         76         73         19
Consumer        137364 xxxxx        2 P003     1  34          0           0         76         73         18

Producer             1 xxxxxxxxxx   0 P000     1  25          0           0          0          0        322
Producer             1 xxxxxxxxxx   0 P001     1  25          0           0          0          0        322
Producer             1 xxxxxxxxxx   0 P002     1  25          0           0          0          0        322
Producer             1 xxxxxxxxxx   0 P003     1  25          0           0          0          0        322
Consumer             4 xxxxxxxxxx   0 QC       1 100          0           0          1          0        322

create index on mytest_s (r) parallel 8;

SERVER_TYPE   NUM_ROWS pr            MB PROCESS  I   %  OPEN_TIME AVG_LATENCY      WAITS   TIMEOUTS        b/r
----------- ---------- ------------- -- -------- - --- ---------- ----------- ---------- ---------- ----------
Ranger               0                0 QC       1              0           0          6          2 

Producer         47304 xxxxxxxx       1 P008     1  12          0           0         14          2         18
Producer         51246 xxxxxxxxx      1 P009     1  13          0           0         15          1         18
Producer         47304 xxxxxxxx       1 P010     1  12          0           0         15          2         18
Producer         45220 xxxxxxxx       1 P011     1  11          0           0         15          2         18
Producer         59130 xxxxxxxxxx     1 P012     1  15          0           0         17          3         18
Producer         35478 xxxxxx         1 P013     1   9          0           0         10          3         18
Producer         55188 xxxxxxxxx      1 P014     1  14          0           0         16          1         18
Producer         59130 xxxxxxxxxx     1 P015     1  15          0           0         17          1         18

Consumer        400000 xxxxxxxxxx     7 P000     1 100          0           0         52         49         18
Consumer             0                0 P001     1   0          0           0         52         49
Consumer             0                0 P002     1   0          0           0         52         49
Consumer             0                0 P003     1   0          0           0         52         49
Consumer             0                0 P004     1   0          0           0         52         49
Consumer             0                0 P005     1   0          0           0         52         49
Consumer             0                0 P006     1   0          0           0         52         49
Consumer             0                0 P007     1   0          0           0         52         49 

Producer             1 xxxxxxxxxx     0 P000     1  13          0           0          0          0        322
Producer             1 xxxxxxxxxx     0 P001     1  13          0           0          0          0        322
Producer             1 xxxxxxxxxx     0 P002     1  13          0           0          0          0        322
Producer             1 xxxxxxxxxx     0 P003     1  13          0           0          0          0        322
Producer             1 xxxxxxxxxx     0 P004     1  13          0           0          0          0        322
Producer             1 xxxxxxxxxx     0 P005     1  13          0           0          0          0        322
Producer             1 xxxxxxxxxx     0 P006     1  13          0           0          0          0        322
Producer             1 xxxxxxxxxx     0 P007     1  13          0           0          0          0        322

Consumer             8 xxxxxxxxxx     0 QC       1 100          0           0          2          1        322
</pre>
<p>To further explore the implications of this bug, I created a more elaborate test case. I created several types of data, and tested ordering against each &#8220;class.&#8221;</p>
<pre class="brush: sql">
create table mytest as
select rownum pk, trunc(dbms_random.value(0,400000)) rnd,
floor(rownum/1000) type_1000, floor(rownum/5) type_5,
mod(rownum,1000) type_1000mod,mod(rownum,5) type_5mod,mod(rownum,10009) type_10000mod,
sysdate-rownum/100 as dt,
rpad(&#039;x&#039;,10,&#039;x&#039;) pad from dual connect by level &lt;=400000;
</pre>
<p>To spare you some of the testing, here are my results.  Query ran:<br />
<code>select /*+PARALLEL(t,[DEGREE])*/* from mytest order by [ORDER BY];</code></p>
<table>
<tr>
<th><strong>Degree</strong></th>
<th><strong>Order by</strong></th>
<th><strong>Distribution(%)</strong></th>
</tr>
<tr>
<td>4</td>
<td>pk</td>
<td>94/2/2/2</td>
</tr>
<tr>
<td>64</td>
<td>pk</td>
<td>93/0&#8230; </td>
</tr>
<tr>
<td>4</td>
<td>rnd</td>
<td>28/21/24/27</td>
</tr>
<tr>
<td>64</td>
<td>rnd</td>
<td>2/1/2/1&#8230;</td>
</tr>
<tr>
<td>4</td>
<td>type_1000</td>
<td>94/2/2/2</td>
</tr>
<tr>
<td>4</td>
<td>type_5</td>
<td>94/2/2/2</td>
</tr>
<tr>
<td>64</td>
<td>type_5</td>
<td>93/0/0&#8230;.</td>
</tr>
<tr>
<td>4</td>
<td>type_5mod</td>
<td>40/20/20/20</td>
</tr>
<tr>
<td>8</td>
<td>type_5mod</td>
<td>20/20/0/20/20/0/20/0</td>
</tr>
<tr>
<td>8</td>
<td>type_1000mod</td>
<td>17/13/8/6/4/4/4/43</td>
</tr>
<tr>
<td>64</td>
<td>type_1000mod</td>
<td>4/3/1/4/2/1&#8230;.</td>
</tr>
<tr>
<td>4</td>
<td>dt</td>
<td>96/2/2/0</td>
</tr>
<tr>
<td>64</td>
<td>dt</td>
<td>93/0/0/0&#8230;</tr>
<tr>
<td>4</td>
<td>type_5,pk</td>
<td>2/2/2/94</td>
</tr>
<tr>
<td>4</td>
<td>type_5,rnd</td>
<td>2/2/2/94</td>
</tr>
<tr>
<td>4</td>
<td>type_5_mod,pk</td>
<td>20/20/20/39</td>
</tr>
<tr>
<td>64</td>
<td>type_5_mod,pk	</td>
<td>19/19/19/19/19/0/0&#8230;</td>
</tr>
<tr>
<td>4</td>
<td>type_5_mod,rnd</td>
<td>26/24/26/24</td>
</tr>
</table>
<p>A few quick conclusions:
<ul>
<li>The first column of order matters for distribution.</li>
<li>If the <em>Order by</em> column has repeated values, PQ sort will be limited by number of distinct values, but only if they are not grouped together.</li>
<li>Index creation on time series (log table, stock table) is slow, &#8220;type&#8221; indexes are slow.</li>
<li>If you reorder the keys of an index, you may affect the time it takes to create it.</li>
<li>Follow up on the preceding, especially true if you try to put low cardinality columns first to improve compression.</li>
</ul>
<p>One could dispute in which cases data in the table is ordered, and it&#8217;s amazing how many cases this is:
<ul>
<li>Time series data &mdash; ever-growing data. The PK is ordered; the &#8220;insert date&#8221; is somewhat ordered.</li>
<li>Data warehouses &mdash; bulk load files are often ordered via some conditions.</li>
<li>Sometimes it is good to reorder a table, to improve data locality and compression in data warehouses. This can, however, have negative effects on index build time.</li>
<li>Sometimes one of the intermediate steps will return an ordered set for the final processing.</li>
</ul>
<p>One example of the last type, is analytics. But that&#8217;s for a separate blog post.</p>
<p>And finally, to end on an optimistic note, it appears that <strong>11.2 has the index creation issue resolved</strong>, but the <em>order by</em> in queries is still bad.</p>
<img src="http://feeds.feedburner.com/~r/PythianGroupBlog/~4/SPqJTk89llk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.pythian.com/news/5379/oracle-parallel-query-sorting-performance-problems/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://www.pythian.com/news/5379/oracle-parallel-query-sorting-performance-problems/</feedburner:origLink></item>
		<item>
		<title>Blogrotate #6: The Weekly Roundup of News for System Administrators</title>
		<link>http://feedproxy.google.com/~r/PythianGroupBlog/~3/LN0z6gl4W7E/</link>
		<comments>http://www.pythian.com/news/5327/blogrotate-6-the-weekly-roundup-of-news-for-system-administrators/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 21:55:04 +0000</pubDate>
		<dc:creator>Brad Hudson</dc:creator>
				<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Technical Blog]]></category>
		<category><![CDATA[AMD]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[Blogrotate]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[Hudson]]></category>
		<category><![CDATA[Intel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[operating systems]]></category>
		<category><![CDATA[Pythian]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.pythian.com/news/?p=5327</guid>
		<description><![CDATA[Like good day and welcome to issue 6 eh.  This is another light one as it&#8217;s been another busy week.  I have not had any time of my own to crawl through the news, but luckily my cohort Bill has flagged some good stuff for this week.  Let&#8217;s get to it.
Internet
Happy Birthday [...]]]></description>
			<content:encoded><![CDATA[<p>Like good day and welcome to issue 6 eh.  This is another light one as it&#8217;s been another busy week.  I have not had any time of my own to crawl through the news, but luckily my cohort Bill has flagged some good stuff for this week.  Let&#8217;s get to it.</p>
<h3>Internet</h3>
<p>Happy Birthday <a href="http://www.mozilla.com/en-US/firefox/personal.html">FireFox</a>!  The browser turns 5 years old today.  <a href="http://arstechnica.com/authors/ryan-paul/">Ryan Paul</a> has more in his article<br />
<a href="http://arstechnica.com/open-source/news/2009/11/firefox-turns-five-half-a-decade-of-web-liberation.ars?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss">Firefox turns five: half a decade of Web liberation</a>.<br />
<span id="more-5327"></span><br />
The <a href="http://blog.chromium.org">Google Chromium blog</a> has an interesting post called  <a href="http://blog.chromium.org/2009/11/2x-faster-web.html">A 2x Faster Web</a> about their attempts to speed up your surfing.  &#8220;The initial results are very encouraging: when we download the top 25 websites over simulated home network connections, we see a significant improvement in performance &#8211; pages loaded up to 55% faster&#8221;, says the blog.  This is still in early testing phases but sounds very promising.</p>
<h3>Operating Systems</h3>
<p>Steven J. Vaughan-Nichols at <a href="http://www.computerworld.com">Computerworld</a> reflects on his time using linux on the desktop in <a href="http://www.computerworld.com/s/article/9140169/Opinion_Linux_desktop_turns_10_world_yawns?source=rss_opensource">Opinion: Linux desktop turns 10; world yawns</a>.  The article needs to be taken with a grain of salt.  He states in the preamble that &#8220;The credit for creating and marketing the first Linux desktop designed for ordinary users goes to Corel Corp., which launched Corel Linux OS 10 years ago, in November 1999&#8243;.  I take umbrage with this statement because by 1999 Caldera and Mandrake were already making great strides with linux on the desktop, <a href="http://en.wikipedia.org/wiki/Caldera_OpenLinux">Caldera</a> even had a pretty boxed edition out in stores 2 years ahead of Corel, and <a href="http://en.wikipedia.org/wiki/Mandriva_Linux">Mandrake</a> had a box out in 1998 (if memory serves).  Sure Corel had a big name and some marketing power, but they were not the first and certainly not the best (Corel Linux sucked IMHO).</p>
<h3>Security</h3>
<p>This next article is a combination of software, security, legal, patents and what the hell.  <a href="http://www.groklaw.net/article.php?story=20091111094923390">Microsoft Patents Sudo?!!</a> is a story with it all.  Microsoft has taken something that has been in use in the unix community since the 80s (and on Mac since OSX) and patented it.  I wonder if <a href="http://en.wikipedia.org/wiki/Role-based_access_control">RBAC</a> is also covered by this?  The link to the patent and information on sudo are included in the article.</p>
<p><a href="http://www.net-security.org">Help Net Security</a> has a post about a recent Cenzic report on web server and browser vulnerabilities.  Read all about it in <a href="http://www.net-security.org/secworld.php?id=8489">Firefox most vulnerable browser, Safari close second</a>.  </p>
<h3>Software</h3>
<p>According to <a href="http://arstechnica.com">Ars Technica</a>, Novell is &#8220;offering a new commercial add-in for Visual Studio that will allow software developers to test and package .NET applications for Linux without having to leave their Windows development environment&#8221;.  The new add-in, called <a href="http://www.go-mono.com/monovs/">MonoVS</a> is available now for a free 30 day trial.</p>
<p>According to the <a href="http://www.withinwindows.com">WithinWindows blog</a> Microsoft may have used <a href="http://en.wikipedia.org/wiki/GNU_General_Public_License">GPL</a> code in it&#8217;s released <a href="http://store.microsoft.com/Help/ISO-Tool">Windows 7 USB/DVD Download tool</a> without contacting the author or releasing the source code back to the community.  The article has some evidence to support this claim.  Microsoft has pulled the tool pending further investigation.</p>
<h3>Virtualization</h3>
<p><a href="http://www.slashdot.org">Slashdot</a> has a note about <a href="http://dsg.cs.ubc.ca/remus/">The Remus project</a>.  This project adds live migration/failover functionality to the <a href="http://xen.org/">Xen</a> hypervisor allowing virtual machines to (reportedly) seamlessly move to another host without losing data or active connections.  This was one of the last things that <a href="http://www.vmware.com">VMWare</a> ESX offered that I could not find in the open source (read free) world so I&#8217;ll be sure to check it out myself.</p>
<h3>Business</h3>
<p><a href="http://www.hp.com/hpinfo/newsroom/press/2009/091111xa.html">HP to Acquire 3Com for $2.7 Billion</a> is a new release at the HP site.  There&#8217;s a lot in there, read it for yourself.  Hopefully this will be a good boost for 3Com which has not made anything outstanding since the 3c501.</p>
<p>A couple of items on the AMD front.  Firstly <a href="http://www.amd.com/us/press-releases/Pages/amd-press-release-2009nov12.aspx">AMD and Intel Announce Settlement of All Antitrust and IP Disputes</a> which I hope will bury the hatchet once and for all and allow both companies to get back to innovation.  Secondly, AMD has release some more news about their future roadmap and the &#8220;fusion&#8221; of CPU with GPU in <a href="http://arstechnica.com/hardware/news/2009/11/amd-avoiding-larrabee-route-on-road-to-cpugpu-fusion.ars?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss">AMD avoiding Larrabee route on road to CPU/GPU &#8220;Fusion&#8221;</a> by <a href="http://arstechnica.com/authors/jon-stokes/">Jon Stokes</a>.</p>
<p>Well there was a couple more items on the list but I am out of time.  Have a great weekend!</p>
<p>So like get lost eh!  Hoser!</p>
<p>Brad</p>
<img src="http://feeds.feedburner.com/~r/PythianGroupBlog/~4/LN0z6gl4W7E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.pythian.com/news/5327/blogrotate-6-the-weekly-roundup-of-news-for-system-administrators/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.pythian.com/news/5327/blogrotate-6-the-weekly-roundup-of-news-for-system-administrators/</feedburner:origLink></item>
		<item>
		<title>Log Buffer #169: a Carnival of the Vanities for DBAs</title>
		<link>http://feedproxy.google.com/~r/PythianGroupBlog/~3/CKVYVobosA0/</link>
		<comments>http://www.pythian.com/news/5333/log-buffer-169-a-carnival-of-the-vanities-for-dbas/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 17:10:34 +0000</pubDate>
		<dc:creator>David Edwards</dc:creator>
				<category><![CDATA[Log Buffer]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Technical Blog]]></category>

		<guid isPermaLink="false">http://www.pythian.com/news/?p=5333</guid>
		<description><![CDATA[The 169th edition of Log Buffer, the weekly review of database blogs, has been published on Pakistan&#8217;s First Oracle Blog by Fahd Mirza.
This is the first Log Buffer published outside Pythian in quite a while, and we&#8217;d love to have more. Log Buffer has a regular readership, and so makes a great way to present [...]]]></description>
			<content:encoded><![CDATA[<p>The 169<sup>th</sup> edition of <a href="http://www.pythian.com/news/about-log-buffer"><em>Log Buffer</em></a>, the weekly review of database blogs, has been published on <a href="http://fahdmirza.blogspot.com">Pakistan&#8217;s First Oracle Blog</a> by <strong>Fahd Mirza</strong>.</p>
<p>This is the first <em>Log Buffer</em> published outside Pythian in quite a while, and we&#8217;d love to have more. <em>Log Buffer</em> has a regular readership, and so makes a great way to present yourself and your blog to the DBA community at large. To get started, just <a href="mailto:logbuffercoordinator@pythian.com?Subject=Log%20Buffer">send an email to the Log Buffer coordinator</a>.</p>
<p>And now, here is <a href="http://fahdmirza.blogspot.com/2009/11/log-buffer.html"><em>Log Buffer #169</em></a>.</p>
<img src="http://feeds.feedburner.com/~r/PythianGroupBlog/~4/CKVYVobosA0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.pythian.com/news/5333/log-buffer-169-a-carnival-of-the-vanities-for-dbas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.pythian.com/news/5333/log-buffer-169-a-carnival-of-the-vanities-for-dbas/</feedburner:origLink></item>
		<item>
		<title>SQL Server: More light shed on “non-yielding scheduler” and Indexes stats</title>
		<link>http://feedproxy.google.com/~r/PythianGroupBlog/~3/OC9BKRDjxN4/</link>
		<comments>http://www.pythian.com/news/5211/sql-server-more-light-shed-on-non-yielding-scheduler-and-indexes-stats/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 19:26:40 +0000</pubDate>
		<dc:creator>Mohammed Mawla</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Technical Blog]]></category>
		<category><![CDATA[DMV]]></category>
		<category><![CDATA[non-yielding scheduler]]></category>

		<guid isPermaLink="false">http://www.pythian.com/news/?p=5211</guid>
		<description><![CDATA[SQL server folks may find the &#8220;non-yielding scheduler&#8221; warning familiar and it is usually (if not always) associated with a stack dump.
The &#8220;non-yielding scheduler&#8221; message comes with warnings like the following:
Process %ld:%ld:%ld (0x%lx) Worker 0x%p appears to be non-yielding on Scheduler %ld. Thread creation time: %time. Approx Thread CPU Used: kernel 0x ms, user 0x [...]]]></description>
			<content:encoded><![CDATA[<p>SQL server folks may find the &#8220;non-yielding scheduler&#8221; warning familiar and it is usually (if not always) associated with a stack dump.</p>
<p>The &#8220;non-yielding scheduler&#8221; message comes with warnings like the following:</p>
<blockquote><p>Process %ld:%ld:%ld (0x%lx) Worker 0x%p appears to be non-yielding on Scheduler %ld. Thread creation time: %time. Approx Thread CPU Used: kernel 0x ms, user 0x ms. Process Utilization 0x%. System Idle 0x%. Interval: 0x ms.</p></blockquote>
<p>This means that there is a background thread that keeps running and making other worker threads yielding back, in time.  </p>
<p>There are many causes of the &#8220;non-yielding scheduler&#8221; error. Memory dump analysis is necessary to determine the cause. Look up the error in <a href="http://support.microsoft.com/search/?adv=1">MS Support Advanced Search</a> and you will find plenty of KBs dedicated to it.</p>
<p>You may also find (not all cases) errors 17883, 17884 logged in the event viewer, containing information like this: <span id="more-5211"></span></p>
<blockquote><p>Event Type:	Information<br />
Event Source:	MSSQLSERVER<br />
Event Category:	(2)<br />
Event ID:	17884<br />
Date:<br />
Time:<br />
User:<br />
Computer:<br />
Description:<br />
New queries assigned to process on Node 0x have not been picked<br />
up by a worker thread in the last 0x seconds.<br />
Blocking or long-running queries can contribute to this condition,<br />
and may degrade client response time.  Use the &#8220;max worker threads&#8221; configuration option to increase number<br />
of allowable threads, or optimize current running queries.  SQL Process Utilization: 0x%. System Idle: ox%%.</p>
<p>Event Type:	Information<br />
Event Source:	MSSQLSERVER<br />
Event Category:	(2)<br />
Event ID:	17883<br />
Date:<br />
Time:<br />
User:<br />
Computer:<br />
Description:<br />
Process  Worker  appears to be non-yielding on Scheduler .<br />
Thread creation time: . Approx Thread CPU Used: kernel  ms, user ms.<br />
Process Utilization %. System Idle %. Interval: ms. </p></blockquote>
<p>There is a must-read whitepaper describing SQL Server Scheduling and how to interpret and diagnose   Errors 17883, 17884, 17887, and 17888; please look here <a href="http://technet.microsoft.com/en-us/library/cc917684.aspx">How To Diagnose and Correct Errors 17883, 17884, 17887, and 17888 </a></p>
<p>Recently, we had a client having same issue. The client runs a busy online business with thousands of connected users; databases sometimes include more than half a million tables.</p>
<p>We had a healthy counters and server didn&#8217;t seem to suffer from memory or I/O bottlenecks. We did suspect, however, that it is something to do with SQL Server internals, as we also received fatal exceptions pertaining to SPIDs &lt;50 (system processes).</p>
<p>We looked at any Hardware Fault, outdated drivers, tempdb contention (<a href="http://msdn.microsoft.com/en-us/library/ms175527.aspx">there were nearly 0.5 datafiles/core</a>).</p>
<p>We opened a case with MS support after the dumps continued to happen and their reply was:<br />
<blockquote>After analyzing the dumps, we see that the thread has non-yielded while updating index usage stats. These stats are returned through DMV <a href="http://msdn.microsoft.com/en-us/library/ms188755.aspx">sys.dm_db_index_usage_stats.</a></p></blockquote>
<p>According to MS, the issue is a known bug that has been corrected in SQL Server 2008 but <strong>isn&#8217;t</strong> expected to be resolved in SQL Server 2005.</p>
<h3>Workaround</h3>
<p><a href="http://msdn.microsoft.com/en-us/library/ms187329.aspx">Enable trace flag</a> 2330 to prevent the update of data in DMV in sys.dm_db_index_usage_stats.</p>
<p>This DMV retrieves information that about index usage; it <em>does not</em>, however, generate this information itself, but rather just returns this info from a cache inside SQL Server. This cache is empty when the server instance beside it doesn&#8217;t persist between instance restarts.</p>
<p>The impact of disabling this job was nothing to the server operations. There was a selective indexes maintenance job that depended completely on <a href="http://msdn.microsoft.com/en-us/library/ms188917.aspx">sys.dm_db_index_physical_stats</a>, which is a different DMV.</p>
<p>Also, the query optimizer should be only affected if we stopped updating statistics, or are no longer optimizing the indexes which we were <em>not</em> doing here.</p>
<p>The affected DMV helps with auditing the indexes usage when we opt to diagnose instance performance, as it helps tracking the number of scan operations, the number of seek operations, the number of lookup operations, and some more.</p>
<p>It is worthwhile to note that <a href="http://technet.microsoft.com/en-us/library/ms174281.aspx">sys.dm_db_index_operational_stats</a> can report similar statistics (there are some differences though) as sys.dm_db_index_physical_stats.</p>
<p><a href="http://blogs.msdn.com/craigfr/default.aspx">Craig Freedman</a> wrote a good blog: <a href="http://blogs.msdn.com/craigfr/archive/2008/10/30/what-is-the-difference-between-sys-dm-db-index-usage-stats-and-sys-dm-db-index-operational-stats.aspx">What is the difference between sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats?</a></p>
<p>Two days ago&#8212;and that&#8217;s the reason I&#8217;m writing this blog&#8212;Microsoft released a &#8220;FAST PUBLISH&#8221; KB: (<a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;2003031">Query performance decreases when sys.dm_db_index_usage_stats has large number of rows</a>) about this issue and it mentions the following scenario:</p>
<ul>
<li>In Microsoft SQL Server 2005, you frequently perform DDL operations that involve dropping and recreating of lot of tables (especially temporary tables in tempdb database).</li>
<li>You have a large number of entries (100,000 or more) in the sys.dm_db_index_usage_stats dynamic management view (DMV).</li>
</ul>
<p>This aligns with what we had with the affected server (more than half a million tables can easily generate that). The KB mentions these workarounds:</p>
<ol>
<li>Reduce the rate at which you create or drop temporary tables.  (This may need extensive code change.)</li>
<li>Upgrade to SQL Server 2008. (Unfortunately, not everyone can afford that.)</li>
<li>Configure your SQL Server to use trace flag T2330 as a startup parameter. (This is what we have done and <em>adieu la problème</em>.)
</ol>
<p><strong>Note:</strong> make sure that the trace is enabled by running <a href="http://msdn.microsoft.com/en-us/library/ms187809.aspx">DBCC TRACESTATUS(-1)</a></p>
<p>You can also look in the SQL Server error log and note whether the trace flags are mentioned, something like this:</p>
<p><code>Time  Server -T1222<br />
Time  Server -T845<br />
<strong>Time  Server -T2330</strong></code></p>
<p>One more KB that was released recently: (<a href="http://support.microsoft.com/kb/974205">FIX: Error message in the SQL Server 2005 Errorlog file after the SQL Server service stops responding: &#8220;Timeout occurred while waiting for latch&#8221;</a>);  mentions similar symptoms that are related to SQL Server processing missing index information for a dynamic management view (DMV). This was fixed in <a href="SQL Server processes missing index information for a dynamic management view (DMV)">SQL server 2005 Sp3 CU6</a></p>
<p>If you face similar issues, you should install the latest service pack and cumulative update, and check if you have any resource bottlenecks. You can try trace T2330 as well, and if you still get errors or dumps, then you had better open a case with Microsoft Support to analyze the dumps and provide a resolution. </p>
<p>Hope this helps!</p>
<img src="http://feeds.feedburner.com/~r/PythianGroupBlog/~4/OC9BKRDjxN4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.pythian.com/news/5211/sql-server-more-light-shed-on-non-yielding-scheduler-and-indexes-stats/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.pythian.com/news/5211/sql-server-more-light-shed-on-non-yielding-scheduler-and-indexes-stats/</feedburner:origLink></item>
		<item>
		<title>Free 10-day trial of Safari Books Online</title>
		<link>http://feedproxy.google.com/~r/PythianGroupBlog/~3/k4JZxv_h_uQ/</link>
		<comments>http://www.pythian.com/news/5261/free-10-day-trial-of-safari-books-online/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 19:01:41 +0000</pubDate>
		<dc:creator>Sheeri Cabral</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Non-Tech Articles]]></category>
		<category><![CDATA[Not on Homepage]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[free trial]]></category>
		<category><![CDATA[microsoft sql server]]></category>
		<category><![CDATA[oreilly]]></category>
		<category><![CDATA[Pythian]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[sqlserver]]></category>

		<guid isPermaLink="false">http://www.pythian.com/news/?p=5261</guid>
		<description><![CDATA[That&#8217;s right &#8212; get your free 10-day trial!  All the information I know is here:
http://bit.ly/37E9ld
But the basics are:  No access to Rough Cuts or Downloads, for new subscribers only.  It&#8217;s one of those &#8220;sign up and if you do not cancel after 10 days, we bill you&#8221; &#8212; and at $42.99 a [...]]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s right &#8212; get your free 10-day trial!  All the information I know is here:</p>
<p><A HREF="http://bit.ly/37E9ld">http://bit.ly/37E9ld</a></p>
<p>But the basics are:  No access to Rough Cuts or Downloads, for new subscribers only.  It&#8217;s one of those &#8220;sign up and if you do <strong>not</strong> cancel after 10 days, we bill you&#8221; &#8212; and at $42.99 a month, that&#8217;s not a mistake you want to make.  Must sign up by Nov. 24th.</p>
<p>To sign up now:  <A HREF=https://ssl.safaribooksonline.com/tryitfree>https://ssl.safaribooksonline.com/tryitfree</A></p>
<p>I was asked to send this information along, so I am&#8230;Now&#8217;s your chance to skim High Performance MySQL, among other high quality books!</p>
<img src="http://feeds.feedburner.com/~r/PythianGroupBlog/~4/k4JZxv_h_uQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.pythian.com/news/5261/free-10-day-trial-of-safari-books-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.pythian.com/news/5261/free-10-day-trial-of-safari-books-online/</feedburner:origLink></item>
		<item>
		<title>SSIS tip: Set variables’ values interactively in SSIS packages</title>
		<link>http://feedproxy.google.com/~r/PythianGroupBlog/~3/WA58-Pgt_zc/</link>
		<comments>http://www.pythian.com/news/4812/ssis-tip-set-variables-values-interactively-in-ssis-packages/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 18:10:30 +0000</pubDate>
		<dc:creator>Mohammed Mawla</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Technical Blog]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[SSIS Script task]]></category>

		<guid isPermaLink="false">http://www.pythian.com/news/?p=4812</guid>
		<description><![CDATA[This is a little tip for those who develop or debug SSIS packages.
In SQL Server Integration services, User namespace variables are assigned values that are used across the package.
When developing, testing or debugging packages, we assign multiple values to those variables to test different scenarios. This is done using the variables window.
However, SSIS Script tasks [...]]]></description>
			<content:encoded><![CDATA[<p>This is a little tip for those who develop or debug <a href="http://msdn.microsoft.com/en-us/library/ms141026.aspx">SSIS</a> packages.</p>
<p>In SQL Server Integration services, <a href="http://technet.microsoft.com/en-us/library/ms141085.aspx">User namespace variables</a> are assigned values that are used across the package.</p>
<p>When developing, testing or <a href="http://msdn.microsoft.com/en-us/library/ms137880.aspx">debugging packages</a>, we assign multiple values to those variables to test different scenarios. This is done using the <a href="http://technet.microsoft.com/en-us/library/ms141670.aspx">variables window</a>.</p>
<p>However, <a href="http://msdn.microsoft.com/en-us/library/ms141752.aspx">SSIS Script tasks</a> can allow us to key in values for selected variables in run time. This looks more fun and keeps us from taking chances when we forget assigning variables&#8217; values.</p>
<p>A tiny example: <span id="more-4812"></span></p>
<ul>
<li>Return list of processes running on SQL server instance from <a href="http://technet.microsoft.com/en-us/library/ms179881.aspx">SYS.SYSPROCESSES</a> (I know it is legacy) where process ID (Spid) is larger than or equal to a value ( &gt;50 for example to return user processes).</li>
<li>Dump the returned list of SPIDs and associated info (cmd, waittype, loginame,&#8230;etc)  into a flat file.
<p>I&#8217;m using a script task and a <a href="http://msdn.microsoft.com/en-us/library/ms141122.aspx">Data flow task</a>. The Data Flow task contains an <a href="http://msdn.microsoft.com/en-us/library/ms141696.aspx">OLE DB Source</a> and a <a href="http://msdn.microsoft.com/en-us/library/ms141668.aspx">flat file destination</a>.</p>
<div id="attachment_5223" class="wp-caption alignleft" style="width: 374px"><a href="http://www.pythian.com/news/wp-content/uploads/DTSX.jpg"><img src="http://www.pythian.com/news/wp-content/uploads/DTSX.jpg" alt="Package" title="DTSX" width="364" height="304" class="size-full wp-image-5223" /></a><p class="wp-caption-text">Package</p></div>
<p>The script task idea is just simple : </p>
<ul>
<li>Pass a variable to the script indicating that we need to set some variables(s) value(s) interactively (Interactive mode).</li>
<li>In the script body, we will check for interactive mode and if it is true then we will use an <a href="http://msdn.microsoft.com/en-us/library/6z0ak68w.aspx">InputBox</a> to receive variables values.</li>
<li>Set the package variable(s) value(s) to the value(s) returned from inputbox(s).</li>
</ul>
<p>I have attached  two DSTX files, one for SS2005 and one for SS2008; the 2005 file can be easily upgraded with a tiny change in the function declaration, but I opted to attach a 2008 file for simplicity.</p>
<p><a href='http://www.pythian.com/news/wp-content/uploads/Interactive_Variables_value_2005.dtsx'>Interactive_Variables_value_2005.dtsx</a></p>
<p> <a href='http://www.pythian.com/news/wp-content/uploads/Interactive_Variables_value_2008.dtsx'>Interactive_Variables_value_2008.dtsx</a></p>
<p>Here is also the code for the script task (2008). I hope this helps.</p>
<pre class="brush: vb">
&#039; Microsoft SQL Server Integration Services Script Task
&#039; Write scripts using Microsoft Visual Basic
&#039; The ScriptMain class is the entry point of the Script Task.

Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Imports System.Text
Imports Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptObjectModel

  Partial Public Class ScriptMain
    Inherits Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase

    Enum ScriptResults
        Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success
        Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
    End Enum

    Dim PackageName As String

    Public Sub Main()
        PackageName = Dts.Variables(&quot;PackageName&quot;).Value.ToString()

        If Dts.Variables(&quot;interactive_values&quot;).Value.Equals(True) Then
            Dts.TaskResult = PromptForParams()
        Else
            Dts.TaskResult = ScriptResults.Success
        End If
    End Sub

    Public Function PromptForParams() As ScriptResults

        Dim Response As String
        Dim spidint As Integer

        &#039; Default Task output to failure
        Dts.TaskResult = ScriptResults.Failure

        Response = InputBox(&quot;Get a list of SQl server processes that begin with SPID X &quot; &quot; Enter SQL server SPID, must be integer and &gt; 0:&quot;, PackageName)

        If Response = String.Empty Then
            MsgBox(&quot;Cancelled! &quot;, MsgBoxStyle.OkOnly, PackageName)
            Return ScriptResults.Failure
        End If

        If Integer.TryParse(Response, spidint) And spidint &gt; 0 Then
            Dts.Variables(&quot;spid&quot;).Value = spidint
        Else
            MsgBox(&quot;Invalid value spid, must be integer and larger than Zero &quot;, MsgBoxStyle.Critical, PackageName)
            Return ScriptResults.Failure
        End If
        Return ScriptResults.Success
    End Function
End Class
</pre>
<img src="http://feeds.feedburner.com/~r/PythianGroupBlog/~4/WA58-Pgt_zc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.pythian.com/news/4812/ssis-tip-set-variables-values-interactively-in-ssis-packages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.pythian.com/news/4812/ssis-tip-set-variables-values-interactively-in-ssis-packages/</feedburner:origLink></item>
	</channel>
</rss>
