<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Dev Blog</title>
	<atom:link href="http://blog.nhaslam.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nhaslam.com</link>
	<description>Thoughts on SQL Server, MS BI, SSAS &#38; other random gubbins</description>
	<lastBuildDate>Sun, 29 Jan 2012 13:49:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.nhaslam.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Dev Blog</title>
		<link>http://blog.nhaslam.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.nhaslam.com/osd.xml" title="Dev Blog" />
	<atom:link rel='hub' href='http://blog.nhaslam.com/?pushpress=hub'/>
		<item>
		<title>Reinstalling &amp; Slipstreaming SQL Server</title>
		<link>http://blog.nhaslam.com/2012/01/29/reinstalling-slipstreaming-sql-server/</link>
		<comments>http://blog.nhaslam.com/2012/01/29/reinstalling-slipstreaming-sql-server/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 13:49:26 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[MCMPrep]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[mcmprep]]></category>
		<category><![CDATA[Sqlserver]]></category>

		<guid isPermaLink="false">https://nicksmsblog.wordpress.com/?p=541</guid>
		<description><![CDATA[On Friday, I was looking to get the SNMP integration working on SQL Server. However, it turns out that to get this functionality, you need to have the SNMP server running when SQL Server is installed. Sadly this wasn&#8217;t the case. To fix this, I needed to uninstall SQL, check the SNMP server was running [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nhaslam.com&amp;blog=9290707&amp;post=541&amp;subd=nicksmsblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>On Friday, I was looking to get the SNMP integration working on SQL Server. However, it turns out that to get this functionality, you need to have the SNMP server running when SQL Server is installed. Sadly this wasn&#8217;t the case. To fix this, I needed to uninstall SQL, check the SNMP server was running (as I&#8217;d now installed it) and reinstall SQL.</p>
<p>Sounds straightforward doesn&#8217;t it.. It wasn&#8217;t. </p>
<p>Uninstalling was the most straightforward part. When I tried to reinstall, I was told that the version of Visual Studio 2008 needed to be Service Packed (SP1), so I did that. Then when i tried to reinstall again, I started getting lots of other error messages which appeared to have assorted issues.</p>
<p>The resolutions to these issues were around corrupt registry settings (I cleaned those out), corrupt setup files (I changed the install location, which seemed a little random, as a fix) and corrupt ISO images (downloaded a fresh install, and I love my MSDN account, and the Fibre Internet connection!). None of these worked.</p>
<p>The last item I saw, at 10:30pm, on a Saturday night was to create a slipstream build of SQL Server 2008 R2, with SP1 in it, since this would resolve the issues in the installer files. I found a really useful article on creating this (<a href="http://blogs.msdn.com/b/petersad/archive/2011/07/13/how-to-slipstream-sql-server-2008-r2-and-a-sql-server-2008-r2-service-pack-1-sp1.aspx">http://blogs.msdn.com/b/petersad/archive/2011/07/13/how-to-slipstream-sql-server-2008-r2-and-a-sql-server-2008-r2-service-pack-1-sp1.aspx</a>), and having followed that through, SQL successfully installed.</p>
<p>While this was a complete pain to fix, and did have me wondering if I&#8217;d need to rebuild the laptop, since I knew the ISO was fine (as I&#8217;d installed a VM from it during this whole process), it did help me as it&#8217;s been quite a while since I&#8217;ve had to deal with installer issues. Also, I&#8217;ve certainly never created a slipstream build of SQL Server, which I can now do. </p>
<p>It&#8217;s all good MCM Prep. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicksmsblog.wordpress.com/541/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicksmsblog.wordpress.com/541/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicksmsblog.wordpress.com/541/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicksmsblog.wordpress.com/541/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicksmsblog.wordpress.com/541/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicksmsblog.wordpress.com/541/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicksmsblog.wordpress.com/541/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicksmsblog.wordpress.com/541/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicksmsblog.wordpress.com/541/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicksmsblog.wordpress.com/541/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicksmsblog.wordpress.com/541/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicksmsblog.wordpress.com/541/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicksmsblog.wordpress.com/541/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicksmsblog.wordpress.com/541/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nhaslam.com&amp;blog=9290707&amp;post=541&amp;subd=nicksmsblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nhaslam.com/2012/01/29/reinstalling-slipstreaming-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9325f1a3220c8f20f2dbb7696a4e8290?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nhaslam</media:title>
		</media:content>
	</item>
		<item>
		<title>Loading Reference Data from a SharePoint List using SSIS</title>
		<link>http://blog.nhaslam.com/2012/01/26/loading-reference-data-from-a-sharepoint-list-using-ssis/</link>
		<comments>http://blog.nhaslam.com/2012/01/26/loading-reference-data-from-a-sharepoint-list-using-ssis/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 11:46:19 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[T-SQL]]></category>

		<guid isPermaLink="false">https://nicksmsblog.wordpress.com/?p=535</guid>
		<description><![CDATA[Recently, I’ve been working on a project where the reference data is stored in SharePoint lists. While it is possible to get the information out of the SQL Server database directly, using something like the T-SQL below, it’s a bit messy. 1: SELECT dbo.UserData.tp_ID, 2: dbo.UserData.tp_ListId, 3: dbo.UserData.tp_Author, 4: dbo.UserData.nvarchar1, 5: dbo.UserData.nvarchar2, 6: dbo.UserData.nvarchar3 7: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nhaslam.com&amp;blog=9290707&amp;post=535&amp;subd=nicksmsblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently, I’ve been working on a project where the reference data is stored in SharePoint lists. While it is possible to get the information out of the SQL Server database directly, using something like the T-SQL below, it’s a bit messy.</p>
<div id="codeSnippetWrapper" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:'Courier New', courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;cursor:text;border:silver 1px solid;margin:20px 0 10px;padding:4px;">
<div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum1" style="color:#606060;"> 1:</span> <span style="color:#0000ff;">SELECT</span>      dbo.UserData.tp_ID,</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum2" style="color:#606060;"> 2:</span>    dbo.UserData.tp_ListId,</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum3" style="color:#606060;"> 3:</span>    dbo.UserData.tp_Author,</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum4" style="color:#606060;"> 4:</span>    dbo.UserData.nvarchar1,</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum5" style="color:#606060;"> 5:</span>    dbo.UserData.nvarchar2,</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum6" style="color:#606060;"> 6:</span>    dbo.UserData.nvarchar3</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum7" style="color:#606060;"> 7:</span> <span style="color:#0000ff;">FROM</span>            dbo.Lists</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum8" style="color:#606060;"> 8:</span> <span style="color:#0000ff;">INNER</span> <span style="color:#0000ff;">JOIN</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum9" style="color:#606060;"> 9:</span>                  dbo.UserData <span style="color:#0000ff;">ON</span> dbo.Lists.tp_ID = dbo.UserData.tp_ListId</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum10" style="color:#606060;"> 10:</span> <span style="color:#0000ff;">WHERE</span>    (dbo.Lists.tp_title <span style="color:#0000ff;">like</span> <span style="color:#006080;">'TestList'</span>)</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum11" style="color:#606060;"> 11:</span></pre>
</div>
</div>
<p>I wasn’t able to use this to get the data out, as the client doesn’t allow direct access to the SharePoint database, which is entirely reasonable, given that it’s their corporate intranet.</p>
<p>To get around this, I found a very useful set of additional modules for Integration Services (<a title="http://sqlsrvintegrationsrv.codeplex.com/" href="http://sqlsrvintegrationsrv.codeplex.com/">http://sqlsrvintegrationsrv.codeplex.com/</a>), one of which is a SharePoint List Source and Destination. These then allow you to read the data directly.</p>
<h3>Using the SharePoint List Source &amp; Destinations</h3>
<p>1. The first step is to download the SharePoint List Source and Destination module from <a title="http://sqlsrvintegrationsrv.codeplex.com/" href="http://sqlsrvintegrationsrv.codeplex.com/">http://sqlsrvintegrationsrv.codeplex.com/</a>, and install it.</p>
<p>2. Having done that, you need to start up BIDS (BI Development Studio / VS 2008) and create an ‘Integration Services Package’.</p>
<p>3. You’ll need to add the two new Data flow items into the Toolbox (in Tools &gt; Choose Toolbox Items, in the SSIS Data Flow Items section)</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2012/01/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;margin:4px 10px;" title="image" src="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb.png?w=644&#038;h=458" alt="image" width="644" height="458" border="0" /></a></p>
<p>4. Add a Dataflow Task to the Control Flow in the SSIS Package.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2012/01/image1.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb1.png?w=162&#038;h=72" alt="image" width="162" height="72" border="0" /></a></p>
<p>5. Right click on the Connection Manager Section at the bottom of the Control Flow, and choose SPCRED (Connection Manager for SharePoint Connections). Click OK, when the Dialog for the SharePoint Connection opens.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2012/01/image2.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb2.png?w=644&#038;h=429" alt="image" width="644" height="429" border="0" /></a></p>
<p>6. Then drill into the Data Flow Task, to take you to the Data Flow. In there, drag in a SharePoint List Source</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2012/01/image3.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;margin:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb3.png?w=151&#038;h=55" alt="image" width="151" height="55" border="0" /></a></p>
<p>7. Right click on the List Source, choose Show Advanced Editor. In the Connection Managers tab, pick the SharePoint Connection you created in step 5.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2012/01/image4.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb4.png?w=644&#038;h=264" alt="image" width="644" height="264" border="0" /></a></p>
<p>8. Next, click on the Component Properties tab. In this tab, you need to specify the Name of your SharePoint list (SiteListName) and the URL of your SharePoint server (SiteUrl). The SiteUrl is the Parent site within which your List appears. If you want to filter the information from SharePoint, you can modify the CamlQuery section in here, and add a <a href="http://msdn.microsoft.com/en-us/library/ie/dd588092(v=office.11).aspx" target="_blank">SharePoint CAML query</a>.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2012/01/image5.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb5.png?w=538&#038;h=484" alt="image" width="538" height="484" border="0" /></a></p>
<p>9. Once you’ve populated this, click on Refresh, and if everything is working, you’ll be able to move to the next tab. If there are errors (such as an incorrect SiteUrl), you’ll get errors like the one below.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2012/01/image6.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb6.png?w=644&#038;h=228" alt="image" width="644" height="228" border="0" /></a></p>
<p>10. Moving on to the Column Mappings tab, then gives you a list of fields and mappings, representing the Available fields from SharePoint (on the left) and fields that will be available to pass out of the List Source (on the right). You can remove fields that are not relevant here, if you’d like, then click Ok, to return to the Data Flow.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2012/01/image7.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb7.png?w=482&#038;h=484" alt="image" width="482" height="484" border="0" /></a></p>
<p>11. We need to add an OLE DB Connection manager, by right clicking Connection Managers at the bottom, and choosing ‘New OLE DB Connection’.</p>
<p>12. To get the SharePoint list contents into a database table, we need to add an OLE DB Destination, so drag that into the Data Flow and hook the Green output from the SharePoint List Source to the top of the OLE DB Destination. You’ll then see that there is a red X on the OLE DB Destination, so we need to make some changes.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2012/01/image8.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;margin:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb8.png?w=154&#038;h=155" alt="image" width="154" height="155" border="0" /></a></p>
<p>13. Since we need to make changes to the OLE DB Destination, double click on the OLE DB Destination. As shown below, we need to specify a table for the SharePoint data to go to. The drop down list has a list of the tables in the database connected to the OLE DB Connection Manager, so pick a table (if you’ve made one already) or click new to create a new table.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2012/01/image9.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb9.png?w=644&#038;h=405" alt="image" width="644" height="405" border="0" /></a></p>
<p>14. Then click ‘Mappings’ on the left, and it’s possible to link the field in the source (SharePoint List) to your destination table.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2012/01/image10.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb10.png?w=644&#038;h=403" alt="image" width="644" height="403" border="0" /></a></p>
<p>15. You’ll then be able to run this SSIS Package, and assuming all is running successfully, you’ll see green boxes.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2012/01/image11.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;margin:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb11.png?w=171&#038;h=174" alt="image" width="171" height="174" border="0" /></a></p>
<p>NOTE: Any text fields that are stored in SharePoint Lists, are stored as Unicode strings in the database (so nvarchar).</p>
<p>Further documentation on using these adapters is <a href="http://sqlsrvintegrationsrv.codeplex.com/wikipage?title=SharePoint%20List%20Adapters&amp;referringTitle=Documentation" target="_blank">available here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicksmsblog.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicksmsblog.wordpress.com/535/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicksmsblog.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicksmsblog.wordpress.com/535/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicksmsblog.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicksmsblog.wordpress.com/535/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicksmsblog.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicksmsblog.wordpress.com/535/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicksmsblog.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicksmsblog.wordpress.com/535/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicksmsblog.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicksmsblog.wordpress.com/535/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicksmsblog.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicksmsblog.wordpress.com/535/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nhaslam.com&amp;blog=9290707&amp;post=535&amp;subd=nicksmsblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nhaslam.com/2012/01/26/loading-reference-data-from-a-sharepoint-list-using-ssis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9325f1a3220c8f20f2dbb7696a4e8290?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nhaslam</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb7.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb8.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb10.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2012/01/image_thumb11.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Going Native with SQL Server &#8211; Introduction</title>
		<link>http://blog.nhaslam.com/2011/12/19/going-native-with-sql-server-introduction/</link>
		<comments>http://blog.nhaslam.com/2011/12/19/going-native-with-sql-server-introduction/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 20:35:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[Native]]></category>

		<guid isPermaLink="false">https://nicksmsblog.wordpress.com/?p=507</guid>
		<description><![CDATA[This is the first in a series of blog posts I’m planning to do, in preparation for a potential SQLBits session in March 2012. This article will introduce how, at the most basic level, SQL Server can be communicated with using C++ and Native code, rather than using the .NET Framework. The code shown below [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nhaslam.com&amp;blog=9290707&amp;post=507&amp;subd=nicksmsblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is the first in a series of blog posts I’m planning to do, in preparation for a potential <a href="http://www.sqlbits.com/Sessions/Event10/Going_Native_with_SQL_Server_2012_and_C_" target="_blank">SQLBits</a> session in March 2012.</p>
<p>This article will introduce how, at the most basic level, SQL Server can be communicated with using C++ and Native code, rather than using the .NET Framework.</p>
<p>The code shown below follows through the basic process, defined in the general <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms714078(v=VS.85).aspx" target="_blank">flowchart for ODBC Applications</a> as seen on MSDN. This was created in VS2010.</p>
<p>Using this process, we connect to a server (a local copy of SQL Server, with AdventureWorks 2008 R2, and does a straightforward query against it to do a Row Count of the Person table.</p>
<div id="codeSnippetWrapper" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:'Courier New', courier, monospace;direction:ltr;max-height:400px;font-size:8pt;overflow:auto;cursor:text;border:silver 1px solid;margin:20px 0 10px;padding:4px;">
<div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum1" style="color:#606060;"> 1:</span> <span style="color:#008000;">// The bare basics to query SQL Server, using the Native Client, in C++</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum2" style="color:#606060;"> 2:</span> <span style="color:#008000;">//</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum3" style="color:#606060;"> 3:</span> <span style="color:#cc6633;">#include</span> <span style="color:#006080;">"stdafx.h"</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum4" style="color:#606060;"> 4:</span> <span style="color:#cc6633;">#include</span> &lt;iostream&gt;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum5" style="color:#606060;"> 5:</span> <span style="color:#0000ff;">using</span> <span style="color:#0000ff;">namespace</span> std;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum6" style="color:#606060;"> 6:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum7" style="color:#606060;"> 7:</span> <span style="color:#cc6633;">#define</span> _SQLNCLI_ODBC_</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum8" style="color:#606060;"> 8:</span> <span style="color:#cc6633;">#include</span> <span style="color:#006080;">"sqlncli.h"</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum9" style="color:#606060;"> 9:</span> <span style="color:#cc6633;">#include</span> <span style="color:#006080;">"sqlext.h"</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum10" style="color:#606060;"> 10:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum11" style="color:#606060;"> 11:</span> <span style="color:#0000ff;">int</span> _tmain(<span style="color:#0000ff;">int</span> argc, _TCHAR* argv[])</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum12" style="color:#606060;"> 12:</span> {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum13" style="color:#606060;"> 13:</span>     <span style="color:#008000;">// Define Handles</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum14" style="color:#606060;"> 14:</span>     SQLHANDLE hEnv, hDBCCount, hStmtCount;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum15" style="color:#606060;"> 15:</span>     SQLINTEGER iRowCount, iRowCountInd;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum16" style="color:#606060;"> 16:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum17" style="color:#606060;"> 17:</span>     <span style="color:#0000ff;">char</span> sConnString[120] = <span style="color:#006080;">"Driver={SQL Server Native Client 10.0};Server=localhost;Database=AdventureWorks2008R2;Trusted_Connection=yes;"</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum18" style="color:#606060;"> 18:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum19" style="color:#606060;"> 19:</span>     <span style="color:#008000;">// Step 1 - Assigning an Environment Variable</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum20" style="color:#606060;"> 20:</span>     SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &amp;hEnv);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum21" style="color:#606060;"> 21:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum22" style="color:#606060;"> 22:</span>     <span style="color:#008000;">// Step 1 - Declaring the use of ODBCv3</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum23" style="color:#606060;"> 23:</span>     SQLSetEnvAttr(hEnv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER) SQL_OV_ODBC3, 0);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum24" style="color:#606060;"> 24:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum25" style="color:#606060;"> 25:</span>     <span style="color:#008000;">// Step 1 - Creating a Connection Handle</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum26" style="color:#606060;"> 26:</span>     SQLAllocHandle(SQL_HANDLE_DBC, hEnv, &amp;hDBCCount);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum27" style="color:#606060;"> 27:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum28" style="color:#606060;"> 28:</span>     <span style="color:#008000;">// Step 1 - Setting Connection Attributes</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum29" style="color:#606060;"> 29:</span>     SQLSetConnectAttr(hDBCCount, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER) SQL_AUTOCOMMIT_OFF, SQL_IS_INTEGER);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum30" style="color:#606060;"> 30:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum31" style="color:#606060;"> 31:</span>     <span style="color:#008000;">// Step 1 - Initiating the connection to SQL Server</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum32" style="color:#606060;"> 32:</span>     SQLDriverConnect(hDBCCount, NULL, (SQLTCHAR *) sConnString, SQL_NTS, NULL, 0, NULL, SQL_DRIVER_NOPROMPT);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum33" style="color:#606060;"> 33:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum34" style="color:#606060;"> 34:</span>     <span style="color:#008000;">// Step 2 - Creating a Handle for the Statement</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum35" style="color:#606060;"> 35:</span>     SQLAllocHandle(SQL_HANDLE_STMT, hDBCCount, &amp;hStmtCount);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum36" style="color:#606060;"> 36:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum37" style="color:#606060;"> 37:</span>     <span style="color:#008000;">// Step 3 - Connecting to AdventureWorks2008R2</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum38" style="color:#606060;"> 38:</span>     SQLExecDirect(hStmtCount, (SQLTCHAR *)<span style="color:#006080;">"USE AdventureWorks2008R2;"</span>, SQL_NTS);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum39" style="color:#606060;"> 39:</span>     cout &lt;&lt; <span style="color:#006080;">"USE AdventureWorks2008R2;"</span> &lt;&lt; endl;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum40" style="color:#606060;"> 40:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum41" style="color:#606060;"> 41:</span>     <span style="color:#008000;">// Step 3 - Executing Query against Person.Person table</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum42" style="color:#606060;"> 42:</span>     SQLExecDirect(hStmtCount, (SQLCHAR *)<span style="color:#006080;">"select count(1) from Person.Person;"</span> , SQL_NTS);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum43" style="color:#606060;"> 43:</span>     cout &lt;&lt; <span style="color:#006080;">"select count(1) from Person.Person;"</span> &lt;&lt; endl;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum44" style="color:#606060;"> 44:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum45" style="color:#606060;"> 45:</span>     <span style="color:#008000;">// Step 4a - Assigning a variable to the return column</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum46" style="color:#606060;"> 46:</span>     SQLBindCol(hStmtCount, 1,SQL_C_ULONG, &amp;iRowCount, 0, &amp;iRowCountInd);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum47" style="color:#606060;"> 47:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum48" style="color:#606060;"> 48:</span>     <span style="color:#008000;">// Step 4a - Retrieving the data from the return dataset</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum49" style="color:#606060;"> 49:</span>     SQLFetch(hStmtCount);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum50" style="color:#606060;"> 50:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum51" style="color:#606060;"> 51:</span>     cout &lt;&lt; <span style="color:#006080;">"Rows = "</span> &lt;&lt; iRowCount &lt;&lt; endl;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum52" style="color:#606060;"> 52:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum53" style="color:#606060;"> 53:</span>     <span style="color:#008000;">// Step 4a - Remove the Cursor</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum54" style="color:#606060;"> 54:</span>     SQLCloseCursor(hStmtCount);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum55" style="color:#606060;"> 55:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum56" style="color:#606060;"> 56:</span>     <span style="color:#008000;">// Step 5 - Closing down and Cleaning up</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum57" style="color:#606060;"> 57:</span>     SQLDisconnect(hDBCCount);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum58" style="color:#606060;"> 58:</span>     SQLFreeHandle(SQL_HANDLE_DBC,hDBCCount);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum59" style="color:#606060;"> 59:</span>     SQLFreeHandle(SQL_HANDLE_ENV, hEnv);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum60" style="color:#606060;"> 60:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum61" style="color:#606060;"> 61:</span>     <span style="color:#0000ff;">return</span> 0;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum62" style="color:#606060;"> 62:</span> }</pre>
</div>
</div>
<p>Over the coming weeks, I’ll be expanding on this to get better performance for more complex processes and going through what each of these sections to.</p>
<p>I hope you find these articles interesting.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicksmsblog.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicksmsblog.wordpress.com/507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicksmsblog.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicksmsblog.wordpress.com/507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicksmsblog.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicksmsblog.wordpress.com/507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicksmsblog.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicksmsblog.wordpress.com/507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicksmsblog.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicksmsblog.wordpress.com/507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicksmsblog.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicksmsblog.wordpress.com/507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicksmsblog.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicksmsblog.wordpress.com/507/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nhaslam.com&amp;blog=9290707&amp;post=507&amp;subd=nicksmsblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nhaslam.com/2011/12/19/going-native-with-sql-server-introduction/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9325f1a3220c8f20f2dbb7696a4e8290?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nhaslam</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Server ODBC on Linux</title>
		<link>http://blog.nhaslam.com/2011/12/12/sql-server-odbc-on-linux/</link>
		<comments>http://blog.nhaslam.com/2011/12/12/sql-server-odbc-on-linux/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 13:36:34 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">https://nicksmsblog.wordpress.com/?p=500</guid>
		<description><![CDATA[Disclaimer : I’m not a Linux Expert, and I’m sure that doing everything as root is bad, just like doing everything as a Domain Admin account is bad. Having seen that the CTP version of the Microsoft SQL Server ODBC Driver for Linux has been released, I thought that it would be an interesting thing [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nhaslam.com&amp;blog=9290707&amp;post=500&amp;subd=nicksmsblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Disclaimer : I’m not a Linux Expert, and I’m sure that doing everything as root is bad, just like doing everything as a Domain Admin account is bad.</strong></p>
<p>Having seen that the CTP version of the <a href="http://www.microsoft.com/download/en/details.aspx?id=28160)" target="_blank">Microsoft SQL Server ODBC Driver for Linux</a> has been released, I thought that it would be an interesting thing to play with. Particularly since it might be something I’ll interact with using C++.</p>
<h2>Getting Ready</h2>
<p>Officially, it&#8217;s supported on Red Hat Enterprise Linux, but I&#8217;ve not got that, and you have to pay for it (not much, but still). Having downloaded <a href="http://fedoraproject.org/" target="_blank">Fedora 16</a>,installed it in a VM (<a href="http://vmware.com" target="_blank">VMWare Workstation</a>), and fired it up, I needed to install a number of prerequisites.</p>
<p>Using the Add/Remove Software option in Applications –&gt;System Tools, I installed these Packages:</p>
<ul>
<li>Development Libraries</li>
<li>Development Tools</li>
</ul>
<p>I also needed to install wget. Type it into Filter box, tick the box against the result and click Apply.</p>
<p>Then download the driver from here: <a title="http://www.microsoft.com/download/en/details.aspx?id=28160" href="http://www.microsoft.com/download/en/details.aspx?id=28160">http://www.microsoft.com/download/en/details.aspx?id=28160</a></p>
<p>Note, that you’ll also need the <a href="http://www.unixodbc.org" target="_blank">unixODBC</a> Driver manager, and the current version is 2.3.1. I couldn’t get that working, but 2.3.0 does work, and is available to download here (<a title="unixODBC-2.3.0" href="ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.0.tar.gz">unixODBC-2.3.0</a>).</p>
<h2>Installing it</h2>
<p>To get everything to work, I downloaded the files into the Downloads directory, and follow the instructions on the MS Downloads page (copied below, and with an item (3) added by me to make life easier).</p>
<table width="620" border="1" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="618"><strong>To install the driver manager:</strong></p>
<ol>
<li>Make sure that you have root permissions.</li>
<li>Navigate to the directory where you downloaded sqlncli-11.0.1720.0.tar.gz and extract it:<br />
<strong>cd ~/Downloads/</strong><br />
<strong>tar xvf sqlncli-11.0.1720.0.tar.gz.</strong></li>
<li>(added by me) Copy the unixODBC-2.3.0.tar.gz file into the  sqlncli-11.0.1720.0 folder with<br />
<strong>cp unixODBC-2.3.0.tar.gz sqlncli-11.0.1720.0/</strong></li>
<li>Change to the sqlncli-11.0.1720.0 directory, where you can run build_dm.sh to install the unixODBC Driver Manager:<br />
<strong>cd ./sqlncli-11.0.1720.0<br />
./build_dm.sh –help</strong></li>
<li>You can install the driver manager by executing the following command:<br />
<strong>./build_dm.sh</strong><br />
Note: you can also download the driver manager manually at <a>http://www.unixodbc.org/</a> and use the downloaded archive locally:<br />
<strong>./build_dm.sh &#8211;download-url=file://unixODBC-2.3.0.tar.gz</strong></li>
<li>Type &#8220;YES&#8221; to proceed with unpacking the files. This part of the process can take up to five minutes to complete.</li>
<li>After the script stops running, follow the instructions on the screen to install the unixODBC Driver Manager.</li>
</ol>
</td>
</tr>
</tbody>
</table>
<p>Next up, we need to install the driver, again, follow the instructions from the MS Download page (copied here):</p>
<table width="622" border="1" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="620"><strong>To install the driver:</strong></p>
<ol>
<li>Make sure that you have root permissions.</li>
<li>Navigate to the directory where you downloaded sqlncli-11.0.1720.0.tar.gz and extract it:<br />
<strong>cd ~/Downloads/</strong><br />
<strong>tar xvf sqlncli-11.0.1720.0.tar.gz.</strong></li>
<li>Change to the sqlncli-11.0.1720.0 directory, where you can run install.sh to install the driver:<br />
<strong>cd ./sqlncli-11.0.1720.0<br />
./install.sh &#8211;help</strong></li>
<li>(Optional) You may want to make a backup of odbcinst.ini. The driver installation will update odbcinst.ini. odbcinst.ini contains the list of drivers that are registered with the unixODBC Driver Manager. Execute the following command to discover the location of odbcinst.ini on your computer:<br />
<strong>odbc_config –odbcinstini.</strong></li>
<li>Before you install the driver, you may run a verify step to check if your computer has the required software to support the Microsoft SQL Server ODBC Driver for Linux:<br />
<strong>./install.sh verify</strong></li>
<li>When you are ready to install the Microsoft SQL Server ODBC Driver for Linux CTP, run the install script:<br />
<strong>./install.sh install</strong></li>
<li>After reviewing the license agreement, type &#8220;YES&#8221; to continue with the installation.</li>
<li>Verify that Microsoft SQL Server ODBC Driver for Linux CTP was registered successfully:<br />
<strong>odbcinst -q -d -n &#8220;SQL Server Native Client 11.0&#8243;</strong></li>
</ol>
</td>
</tr>
</tbody>
</table>
<h2>Resolving library issues</h2>
<p>That then completed the installation. However, I did get a couple of issues when running sqlcmd. These issues were down to different versions of a couple of Linux SSL libraries being installed, rather than the expected version. Having had a root (pun not intended) around, the issues were resolved by adding a couple of symbolic links (kind of like shortcuts, kind of…), by doing this:</p>
<table width="615" border="1" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="613">ln –s /lib64/libcrypto.so.1.0.0.e /lib64/libcrypto.so.6<br />
ln –s /usr/lib64/libssl.so.10 /usr/lib64/libssl.so.6</td>
</tr>
</tbody>
</table>
<h2>Time to Play!</h2>
<p>As if by magic, I can now query a SQL Server database, from Linux!</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/12/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2011/12/image_thumb.png?w=644&#038;h=306" alt="image" width="644" height="306" border="0" /></a></p>
<p>This was surprisingly straightforward I thought. My next thoughts will be to see if I can communicate with it from code (C++ since it’s Linux ).</p>
<p><strong>Update &#8211; 26/1/2012</strong></p>
<p>It&#8217;s been requested that I post the odbc.ini and odbcinst.ini files I used. These are shown below, and are unchanged by me.</p>
<p><strong>ODBC.INI</strong></p>
<p>&lt;empty file&gt;</p>
<p><strong>ODBCINST.INI</strong></p>
<p>[SQL Server Native Client 11.0]<br />
Description=Microsoft SQL Server ODBC Driver V1.0 for Linux<br />
Driver=/opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1720.0<br />
UsageCount=1</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicksmsblog.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicksmsblog.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicksmsblog.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicksmsblog.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicksmsblog.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicksmsblog.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicksmsblog.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicksmsblog.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicksmsblog.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicksmsblog.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicksmsblog.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicksmsblog.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicksmsblog.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicksmsblog.wordpress.com/500/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nhaslam.com&amp;blog=9290707&amp;post=500&amp;subd=nicksmsblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nhaslam.com/2011/12/12/sql-server-odbc-on-linux/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9325f1a3220c8f20f2dbb7696a4e8290?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nhaslam</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/12/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>#MCMPrep &#8211; 88-970 &#8211; SQL MCM Knowledge Exam #SQLMCM</title>
		<link>http://blog.nhaslam.com/2011/11/19/mcmprep-88-970-sql-mcm-knowledge-exam-sqlmcm/</link>
		<comments>http://blog.nhaslam.com/2011/11/19/mcmprep-88-970-sql-mcm-knowledge-exam-sqlmcm/#comments</comments>
		<pubDate>Sat, 19 Nov 2011 21:21:06 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[MCMPrep]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Certification]]></category>

		<guid isPermaLink="false">http://blog.nhaslam.com/?p=491</guid>
		<description><![CDATA[Update 16/12/2011 :  I&#8217;ve Passed the exam! If you are taking it, the very best of luck! I&#8217;m writing this now, as I have the exam on Monday, and after that point any comments I make on the exam will be influenced by taking it, and therefore restricted by the NDA. So, here are a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nhaslam.com&amp;blog=9290707&amp;post=491&amp;subd=nicksmsblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Update 16/12/2011</strong> :  I&#8217;ve Passed the exam! If you are taking it, the very best of luck!</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/11/mcmpass.png"><img class="alignnone size-full wp-image-505" title="MCMPass" src="http://nicksmsblog.files.wordpress.com/2011/11/mcmpass.png?w=620" alt=""   /></a></p>
<hr />
<p>I&#8217;m writing this now, as I have the exam on Monday, and after that point any comments I make on the exam will be influenced by taking it, and therefore restricted by the NDA.</p>
<p>So, here are a list of the Resources I&#8217;ve used to prepare for this exam:</p>
<p><a href="http://www.microsoft.com/learning/en/us/certification/master-sql-path.aspx">Microsoft Exam Preparation Page</a> &#8211; This has alot of links to Whitepapers, and books. I&#8217;ve read almost all of the whitepapers (all of them by Monday), and 60% of the books.</p>
<p><a href="http://technet.microsoft.com/en-us/sqlserver/ff977043.aspx">Online Training videos</a> / <a href="http://www.sqlskills.com/MCM.asp">Associated Resources</a> &#8211; These are a phenomenal resource. Specific, highly detailed training by Paul Randal, Kimberley Tripp, Brent Ozar and Bob Beauchemin. These are useful, even if you don&#8217;t want to do the Master Certification.</p>
<p><a href="http://www.sqlskills.com/T_ImmersionInternalsDesign.asp">SQL Skills Training IE1</a> &#8211; I attended the UK course held by SQL Skills in the UK. Ideally, I&#8217;d have attended all 4, but due to Training budgets and Time, I couldn&#8217;t. This was a great course, and I highly recommend their courses. Being taught SQL Server by such highly skilled Trainers (Paul Randal and Kimberley Tripp) is an amazing experience.</p>
<p><a href="http://cid-c2dc5b5a2f112857.office.live.com/view.aspx/SQL%20MCM%20Training/SQL%20MCM%20Training">Community Training Notes</a> &#8211; Hosted by Neil Hambly (who was also on the IE1 training), this is a great resource also, and has sections of all of the areas an MCM should know. Thanks Neil.</p>
<p>Community events &#8211; There are many, <a href="http://sqlbits.com/" target="_blank">SQLBits</a>, <a href="http://sqlpass.org/" target="_blank">SQLPass </a>(<a href="http://www.sqlpass.org/24hours/fall2011/SessionsbySchedule.aspx" target="_blank">24Hours of PASS</a>, and the <a href="http://www.sqlpass.org/sqlrally/2011/nordic/" target="_blank">Nordic Rally </a>event, in particular), <a href="http://sqlserverfaq.com/events/340/Maidenhead-UG-meeting-with-Chris-Webb-and-David-Morrison.aspx" target="_blank">SQL Maidenhead</a>, <a href="http://sqlserverintheevening.com/" target="_blank">SQL in the Evening</a>, they are all really helpful, and thank you.</p>
<p>SQLBits also have a huge number of <a href="http://sqlbits.com/content/" target="_blank">videos of the conference sessions</a> available.</p>
<p>Of course, on top of this is the past 12 years of experience I&#8217;ve had with SQL Server (though the most has been over the past  7-8 years). For that, I&#8217;d like to thank my previous employer <a href="http://www.jisoftware.co.uk/">JI Software</a> and most of all to my current employer, <a href="http://www.tah.co.uk/" target="_blank">TAH Limited</a>. I&#8217;ve been fortunate enough to work on some really challenging Data warehousing projects over the past few years, including a huge one for Vodafone (read more <a href="http://t.co/Muakw66B" target="_blank">here</a>).</p>
<p>If you are looking to do the certification, the very best of luck to you!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicksmsblog.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicksmsblog.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicksmsblog.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicksmsblog.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicksmsblog.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicksmsblog.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicksmsblog.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicksmsblog.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicksmsblog.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicksmsblog.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicksmsblog.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicksmsblog.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicksmsblog.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicksmsblog.wordpress.com/491/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nhaslam.com&amp;blog=9290707&amp;post=491&amp;subd=nicksmsblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nhaslam.com/2011/11/19/mcmprep-88-970-sql-mcm-knowledge-exam-sqlmcm/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9325f1a3220c8f20f2dbb7696a4e8290?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nhaslam</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/11/mcmpass.png" medium="image">
			<media:title type="html">MCMPass</media:title>
		</media:content>
	</item>
		<item>
		<title>My #SQLFamily. #MemeMonday</title>
		<link>http://blog.nhaslam.com/2011/11/07/my-sqlfamily-mememonday/</link>
		<comments>http://blog.nhaslam.com/2011/11/07/my-sqlfamily-mememonday/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 14:58:29 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Meme Monday]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Sqlserver]]></category>

		<guid isPermaLink="false">https://nicksmsblog.wordpress.com/2011/11/07/my-sqlfamily-mememonday/</guid>
		<description><![CDATA[It&#8217;s MemeMonday : What SQLFamily means to you. Everyone has a family. Only the lucky few (comparitively) have a #sqlfamily. It&#8217;s a great way to think of the people we interact with. Some a cool, some are annoying, but all of them bring their own thoughts and experiences. I&#8217;ve not been actively taking part of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nhaslam.com&amp;blog=9290707&amp;post=489&amp;subd=nicksmsblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s <a href="http://thomaslarock.com/2011/11/meme-monday-for-november/">MemeMonday</a> : What SQLFamily means to you.</p>
<p>Everyone has a family. Only the lucky few (comparitively) have a #sqlfamily. It&#8217;s a great way to think of the people we interact with. Some a cool, some are annoying, but all of them bring their own thoughts and experiences.</p>
<p>I&#8217;ve not been actively taking part of the SQL community for long, only the past 6 months or so. Before that i was mainly involved with the UK developer community, and when I say involved, I mean attended events. My developer skills were nowhere near good enough to keep up with the likes of <a href="http://twitter.com/jonskeet">Jon Skeet</a>, or many of the other great community-developers.</p>
<p>I&#8217;m hoping to become a more active member of the SQL community in the UK, as I go through the SQL MCM certification. I&#8217;ve already made a few friends in there, and am starting to feel confident enough to do presentations on SQL Server topics. Even started to do presentations on it internally at work. Maybe that makes me the annoying cousin who tries to hard? That&#8217;ll have to be for someone else to decide. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I&#8217;m writing this, sitting in a Starbucks at London Heathrow, on the way to the <a href="http://www.sqlpass.org/sqlrally/2011/nordic/">SQL Rally Nordic</a> event in Stockholm, where I&#8217;ll be able to meet some more #SQLFamily members. Mostly the cool uncles &amp; aunts. it&#8217;s shaping up to be a great event.</p>
<p>What does SQLFamily mean to me? I love you guys, and appreciate the openness and way everyone is so willing to share their knowledge. Thank you!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicksmsblog.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicksmsblog.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicksmsblog.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicksmsblog.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicksmsblog.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicksmsblog.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicksmsblog.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicksmsblog.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicksmsblog.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicksmsblog.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicksmsblog.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicksmsblog.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicksmsblog.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicksmsblog.wordpress.com/489/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nhaslam.com&amp;blog=9290707&amp;post=489&amp;subd=nicksmsblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nhaslam.com/2011/11/07/my-sqlfamily-mememonday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9325f1a3220c8f20f2dbb7696a4e8290?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nhaslam</media:title>
		</media:content>
	</item>
		<item>
		<title>70-450 &#8211; SQL 2008 Database Administrator ITP Certification</title>
		<link>http://blog.nhaslam.com/2011/10/07/70-450-sql-2008-database-administrator-itp-certification/</link>
		<comments>http://blog.nhaslam.com/2011/10/07/70-450-sql-2008-database-administrator-itp-certification/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 19:58:57 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Certification]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[70-450]]></category>

		<guid isPermaLink="false">http://blog.nhaslam.com/?p=480</guid>
		<description><![CDATA[I passed this exam on Friday. This was a hard one. Having taken it just over 2 months ago, and failing it, I changed the way I prepared for exams. Previously, I&#8217;d been reading the material on the MS Learning Plan for the exam, and any associated books. For the 70-451 exam I did 6 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nhaslam.com&amp;blog=9290707&amp;post=480&amp;subd=nicksmsblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I passed this exam on Friday. This was a hard one. Having taken it just over 2 months ago, and failing it, I changed the way I prepared for exams.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/10/mcitprgb_1256.jpg"><img class="alignnone size-full wp-image-487" title="MCITP(rgb)_1256" src="http://nicksmsblog.files.wordpress.com/2011/10/mcitprgb_1256.jpg?w=620" alt=""   /></a></p>
<p>Previously, I&#8217;d been reading the material on the MS Learning Plan for the exam, and any associated books. For the <a href="http://blog.nhaslam.com/2011/08/22/70-451-sql-2008-database-developer-itp-certification/">70-451 exam</a> I did 6 weeks or so back, I did alot of reading of blog articles, MSDN and Books Online. For this exam however, I didn&#8217;t find the Learning plan overly helpful, and there are a huge amount of blog articles on Database Administration (some of which is contradictory).</p>
<p>So, having failed the exam, which isn&#8217;t a bad thing, as it proves that the exams aren&#8217;t so straightforward that everyone can pass first time, I made notes on the areas I was weakest. Then looked for relevant articles in those areas. The difficult part was finding blog articles by people who knew what they were talking about. A couple of the most useful were <a href="http://www.johnsansom.com" target="_blank">John Sansom</a> (particularly the Something for the Weekend: SQL Server Links posts), and the articles from <a href="http://www.sqlskills.com/blogs/jonathan/" target="_blank">Jonathan Kehayias</a> from SQLSkills (particularly those on Extended Events and Clustering). Thanks to you both!!</p>
<p>I did also find a useful book, and even better, it was one I already had. <a href="http://www.amazon.co.uk/gp/product/073562738X/ref=as_li_tf_il?ie=UTF8&amp;tag=nwp08-21&amp;linkCode=as2&amp;camp=1634&amp;creative=6738&amp;creativeASIN=073562738X" target="_blank">SQL Server 2008 Administrator&#8217;s Pocket Consultant (2nd Edition)</a> by William Stanek was a great help, and while I&#8217;d read bits and pieces before, going through it from cover to cover was really helpful.</p>
<p>Having completed this exam, I&#8217;ve now completed the prerequisites for the SQL Master Certification, and I&#8217;ll be looking to take the <a href="http://www.microsoft.com/learning/en/us/exam.aspx?ID=88-970" target="_blank">Knowledge exam </a>before Christmas.</p>
<p>First though, I&#8217;m going to have a break from studying for SQL Server exams. Just for a couple of days. Something different for a change, PowerShell or C++. We&#8217;ll see&#8230; Just for a couple of days though&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicksmsblog.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicksmsblog.wordpress.com/480/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicksmsblog.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicksmsblog.wordpress.com/480/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicksmsblog.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicksmsblog.wordpress.com/480/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicksmsblog.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicksmsblog.wordpress.com/480/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicksmsblog.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicksmsblog.wordpress.com/480/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicksmsblog.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicksmsblog.wordpress.com/480/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicksmsblog.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicksmsblog.wordpress.com/480/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nhaslam.com&amp;blog=9290707&amp;post=480&amp;subd=nicksmsblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nhaslam.com/2011/10/07/70-450-sql-2008-database-administrator-itp-certification/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9325f1a3220c8f20f2dbb7696a4e8290?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nhaslam</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/10/mcitprgb_1256.jpg" medium="image">
			<media:title type="html">MCITP(rgb)_1256</media:title>
		</media:content>
	</item>
		<item>
		<title>Virtual Clusters</title>
		<link>http://blog.nhaslam.com/2011/09/21/virtual-clusters/</link>
		<comments>http://blog.nhaslam.com/2011/09/21/virtual-clusters/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 17:38:49 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Virtualisation]]></category>
		<category><![CDATA[Windows O/S]]></category>
		<category><![CDATA[cluster]]></category>

		<guid isPermaLink="false">http://blog.nhaslam.com/?p=474</guid>
		<description><![CDATA[Having spent some time creating posts and doing some work on Virtual Clusters, I saw that Jonathan Kehayias from SQL Skills had also done a set. They are linked below: Building a Completely Free Playground for SQL Server – (1 of 3) &#8211; Downloading the Software and Setting up a Windows Server 2008R2 VM Template [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nhaslam.com&amp;blog=9290707&amp;post=474&amp;subd=nicksmsblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Having spent some time creating posts and doing some work on Virtual Clusters, I saw that <a href="http://www.sqlskills.com/blogs/jonathan" target="_blank">Jonathan Kehayias from SQL Skills </a>had also done a set. They are linked below:</p>
<p><a href="http://www.sqlskills.com/blogs/jonathan/post/Building-a-Completely-Free-Playground-for-SQL-Server-e28093-%281-of-3%29-Downloading-the-Software-and-Setting-up-a-Windows-Server-2008R2-VM-Template.aspx">Building a Completely Free Playground for SQL Server – (1 of 3) &#8211; Downloading the Software and Setting up a Windows Server 2008R2 VM Template</a><a href="http://www.sqlskills.com/blogs/jonathan/post/Building-a-Completely-Free-Playground-for-SQL-Server-e28093-2-e28093-Setting-up-Active-Directory-and-the-iSCSI-Virtual-SAN.aspx"><br />
Building a Completely Free Playground for SQL Server – 2 – Setting up Active Directory and the iSCSI Virtual SAN</a><br />
<a href="http://www.sqlskills.com/blogs/jonathan/post/Building-a-Completely-Free-Playground-for-SQL-Server-3-Creating-the-Failover-Cluster-Nodes-and-Configuring-the-iSCSI-Environment.aspx">Building a Completely Free Playground for SQL Server &#8211; 3 &#8211; Creating the Failover Cluster Nodes and Configuring the iSCSI Environment<br />
</a><a href="http://www.sqlskills.com/blogs/jonathan/post/Building-a-Completely-Free-Playground-for-SQL-Server-4-Creating-the-Cluster.aspx">Building a Completely Free Playground for SQL Server &#8211; 4 &#8211; Creating the Cluster</a></p>
<p>I also suggest looking at his posts, as they cover alot of the functionality that I have, but in some greater detail. Additionally, he covers using the iSCSI Target for Windows Server, which I didn&#8217;t know about (Every day&#8217;s a school day!). Mine are here (for completeness).</p>
<p><a title="Permalink to Creating a Virtual Cluster – Part 1 – The Storage" href="http://blog.nhaslam.com/2011/09/16/creating-a-virtual-cluster-part-1-the-storage/" rel="bookmark">Creating a Virtual Cluster – Part 1 – The Storage</a><a title="Permalink to Creating a Virtual Cluster – Part 2 – The Windows Cluster" href="http://blog.nhaslam.com/2011/09/19/creating-a-virtual-cluster-part-2-the-windows-cluster/" rel="bookmark"><br />
Creating a Virtual Cluster – Part 2 – The Windows Cluster</a><a title="Permalink to Creating a Virtual Cluster – Part 3 – SQL Server" href="http://blog.nhaslam.com/2011/09/20/creating-a-virtual-cluster-part-3-sql-server/" rel="bookmark"><br />
Creating a Virtual Cluster – Part 3 – SQL Server</a></p>
<p>Enjoy!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicksmsblog.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicksmsblog.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicksmsblog.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicksmsblog.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicksmsblog.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicksmsblog.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicksmsblog.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicksmsblog.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicksmsblog.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicksmsblog.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicksmsblog.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicksmsblog.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicksmsblog.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicksmsblog.wordpress.com/474/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nhaslam.com&amp;blog=9290707&amp;post=474&amp;subd=nicksmsblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nhaslam.com/2011/09/21/virtual-clusters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9325f1a3220c8f20f2dbb7696a4e8290?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nhaslam</media:title>
		</media:content>
	</item>
		<item>
		<title>Laptop Specs&#8211;Times are moving on</title>
		<link>http://blog.nhaslam.com/2011/09/21/laptop-specstimes-are-moving-on/</link>
		<comments>http://blog.nhaslam.com/2011/09/21/laptop-specstimes-are-moving-on/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 16:18:06 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[sony]]></category>

		<guid isPermaLink="false">https://nicksmsblog.wordpress.com/2011/09/21/laptop-specstimes-are-moving-on/</guid>
		<description><![CDATA[We’ve been looking at some specs of laptops recently, for replacing some and came across these two sitting on Amazon. Sony Vaio C-Series Sony Vaio E Series http://amzn.to/pbHmQD http://amzn.to/mYmosL £660 £509 CPU i5 2.3Ghz i3 2.1Ghz Screen 1920&#215;1080 Full HD 1366&#215;768 RAM 6GB 4Gb HDD 640Gb 320Gb Optical Bluray DVD-RW Notes ATI Graphics Card Intel [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nhaslam.com&amp;blog=9290707&amp;post=470&amp;subd=nicksmsblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We’ve been looking at some specs of laptops recently, for replacing some and came across these two sitting on Amazon.</p>
<table style="border-collapse:collapse;" width="386" border="0" cellspacing="0" cellpadding="0">
<col style="width:48pt;" width="64" />
<col style="width:123pt;" width="164" />
<col style="width:119pt;" width="159" />
<tbody>
<tr style="height:15.75pt;">
<td class="xl65" style="padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;" width="64" height="21"></td>
<td class="xl66" style="border-bottom:#95b3d7 1pt solid;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;" width="164"><span style="color:#1f497d;"><strong>Sony Vaio C-Series</strong></span></td>
<td class="xl66" style="border-bottom:#95b3d7 1pt solid;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;" width="158"><span style="color:#1f497d;"><strong>Sony Vaio E Series</strong></span></td>
</tr>
<tr style="height:15pt;">
<td class="xl65" style="padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;" height="20"></td>
<td class="xl67" style="padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;"><a href="http://amzn.to/pbHmQD"><span style="color:#0000ff;">http://amzn.to/pbHmQD</span></a></td>
<td class="xl68" style="padding-left:1px;padding-right:1px;vertical-align:middle;padding-top:1px;"><a href="http://amzn.to/mYmosL"><span style="color:#0000ff;">http://amzn.to/mYmosL</span></a></td>
</tr>
<tr style="height:15pt;">
<td class="xl65" style="padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;" height="20"></td>
<td class="xl69" style="background-color:#e4dfec;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;">£660</td>
<td class="xl69" style="background-color:#e4dfec;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;">£509</td>
</tr>
<tr style="height:15pt;">
<td class="xl70" style="padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;" height="20"><strong>CPU</strong></td>
<td class="xl71" style="background-color:#e4dfec;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;">i5 2.3Ghz</td>
<td class="xl71" style="background-color:#e4dfec;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;">i3 2.1Ghz</td>
</tr>
<tr style="height:15pt;">
<td class="xl70" style="padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;" height="20"><strong>Screen</strong></td>
<td class="xl71" style="background-color:#e4dfec;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;">1920&#215;1080 Full HD</td>
<td class="xl71" style="background-color:#e4dfec;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;">1366&#215;768</td>
</tr>
<tr style="height:15pt;">
<td class="xl70" style="padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;" height="20"><strong>RAM</strong></td>
<td class="xl71" style="background-color:#e4dfec;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;">6GB</td>
<td class="xl71" style="background-color:#e4dfec;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;">4Gb</td>
</tr>
<tr style="height:15pt;">
<td class="xl70" style="padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;" height="20"><strong>HDD</strong></td>
<td class="xl71" style="background-color:#e4dfec;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;">640Gb</td>
<td class="xl71" style="background-color:#e4dfec;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;">320Gb</td>
</tr>
<tr style="height:15pt;">
<td class="xl70" style="padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;" height="20"><strong>Optical</strong></td>
<td class="xl71" style="background-color:#e4dfec;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;">Bluray</td>
<td class="xl71" style="background-color:#e4dfec;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;">DVD-RW</td>
</tr>
<tr style="height:15pt;">
<td class="xl70" style="padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;" height="20"></td>
<td class="xl71" style="background-color:#e4dfec;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;"></td>
<td class="xl71" style="background-color:#e4dfec;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;"></td>
</tr>
<tr style="height:15pt;">
<td class="xl70" style="padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;" height="20"><strong>Notes</strong></td>
<td class="xl71" style="background-color:#e4dfec;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;">ATI Graphics Card</td>
<td class="xl71" style="background-color:#e4dfec;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;">Intel Graphics Card</td>
</tr>
<tr style="height:15pt;">
<td class="xl65" style="padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;" height="20"></td>
<td class="xl71" style="background-color:#e4dfec;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;">USB 3 socket</td>
<td class="xl71" style="background-color:#e4dfec;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;"></td>
</tr>
<tr style="height:15pt;">
<td class="xl65" style="padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;" height="20"></td>
<td class="xl71" style="background-color:#e4dfec;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;">Backlit keyboard</td>
<td class="xl71" style="background-color:#e4dfec;padding-left:1px;padding-right:1px;vertical-align:bottom;padding-top:1px;"></td>
</tr>
</tbody>
</table>
<p>For an extra £160 you get a faster CPU, more screen space, more memory, more disk space, faster graphics card, longer life (due to USB 3, Blu Ray drive).</p>
<p>Yes, these are home machines, rather than business machines, but it’s still pretty good to see the comparisons.</p>
<p>Of course, neither of these compare (in terms of price or performance) to something like<a href="https://sqlserverperformance.wordpress.com/2011/08/27/new-dell-precision-m4600-mobile-workstation/"> Glenn Barry&#8217;s New Dell Precision M4600 Mobile Workstation</a>, but still.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicksmsblog.wordpress.com/470/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicksmsblog.wordpress.com/470/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicksmsblog.wordpress.com/470/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicksmsblog.wordpress.com/470/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicksmsblog.wordpress.com/470/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicksmsblog.wordpress.com/470/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicksmsblog.wordpress.com/470/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicksmsblog.wordpress.com/470/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicksmsblog.wordpress.com/470/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicksmsblog.wordpress.com/470/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicksmsblog.wordpress.com/470/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicksmsblog.wordpress.com/470/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicksmsblog.wordpress.com/470/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicksmsblog.wordpress.com/470/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nhaslam.com&amp;blog=9290707&amp;post=470&amp;subd=nicksmsblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nhaslam.com/2011/09/21/laptop-specstimes-are-moving-on/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9325f1a3220c8f20f2dbb7696a4e8290?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nhaslam</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating a Virtual Cluster &#8211; Part 3 &#8211; SQL Server</title>
		<link>http://blog.nhaslam.com/2011/09/20/creating-a-virtual-cluster-part-3-sql-server/</link>
		<comments>http://blog.nhaslam.com/2011/09/20/creating-a-virtual-cluster-part-3-sql-server/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 08:37:07 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Certification]]></category>
		<category><![CDATA[MCMPrep]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Virtualisation]]></category>
		<category><![CDATA[Windows O/S]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[mcmprep]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">https://nicksmsblog.wordpress.com/?p=460</guid>
		<description><![CDATA[This is part 3 of a set of posts around creating a Virtual cluster on SQL Server, which I’m creating to raise my awareness of clustering. Part 1 of this series created the Shared Storage used by the cluster, using FreeNAS. Part 2 of this series created a Windows Cluster using this storage. This section [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nhaslam.com&amp;blog=9290707&amp;post=460&amp;subd=nicksmsblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is part 3 of a set of posts around creating a Virtual cluster on SQL Server, which I’m creating to raise my awareness of clustering.</p>
<p><a href="http://blog.nhaslam.com/2011/09/16/creating-a-virtual-cluster-part-1-the-storage/" target="_blank">Part 1 of this series created the Shared Storage used by the cluster, using FreeNAS.</a><a href="http://nicksmsblog.files.wordpress.com/2011/09/mycluster2.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;float:right;padding-top:0;border:0;" title="MyCluster" src="http://nicksmsblog.files.wordpress.com/2011/09/mycluster_thumb2.png?w=218&#038;h=291" alt="MyCluster" width="218" height="291" align="right" border="0" /></a></p>
<p>Part 2 of this series created a Windows Cluster using this storage.</p>
<p>This section will cover creating a SQL Server cluster using this environment.</p>
<p>The architecture diagram to the right shows the cluster we are creating. This post will cover the clustering of SQL1 and SQL2.</p>
<h3>Step 1 &#8211; Starting the Process</h3>
<p>The first step is to get the SQL Server media available to the server. I’ve taken a copy of the DVD and placed it on the C Drive on the first node of the cluster.</p>
<p>Run Setup.exe, which’ll install some pre-requisites (you should do this on both nodes, to make for an easier life). When the server’s have restarted, run setup.exe on the active node (SQL1 in my case).</p>
<p>Within SQL Server Installation Center, click the Installation option on the Left, and choose New SQL Server Failover cluster Installation.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/09/image34.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb34.png?w=599&#038;h=165" alt="image" width="599" height="165" border="0" /></a></p>
<p>The Wizard will start, and as normal, will take you through installing the setup support files. Once this has completed, the Setup support rules will run, and any issues will be flagged. This includes a set of checks around Clustering.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/09/image35.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb35.png?w=517&#038;h=254" alt="image" width="517" height="254" border="0" /></a></p>
<p>The one that has a warning here, checking to see if MSDTC is clustered, effectively means that there may be issues with linked server queries, and SSIS. It’s not required for the Cluster to build however, so lets press on. Clicking Next gives us the Feature Selection screen.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/09/image36.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb36.png?w=472&#038;h=330" alt="image" width="472" height="330" border="0" /></a></p>
<p>I’m only going to install the Database engine, Integration Services and Management tools. Click Next.</p>
<p>In the Instance Configuration screen, enter the name for the SQL Cluster.(SQLCluster in my case).</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/09/image37.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb37.png?w=564&#038;h=170" alt="image" width="564" height="170" border="0" /></a></p>
<p>Click next to confirm the disk usage requirements, Confirm the name of the Cluster Resource group (selecting the default).</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/09/image38.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb38.png?w=564&#038;h=219" alt="image" width="564" height="219" border="0" /></a></p>
<p>Click next, and we are prompted to select the disks for the SQL Cluster. I’m selecting all the unused disks.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/09/image39.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb39.png?w=573&#038;h=338" alt="image" width="573" height="338" border="0" /></a></p>
<p>Click Next, and confirm the Network settings for the Cluster.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/09/image40.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb40.png?w=565&#038;h=200" alt="image" width="565" height="200" border="0" /></a></p>
<p>Click next and confirm the Cluster Security Policy (the default being to use the Service SIDs).</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/09/image41.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb41.png?w=563&#038;h=258" alt="image" width="563" height="258" border="0" /></a></p>
<p>Click Next to continue,  for the Services, provide a Domain account, and click next.</p>
<p>Next you are prompted for Database engine configuration as normal, click Next, Click Next on the Error Reporting screen. The next screen is the Cluster Installation rules. These should all be passed, so click Next.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/09/image42.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb42.png?w=479&#038;h=216" alt="image" width="479" height="216" border="0" /></a></p>
<p>Click next and next to start the Installation. The installation will take a little while to run.</p>
<p>Upon completion, you’ll get this:</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/09/image43.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb43.png?w=403&#038;h=72" alt="image" width="403" height="72" border="0" /></a></p>
<p>If you now look in the Failover Cluster Manager, you’ll see the SQL Cluster in Services and Applications.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/09/image44.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb44.png?w=493&#038;h=363" alt="image" width="493" height="363" border="0" /></a></p>
<p>Next, you can fire up SQL Server Management Studio and connect to the Cluster.</p>
<p>If you go to Server Properties, you can see that the Server is Clustered.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/09/image45.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb45.png?w=482&#038;h=217" alt="image" width="482" height="217" border="0" /></a></p>
<p>The Default System databases (Master, MSDB, Model and Tempdb) are all now stored in one of the cluster drives, and the default drive for databases will also be that drive.</p>
<h3>Step 2 &#8211; Adding the Second Node</h3>
<p>Next we need to add the second node to the Cluster, so switch to your other Member server, and run setup.exe, from the Installation section choose &#8216;Add node to a SQL Server failover cluster&#8217;.</p>
<p>Run through the installation screens, and note that it should pickup the SQL Server Cluster name when you get to the Cluster Node configuration screen.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/09/image46.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb46.png?w=499&#038;h=179" alt="image" width="499" height="179" border="0" /></a></p>
<p>Click Next, enter the passwords for the Domain accounts on the on the Service accounts page, and click next on the Error Reporting page.</p>
<p>The Add Node Rules page should complete successfully, so click Next.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/09/image47.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb47.png?w=532&#038;h=369" alt="image" width="532" height="369" border="0" /></a></p>
<p>Then Click Install to continue.</p>
<p>When this has been successful, you&#8217;ll see:</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/09/image48.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb48.png?w=453&#038;h=49" alt="image" width="453" height="49" border="0" /></a></p>
<h3>Step 3 &#8211; Test it out</h3>
<p>I’ve taken a backup of the AdventureWorks DW 2008 R2 database from my laptop and copied the backup to SQL1. Note that to restore a database, it must be on one of the Cluster drives, so having copied the Backup file to the shared drives, I can now restore it.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/09/image49.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb49.png?w=265&#038;h=178" alt="image" width="265" height="178" border="0" /></a></p>
<p>Having restored this database, I can now run queries against it, and see what activity is taking place, through the performance graphs on FreeNAS. You can see from the graphs below that are spikes when the Cluster nodes were connecting, and the then later when the database was copied over and restored.</p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/09/image50.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb50.png?w=441&#038;h=421" alt="image" width="441" height="421" border="0" /></a></p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/09/image51.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb51.png?w=446&#038;h=409" alt="image" width="446" height="409" border="0" /></a></p>
<p><a href="http://nicksmsblog.files.wordpress.com/2011/09/image52.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb52.png?w=449&#038;h=182" alt="image" width="449" height="182" border="0" /></a></p>
<p>The next post will be around optimising and getting some performance metrics off this cluster.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicksmsblog.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicksmsblog.wordpress.com/460/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicksmsblog.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicksmsblog.wordpress.com/460/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicksmsblog.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicksmsblog.wordpress.com/460/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicksmsblog.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicksmsblog.wordpress.com/460/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicksmsblog.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicksmsblog.wordpress.com/460/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicksmsblog.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicksmsblog.wordpress.com/460/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicksmsblog.wordpress.com/460/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicksmsblog.wordpress.com/460/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nhaslam.com&amp;blog=9290707&amp;post=460&amp;subd=nicksmsblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nhaslam.com/2011/09/20/creating-a-virtual-cluster-part-3-sql-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9325f1a3220c8f20f2dbb7696a4e8290?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nhaslam</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/09/mycluster_thumb2.png" medium="image">
			<media:title type="html">MyCluster</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb34.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb35.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb36.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb37.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb38.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb39.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb40.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb41.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb42.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb43.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb44.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb45.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb46.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb47.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb48.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb49.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb50.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb51.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://nicksmsblog.files.wordpress.com/2011/09/image_thumb52.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
	</channel>
</rss>
