<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>bisql.net &#187; Tools &amp; Utilities</title>
	<atom:link href="http://www.bisql.net/category/utils/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bisql.net</link>
	<description>Ashley Burton&#039;s BI, SQL &#38; Mobile Dev Blog</description>
	<lastBuildDate>Tue, 24 Jan 2012 06:09:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>SQL Server Backup Compression vs. Quest Litespeed Engine</title>
		<link>http://www.bisql.net/2010/12/sql-vs-litespeed/</link>
		<comments>http://www.bisql.net/2010/12/sql-vs-litespeed/#comments</comments>
		<pubDate>Fri, 31 Dec 2010 13:50:10 +0000</pubDate>
		<dc:creator>Ash</dc:creator>
				<category><![CDATA[DBA]]></category>
		<category><![CDATA[Microsoft SQL Server]]></category>
		<category><![CDATA[Tools & Utilities]]></category>
		<category><![CDATA[2008 R2]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[litespeed]]></category>
		<category><![CDATA[quest]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>

		<guid isPermaLink="false">http://www.bisql.net/?p=704</guid>
		<description><![CDATA[As more and more functionality is built into products like SQL Server it&#8217;s always worthwhile reviewing third-party tools and utilities when you&#8217;re considering an upgrade to see (a) if they&#8217;re still required and (b) if the tools themselves need to be upgraded.  With the introduction of Backup Compression in SQL Server 2008 R2 Standard Edition [...]]]></description>
			<content:encoded><![CDATA[
<p>As more and more functionality is built into products like SQL Server it&#8217;s always worthwhile reviewing third-party tools and utilities when you&#8217;re considering an upgrade to see (a) if they&#8217;re still required and (b) if the tools themselves need to be upgraded.  With the introduction of Backup Compression in SQL Server 2008 R2 Standard Edition you could begin to think that the future is grim for Quest&#8217;s backup compression software <a title="Quest LiteSpeed" href="http://www.quest.com/litespeed-for-sql-server/" target="_blank">LiteSpeed</a> so I thought I&#8217;d do some testing to see exactly how it stacks up against the native compression.</p>
<p><strong><span style="text-decoration: underline;">LiteSpeed Engine</span></strong></p>
<p>I&#8217;ve been using LiteSpeed on and off for a few years now and it has always been a great tool but I&#8217;ve always found it a bit of a drag to have to use the GUI to administer and setup jobs however in January 2010 Quest launched the LiteSpeed Engine for SQL Server which allows you to administer jobs using the native SQL Server tools.  The LiteSpeed Engine acts as a driver and the configuration tool allows you to define a variety of configuration profiles based on file extension and from that point onwards you can use the Management Studio to setup backup jobs, maintenance plans, etc. and all you have to do is specify the file extension of the profile you wish to use.</p>
<p><img class="alignnone size-full wp-image-710" title="ls2" src="http://www.bisql.net/wp-content/uploads/2010/12/ls2.png" alt="" width="325" height="274" /></p>
<p>The configuration tool allows you specify the compression level from 1 to 8, encryption level including various bit-length versions of RC2, RC4, 3DES and AES though as you&#8217;ll see later the overhead of adding the highest level (256-bit AES) isn&#8217;t that great so I&#8217;d always shoot for the maximum.</p>
<p><strong><span style="text-decoration: underline;">Benchmark Structure</span></strong></p>
<p>The test is relatively unscientific since I used only one database but it was carried out systematically, the data comes from a transactional billing system which I chose as it has a mix of strucured tables and raw transactions and comes in at about 6.5GB so it wouldn&#8217;t take too long to test.  I used the following configurations&#8230;</p>
<p><img class="alignnone size-full wp-image-712" title="ls1" src="http://www.bisql.net/wp-content/uploads/2010/12/ls1.png" alt="" width="656" height="424" /></p>
<p><strong><span style="text-decoration: underline;">Benchmark Results</span></strong></p>
<p>On my test database the baseline SQL Server native compression reduced the 6.2GB database to 765MB (12.2% of the original size) and took less than half the time (43%), to achieve the same level of compression using LiteSpeed I had to use Level 2 which gave me 12.2% of the original size and 40% of the original duration.</p>
<p>At first this doesn&#8217;t look great for the third-party tool but the benefit of using a mature backup compression engine is the flexibility and LiteSpeed&#8217;s configurations allow you to tweak the performance to solve whatever problem you have in your environment whether that be the absolute size of the backup, the backup window time or a mixture of the two.</p>
<p>If it&#8217;s size you&#8217;re after then Level 8 really did seem to work wonders on my test DB bringing the size down to 5.6% of the original at only 352MB though it did take 2.6 times the original duration, if it&#8217;s the backup window you&#8217;re looking to reduce then the basic Level 1 did manage to improve on the native compression by taking 0nly 37% of the original duration whilst still compressing to 13% of the original size.  If like most people you&#8217;re looking to have your cake and eat it (i.e. reducing size <em>and</em> backup window) I&#8217;d suggest that Level 3 is the best compromise giving 10.9% of the original size at 77% of the original duration so you get some benefit in both areas, though Level 4 takes compression a bit further and still gave a slight time reduction.</p>
<p>Clearly, the real answer is testing and since I&#8217;m at the beginning of data warehousing project I&#8217;m not in the position to make any firm decisions but I think that even if you don&#8217;t run out and purchase it now LiteSpeed is a very valuable tool to have in your mental arsenal so that if you come up against backup size/window issues or you&#8217;re faced with older versions of SQL Server you&#8217;ve got a solution in mind already.  Quest have an odd policy of keeping pricing quite opaque but I believe that the full Enterprise version (including the LiteSpeed Engine) retails for around £1,800 ($2,800) which isn&#8217;t too bad if you need that level of flexibility.</p>
<p><span style="text-decoration: underline;">SQL Server Native Compression</span></p>

<table id="wp-table-reloaded-id-7-no-1" class="wp-table-reloaded wp-table-reloaded-id-7">
<thead>
	<tr class="row-1 odd">
		<th class="column-1">Compression</th><th class="column-2">Size (MB)</th><th class="column-3">Time (s)</th><th class="column-4">Size (%)</th><th class="column-5">Time (%)</th>
	</tr>
</thead>
<tbody>
	<tr class="row-2 even">
		<td class="column-1">Disabled</td><td class="column-2">6,261</td><td class="column-3">70</td><td class="column-4">100%</td><td class="column-5">100%</td>
	</tr>
	<tr class="row-3 odd">
		<td class="column-1">Enabled</td><td class="column-2">765</td><td class="column-3">30</td><td class="column-4">12.2%</td><td class="column-5">43%</td>
	</tr>
</tbody>
</table>

<p><span style="text-decoration: underline;">LiteSpeed Compression (No Encryption)</span></p>

<table id="wp-table-reloaded-id-8-no-1" class="wp-table-reloaded wp-table-reloaded-id-8">
<thead>
	<tr class="row-1 odd">
		<th class="column-1">Compression</th><th class="column-2">Size (MB)</th><th class="column-3">Time (s)</th><th class="column-4">Size (%)</th><th class="column-5">Time (%)</th>
	</tr>
</thead>
<tbody>
	<tr class="row-2 even">
		<td class="column-1">None</td><td class="column-2">6,262</td><td class="column-3">70</td><td class="column-4">100%</td><td class="column-5">100%</td>
	</tr>
	<tr class="row-3 odd">
		<td class="column-1">Level 1</td><td class="column-2">813</td><td class="column-3">26</td><td class="column-4">13.0%</td><td class="column-5">37%</td>
	</tr>
	<tr class="row-4 even">
		<td class="column-1">Level 2</td><td class="column-2">761</td><td class="column-3">28</td><td class="column-4">12.2%</td><td class="column-5">40%</td>
	</tr>
	<tr class="row-5 odd">
		<td class="column-1">Level 3</td><td class="column-2">680</td><td class="column-3">54</td><td class="column-4">10.9%</td><td class="column-5">77%</td>
	</tr>
	<tr class="row-6 even">
		<td class="column-1">Level 4</td><td class="column-2">649</td><td class="column-3">61</td><td class="column-4">10.4%</td><td class="column-5">87%</td>
	</tr>
	<tr class="row-7 odd">
		<td class="column-1">Level 5</td><td class="column-2">596</td><td class="column-3">122</td><td class="column-4">9.5%</td><td class="column-5">174%</td>
	</tr>
	<tr class="row-8 even">
		<td class="column-1">Level 6</td><td class="column-2">586</td><td class="column-3">151</td><td class="column-4">9.4%</td><td class="column-5">216%</td>
	</tr>
	<tr class="row-9 odd">
		<td class="column-1">Level 7</td><td class="column-2">387</td><td class="column-3">178</td><td class="column-4">6.2%</td><td class="column-5">254%</td>
	</tr>
	<tr class="row-10 even">
		<td class="column-1">Level 8</td><td class="column-2">352</td><td class="column-3">185</td><td class="column-4">5.6%</td><td class="column-5">264%</td>
	</tr>
</tbody>
</table>

<p><span style="text-decoration: underline;">LiteSpeed Compression (With Encryption)</span></p>

<table id="wp-table-reloaded-id-9-no-1" class="wp-table-reloaded wp-table-reloaded-id-9">
<thead>
	<tr class="row-1 odd">
		<th class="column-1">Compression</th><th class="column-2">Size (MB)</th><th class="column-3">Time (s)</th><th class="column-4">Size (%)</th><th class="column-5">Time (%)</th>
	</tr>
</thead>
<tbody>
	<tr class="row-2 even">
		<td class="column-1">Level 1</td><td class="column-2">813</td><td class="column-3">46</td><td class="column-4">13.0%</td><td class="column-5">66%</td>
	</tr>
	<tr class="row-3 odd">
		<td class="column-1">Level 2</td><td class="column-2">761</td><td class="column-3">31</td><td class="column-4">12.2%</td><td class="column-5">44%</td>
	</tr>
	<tr class="row-4 even">
		<td class="column-1">Level 3</td><td class="column-2">680</td><td class="column-3">60</td><td class="column-4">10.9%</td><td class="column-5">86%</td>
	</tr>
	<tr class="row-5 odd">
		<td class="column-1">Level 4</td><td class="column-2">649</td><td class="column-3">67</td><td class="column-4">10.4%</td><td class="column-5">96%</td>
	</tr>
	<tr class="row-6 even">
		<td class="column-1">Level 5</td><td class="column-2">596</td><td class="column-3">126</td><td class="column-4">9.5%</td><td class="column-5">180%</td>
	</tr>
	<tr class="row-7 odd">
		<td class="column-1">Level 6</td><td class="column-2">586</td><td class="column-3">156</td><td class="column-4">9.4%</td><td class="column-5">223%</td>
	</tr>
	<tr class="row-8 even">
		<td class="column-1">Level 7</td><td class="column-2">387</td><td class="column-3">182</td><td class="column-4">6.2%</td><td class="column-5">260%</td>
	</tr>
	<tr class="row-9 odd">
		<td class="column-1">Level 8</td><td class="column-2">352</td><td class="column-3">190</td><td class="column-4">5.6%</td><td class="column-5">271%</td>
	</tr>
</tbody>
</table>

<div class="topsy_widget_data topsy_theme_light-green" style="float: left;margin-bottom: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.bisql.net%252F2010%252F12%252Fsql-vs-litespeed%252F%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22SQL%20Server%20Backup%20Compression%20vs.%20Quest%20Litespeed%20Engine%22%20%7D);"></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bisql.net/2010/12/sql-vs-litespeed/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Google Release Command Line Tool: GoogleCL</title>
		<link>http://www.bisql.net/2010/06/google_cl_release/</link>
		<comments>http://www.bisql.net/2010/06/google_cl_release/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 04:33:14 +0000</pubDate>
		<dc:creator>Ash</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[The Cloud]]></category>
		<category><![CDATA[Tools & Utilities]]></category>
		<category><![CDATA[blogger]]></category>
		<category><![CDATA[calendar]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[docs]]></category>
		<category><![CDATA[GoogleCL]]></category>
		<category><![CDATA[picasa]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.bisql.net/?p=309</guid>
		<description><![CDATA[Having been raised on the good old fashioned ZX Spectrum and introduced to PCs via MS-DOS I have something of a nostalgic fascination with command line interfaces, there&#8217;s something beautifully simplistic about using a good command line &#8211; like you&#8217;re talking to the machine directly.  I&#8217;m not just talking about using the pseudo DOS-shell that [...]]]></description>
			<content:encoded><![CDATA[
<p>Having been raised on the good old fashioned ZX Spectrum and introduced to PCs via MS-DOS I have something of a nostalgic fascination with command line interfaces, there&#8217;s something beautifully simplistic about using a good command line &#8211; <em>like you&#8217;re talking to the machine directly</em>.  I&#8217;m not just talking about using the pseudo DOS-shell that comes with NT or the ubiquitous Unix/Linux command line, it&#8217;s the more exotic examples that pique my interest which is why I&#8217;m quite excited about the new <a title="Google command line tool" href="http://google-opensource.blogspot.com/2010/06/introducing-google-command-line-tool.html" target="_blank">Google command line tool</a>.</p>
<p>Essentially GoogleCL is a Python application that can be executed at the command-line to make calls to various Google APIs, it currently offers limited support for Blogger, Calendar, Contacts, Docs, Picasa and YouTube but I&#8217;m certain that Google will deliver more features in the future.  In terms of security, there&#8217;s a one-time authentication process for each application whereby the command-line tool launches a page in your default web browser to grant access for the GoogleCL tool.  To me, the most interesting examples that Google provide are those allowing content creation&#8230;<code></p>
<ul>
<li>google blogger post blogpost.txt</li>
<li>google calendar add "Dinner party with George today at 6pm"</li>
<li>google contacts add "J. Random Hacker, jrandom@example.com"</li>
<li>google picasa create --title "Vermont Test" --tags Vermont vermont.jpg></li>
<li>google youtube post --category Education --devtags GoogleCL killer_robots.avi</li>
</ul>
<p></code><br />
There may not be many obvious ties to the world of Business Intelligence here as GoogleCL is still in its infancy but for now at least you could perhaps drive scheduling through Google Calendar, maintain distribution lists in Google Contacts or automatically upload reports to Google Docs.  I&#8217;m quite sure the possibilities will expand over time though especially since some major Google products are currently not included (e.g. Search, Gmail) &#8211; I, for one, will be watching with great expectations.</p>
<div class="topsy_widget_data topsy_theme_light-green" style="float: left;margin-bottom: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.bisql.net%252F2010%252F06%252Fgoogle_cl_release%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2F9t15n3%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22Google%20Release%20Command%20Line%20Tool%3A%20GoogleCL%22%20%7D);"></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bisql.net/2010/06/google_cl_release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Install GoogleCL on Mac OSX Snow Leopard</title>
		<link>http://www.bisql.net/2010/06/how-to-install-googlecl-on-mac-osx-snow-leopard/</link>
		<comments>http://www.bisql.net/2010/06/how-to-install-googlecl-on-mac-osx-snow-leopard/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 03:54:17 +0000</pubDate>
		<dc:creator>Ash</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[The Cloud]]></category>
		<category><![CDATA[Tools & Utilities]]></category>
		<category><![CDATA[blogger]]></category>
		<category><![CDATA[calendar]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[Contacts]]></category>
		<category><![CDATA[docs]]></category>
		<category><![CDATA[GoogleCL]]></category>
		<category><![CDATA[picasa]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.bisql.net/?p=319</guid>
		<description><![CDATA[If you&#8217;ve not heard the buzz already Google have released a Command Line tool called GoogleCL, you can install in in Windows by following Isaac Truett&#8217;s guide to&#8221;Setup GoogleCL on WinXP&#8220; but if you&#8217;re using a Mac and you&#8217;d like to install it and have a play here&#8217;s a few simple instructions&#8230; Enable your Root login [...]]]></description>
			<content:encoded><![CDATA[
<p>If you&#8217;ve not heard the buzz already Google have released a Command Line tool called <a title="GoogleCL" href="http://google-opensource.blogspot.com/2010/06/introducing-google-command-line-tool.html" target="_blank">GoogleCL</a>, you can install in in Windows by following Isaac Truett&#8217;s guide to&#8221;<a title="Isaac Truett" href="http://publicint.blogspot.com/2010/06/setup-googlecl-on-winxp.html" target="_blank">Setup GoogleCL on WinXP</a>&#8220; but if you&#8217;re using a Mac and you&#8217;d like to install it and have a play here&#8217;s a few simple instructions&#8230;</p>
<ol>
<li>Enable your Root login (instructions from Apple in <a title="Enable Root User OSX" href="http://support.apple.com/kb/HT1528" target="_blank">KBHT1528</a>).</li>
<li>Log in as Administrator (bear in mind your normal user <em>shouldn&#8217;t</em> have Admin rights).</li>
<li>Download and install <a title="Xcode" href="http://developer.apple.com/technologies/xcode.html" target="_blank">Xcode</a>.</li>
<li>Download and install <a title="Install MacPorts" href="http://www.macports.org/install.php" target="_blank">MacPorts</a>.</li>
<li>Open up Terminal.</li>
<li>Edit your &#8216;paths&#8217; file: sudo vi /etc/paths</li>
<li>Add a new line (press &#8216;i&#8217; then scroll to the bottom first): &#8220;<code>/opt/local/bin</code>&#8220;.</li>
<li>Save the file (press ESC, then type &#8220;wq!&#8221;).</li>
<li>Close Terminal and re-open.</li>
<li>Type: <code>sudo port install googlecl</code>, and press Enter (this takes a while).</li>
<li>Log off as the Administrator.</li>
<li>Log back in as yourself and test (see <a title="GoogleCL Examples" href="http://code.google.com/p/googlecl/wiki/ExampleScripts" target="_blank">examples</a>).</li>
</ol>
<div class="topsy_widget_data topsy_theme_light-green" style="float: left;margin-bottom: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.bisql.net%252F2010%252F06%252Fhow-to-install-googlecl-on-mac-osx-snow-leopard%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FbBI7XW%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22How%20To%20Install%20GoogleCL%20on%20Mac%20OSX%20Snow%20Leopard%20%20%22%20%7D);"></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bisql.net/2010/06/how-to-install-googlecl-on-mac-osx-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FTP MGET &#8211; Get Multiple Files Without Prompt</title>
		<link>http://www.bisql.net/2010/04/ftp-mget-get-multiple-files-without-prompt/</link>
		<comments>http://www.bisql.net/2010/04/ftp-mget-get-multiple-files-without-prompt/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 11:05:19 +0000</pubDate>
		<dc:creator>Ash</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Tools & Utilities]]></category>
		<category><![CDATA[FileZilla]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[FTPS]]></category>
		<category><![CDATA[MGET]]></category>
		<category><![CDATA[PROMPT]]></category>
		<category><![CDATA[Secure FTP]]></category>
		<category><![CDATA[SFTP]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[VERBOSE]]></category>

		<guid isPermaLink="false">http://bisql.net/?p=225</guid>
		<description><![CDATA[Every now and again I have to use FTP (and Secure FTP) from the command line, in fact it&#8217;s actually my preferred method as it keeps my knowledge of the syntax nice and sharp rather than relying on GUI clients (though if you do need a good free FTP, SFTP and FTPS application you should try [...]]]></description>
			<content:encoded><![CDATA[
<p>Every now and again I have to use FTP (and Secure FTP) from the command line, in fact it&#8217;s actually my preferred method as it keeps my knowledge of the syntax nice and sharp rather than relying on GUI clients (though if you do need a good free FTP, SFTP and FTPS application you should try <a title="FileZilla" href="http://filezilla-project.org/" target="_blank">FileZilla</a>). </p>
<p>Today I had to retrieve a set of log files from a supplier, we can use the <strong>MGET</strong> command to fetch multiple files using wildcards (e.g. *.csv) but the default behaviour of <strong>MGET</strong> is to ask the user to confirm that they want to download every file &#8211; not very convenient if you&#8217;re talking about tens of thousands of logs!  Instead of resting a book and a penlid on the &#8216;Y&#8217; key (I&#8217;ve seen it done) you can turn off the interactive prompts simply by issuing the <strong>PROMPT</strong> command to toggle on/off the prompts. </p>
<p>Additionally if you&#8217;d like your FTP responses to be less wordy you can use the <strong>VERBOSE</strong> command which will pare down responses to the minimum.</p>
<div class="topsy_widget_data topsy_theme_light-green" style="float: left;margin-bottom: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.bisql.net%252F2010%252F04%252Fftp-mget-get-multiple-files-without-prompt%252F%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22FTP%20MGET%20-%20Get%20Multiple%20Files%20Without%20Prompt%22%20%7D);"></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bisql.net/2010/04/ftp-mget-get-multiple-files-without-prompt/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Extract Rows from Files using QGrep</title>
		<link>http://www.bisql.net/2009/12/qgrep/</link>
		<comments>http://www.bisql.net/2009/12/qgrep/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 07:23:35 +0000</pubDate>
		<dc:creator>Ash</dc:creator>
				<category><![CDATA[Tools & Utilities]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[flat files]]></category>
		<category><![CDATA[text]]></category>

		<guid isPermaLink="false">http://bisql.net/?p=27</guid>
		<description><![CDATA[Whether you work with enterprise Data Warehouses, departmental Data Marts or live operational OLTP systems there&#8217;s a good chance that at some point you&#8217;ll have a need to import or export data using flat files.  Flat files are great to read because they&#8217;re typically in common easy to understand formats such as CSV, the problem [...]]]></description>
			<content:encoded><![CDATA[
<p><img class="alignright size-medium wp-image-30" title="Pestle and Mortar" src="http://bisql.net/wp-content/uploads/2009/12/iStock_000010894098XSmall-200x300.jpg" alt="Pestle and Mortar" width="108" height="162" />Whether you work with enterprise Data Warehouses, departmental Data Marts or live operational OLTP systems there&#8217;s a good chance that at some point you&#8217;ll have a need to import or export data using flat files.  Flat files are great to read because they&#8217;re typically in common easy to understand formats such as CSV, the problem comes when you&#8217;ve got extremely large volumes of data that exceed your ability to handle them in Excel (e.g. over 65,536 rows for Excel 2003) or when you absolutely must preserve the initial file format.</p>
<p>I had a requirement recently to extract all rows relating to just one customer from an input file containing tens of thousands of rows and I had to leave the structure intact so that the existing SSIS loader would recognise the file.  Sadly the standard Windows command-line utilities are a bit lacking in this regard but you can download the <a href="http://www.microsoft.com/DOWNLOADS/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&amp;displaylang=en" target="_blank">Windows Server 2003 Resource Kit</a> which among other things includes the <a title="QGREP" href="http://ss64.com/nt/qgrep.html" target="_blank">QGrep</a> tool.</p>
<p><a href="http://ss64.com/nt/qgrep.html" target="_blank">QGrep</a> is simply a Windows equivalent of the <a href="http://en.wikipedia.org/wiki/Grep" target="_blank">Grep</a> command available in Linux and Unix, there is no GUI but if you&#8217;re doing something simple the syntax is fairly straight-forward (see <a href="http://ss64.com/nt/qgrep.html" target="_blank">SS64.com</a> for more info), in my case I needed to extract all records from &#8220;input.csv&#8221; containing the CustomerID &#8220;476226235076&#8243; and place them in &#8220;output.csv&#8221; so the command was&#8230;<br />
<span style="font-family: Courier New; font-size: small;"><br />
<strong>qgrep &#8220;476226235076&#8243; inputs.csv &gt; output.csv</strong><br />
</span></p>
<div class="topsy_widget_data topsy_theme_light-green" style="float: left;margin-bottom: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.bisql.net%252F2009%252F12%252Fqgrep%252F%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22Extract%20Rows%20from%20Files%20using%20QGrep%22%20%7D);"></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bisql.net/2009/12/qgrep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful SQL Colouring Tool</title>
		<link>http://www.bisql.net/2009/11/useful-sql-colouring-tool/</link>
		<comments>http://www.bisql.net/2009/11/useful-sql-colouring-tool/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 13:31:26 +0000</pubDate>
		<dc:creator>Ash</dc:creator>
				<category><![CDATA[Tools & Utilities]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://bisql.net/?p=9</guid>
		<description><![CDATA[I guess it depends on your background but if you&#8217;re anything like me you&#8217;ll prefer to have your SQL coloured and formatted, I began writing SQL in Microsoft SQL Server&#8217;s Query Analyser which colours comments green, keywords blue, aggregate functions pink and string values in red &#8211; and it&#8217;s something I (almost) can&#8217;t live without. [...]]]></description>
			<content:encoded><![CDATA[
<p><img class="size-thumbnail wp-image-14 alignright" title="Crayons" src="http://bisql.net/wp-content/uploads/2009/11/iStock_000003962399XSmall-150x150.jpg" alt="Crayons" width="120" height="120" /></p>
<p>I guess it depends on your background but if you&#8217;re anything like me you&#8217;ll prefer to have your SQL coloured and formatted, I began writing SQL in Microsoft SQL Server&#8217;s Query Analyser which colours comments green, keywords blue, aggregate functions pink and string values in red &#8211; and it&#8217;s something I (almost) can&#8217;t live without.</p>
<p>It&#8217;s become a fairly common scheme for viewing SQL and years of being used to colours mean that reading too much monochrome SQL drives me crazy so when I started this blog I was a concerned about how off-putting it would be if I posted reams of plain old SQL, luckily a bit of Googling led to me finding <a title="Instant SQL Formatter" href="http://www.dpriver.com/pp/sqlformat.htm" target="_blank">Instant SQL Formatter</a>.</p>
<p><a title="Instant SQL Formatter" href="http://www.dpriver.com/pp/sqlformat.htm" target="_blank">Instant SQL Formatter</a> allows you to format and colour a SQL statement and then provides you with the HTML that you can paste right into your blog, there are also lots of options to tweak the formatting based on how you&#8217;d like to see the SQL laid out.  Here&#8217;s some example SQL I wrote using the tool&#8230;</p>
<p><span style="font-family: Courier New; font-size:small;"><br />
<span style="color: green;"><em>&#8211; TESTING COLOURED SQL QUERY</em></span><br />
<span style="color: blue;">SELECT</span> <span style="color: maroon;">Species</span><span style="color: silver;">,</span><br />
<span style="color: fuchsia;"><em>COUNT</em></span><span style="color: maroon;">(</span><span style="color: blue;">DISTINCT</span> <span style="color: maroon;">AnimalID</span><span style="color: maroon;">)</span> <span style="color: blue;">AS</span> <span style="color: maroon;">NumberOfAnimals</span><br />
<span style="color: blue;">FROM</span> <span style="color: maroon;">tblAnimal</span><br />
<span style="color: blue;">WHERE</span> <span style="color: maroon;">Species</span> <span style="color: blue;">IN</span> <span style="color: maroon;">(</span><span style="color: red;">&#8216;Bonobo&#8217;</span><span style="color: silver;">,</span><span style="color: red;">&#8216;Vervet&#8217;</span><span style="color: silver;">,</span><span style="color: red;">&#8216;Chimpanzee&#8217;</span><span style="color: maroon;">)</span><br />
<span style="color: blue;">AND</span> <span style="color: maroon;">IsHealthy</span> <span style="color: silver;">=</span> <span style="color: black;">1</span><br />
<span style="color: blue;">GROUP</span> <span style="color: blue;">BY</span> <span style="color: maroon;">Species</span><br />
<span style="color: blue;">HAVING</span> <span style="color: fuchsia;"><em>COUNT</em></span><em> </em><span style="color: maroon;">(</span><span style="color: blue;">DISTINCT</span> <span style="color: maroon;">AnimalID</span><span style="color: maroon;">)</span> <span style="color: silver;">&gt;</span> <span style="color: black;">1</span></span></p>
<p><span style="font-family: Courier New; font-size: x-small;"><br />
</span></p>
<div class="topsy_widget_data topsy_theme_light-green" style="float: left;margin-bottom: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.bisql.net%252F2009%252F11%252Fuseful-sql-colouring-tool%252F%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22Useful%20SQL%20Colouring%20Tool%22%20%7D);"></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bisql.net/2009/11/useful-sql-colouring-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQLBits V: Highlights from Friday Afternoon</title>
		<link>http://www.bisql.net/2009/11/sqlbits-v-highlights-from-friday-afternoon/</link>
		<comments>http://www.bisql.net/2009/11/sqlbits-v-highlights-from-friday-afternoon/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 22:45:07 +0000</pubDate>
		<dc:creator>Ash</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Microsoft SQL Server]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[Tools & Utilities]]></category>
		<category><![CDATA[Allan Mitchell]]></category>
		<category><![CDATA[BIDS]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[DTS]]></category>
		<category><![CDATA[IO]]></category>
		<category><![CDATA[IOPS]]></category>
		<category><![CDATA[short stroking]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQLBits]]></category>
		<category><![CDATA[Thomas Kejser]]></category>

		<guid isPermaLink="false">http://bisql.net/?p=123</guid>
		<description><![CDATA[Having attended the SQL Bits conference in Newport last month I decided to collate the little tips and tricks I learned at the event, in the challenging post-lunch session on Friday Thomas Kejser gave a talk on Designing I/O Systems for SQL Server &#8211; my notes from this talk are either short, sharp facts or [...]]]></description>
			<content:encoded><![CDATA[
<p><img class="alignright size-medium wp-image-133" title="HDD" src="http://bisql.net/wp-content/uploads/2009/11/iStock_000005718142XSmall-300x199.jpg" alt="HDD" width="168" height="111" />Having attended the <a href="http://sqlbits.com/" target="_blank">SQL Bits </a>conference in Newport last month I decided to collate the little tips and tricks I learned at the event, in the challenging post-lunch session on Friday Thomas Kejser gave a talk on Designing I/O Systems for SQL Server &#8211; my notes from this talk are either short, sharp facts or references to thing I plan to research further&#8230;</p>
<p>The most important metrics are Throughput (measured in MB/sec or IOPS) and Latency (milliseconds).</p>
<p>A 10K RPM disk will give 100-130 IOPS, a 15K RPM disk will give 150-180 IOPS.</p>
<p>Performance can be increased by <em><strong>short-stroking</strong></em> disks, if you build a single partition on a drive using only 10% of it&#8217;s capacity this partition will reside physically on the outer edge of the disk.  Doing this reduces the amount of head movement required to read the data and improves performance.</p>
<p>Windows Server 2008 handles disk alignment automatically but for earlier versions the  offset should be 1024kb.</p>
<p>For testing the effect of configurations on performance use SQLIO.EXE or IOMeter, for stability testing use SQLIOSIM.</p>
<p>Check out the <a title="Pre-Deployment Best Practices Whitepaper" href="http://technet.microsoft.com/en-gb/library/cc966412.aspx" target="_blank">Pre-Deployment Best Practices Whitepaper </a>from Microsoft.</p>
<p>The last talk of the day was by Allan Mitchell and was initially titled Common Integration Services Problems but was changed late-on to a more introductory Solving Problems in ETL using SSIS.  The only take-away I got from the talk was to check out a tool called <a title="BIDS Helper" href="http://www.codeplex.com/bidshelper" target="_blank">BIDS Helper</a>, I have no criticism of Allan though &#8211; he&#8217;s a good speaker but in this case I already understood the bulk of the content so it was hard to stay focused.</p>
<div class="topsy_widget_data topsy_theme_light-green" style="float: left;margin-bottom: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.bisql.net%252F2009%252F11%252Fsqlbits-v-highlights-from-friday-afternoon%252F%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22SQLBits%20V%3A%20Highlights%20from%20Friday%20Afternoon%22%20%7D);"></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bisql.net/2009/11/sqlbits-v-highlights-from-friday-afternoon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

