<?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>Tony&#039;s Blog</title>
	<atom:link href="http://togrady.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://togrady.wordpress.com</link>
	<description>Microsoft SQL Server DBA</description>
	<lastBuildDate>Tue, 23 Aug 2011 09:13:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='togrady.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Tony&#039;s Blog</title>
		<link>http://togrady.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://togrady.wordpress.com/osd.xml" title="Tony&#039;s Blog" />
	<atom:link rel='hub' href='http://togrady.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Checkpoint</title>
		<link>http://togrady.wordpress.com/2011/08/22/checkpoint/</link>
		<comments>http://togrady.wordpress.com/2011/08/22/checkpoint/#comments</comments>
		<pubDate>Mon, 22 Aug 2011 19:06:52 +0000</pubDate>
		<dc:creator>togrady</dc:creator>
				<category><![CDATA[SQL Server Admin]]></category>

		<guid isPermaLink="false">https://togrady.wordpress.com/2011/08/22/checkpoint/</guid>
		<description><![CDATA[Overview The checkpoint process writes dirty pages from the buffer pool area of memory to physical disk. It does not remove the pages from the buffer pool instead it marks them as clean again.Its purpose is to reduce the active portion of the log necessary to preform recovery so the frequency at which the checkpoint [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=togrady.wordpress.com&amp;blog=4825359&amp;post=202&amp;subd=togrady&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="codeSnippetWrapper"></div>
<h2>Overview</h2>
<p>The checkpoint process writes dirty pages from the buffer pool area of memory to physical disk. It does not remove the pages from the buffer pool instead it marks them as clean again.Its purpose is to reduce the active portion of the log necessary to preform recovery so the frequency at which the checkpoint process is run determines the length of time it will take to recover the database when it is started up.  This needs to be balanced against the overhead required to run the checkpoint process. Similarly to the lazy writer process, checkpoint runs as a background task. We can query the sysprocesses system table to view its status:</p>
<p>&nbsp;</p>
<pre class="brush: sql;">
SELECT cmd, spid, status, dbid, login_time, waittime, lastwaittype,
loginame,cpu, memusage, physical_io
FROM sysprocesses
WHERE  cmd IN ('LAZY WRITER', 'CHECKPOINT')
</pre>
<p>&nbsp;</p>
<div id="codeSnippetWrapper"></div>
<p>&nbsp;</p>
<p><a href="http://togrady.files.wordpress.com/2011/08/image2.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" src="http://togrady.files.wordpress.com/2011/08/image_thumb2.png?w=592&#038;h=60" alt="image" width="592" height="60" border="0" /></a></p>
<p>&nbsp;</p>
<p>By default SQL Server determines the interval at which the checkpoint process runs. This is usually every 1 minute. This behaviour can be changed by setting the <strong>recovery interval</strong> which is an advanced configuration option.</p>
<p>&nbsp;</p>
<p>Generally I don&#8217;t change the default value of 0 which is to allow SQL Server control the checkpoint process.</p>
<p>&nbsp;</p>
<h2>Checkpoint and the buffer pool</h2>
<p>I want to see exactly what the checkpoint process does and how this impacts on the buffer pool. I have setup a test database called DBA (DB_ID = 7)with a table called tblTest. This is a small table with a couple of rows. I have already determined that it is using page 222. The first thing I want to do is clear the page from cache. TO do this I am going to call the checkpoint statement to clean the page and then I am going to call DBCC DROPCLEANBUFFERS  to remove all clean pages form the buffer pool.  Since I have set the recovery interval to 1000 minutes the automatic checkpoint process should not kick in. Just to be sure I am also going to turn on Trace flag  3502. This will log all checkpoint activity in the SQL Server Log.</p>
<div id="codeSnippetWrapper">
<div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum1" style="color:#606060;"> 1:</span> <span style="color:#0000ff;">DBCC</span> TRACEON (3502, -1);</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;"><span id="lnum2" style="color:#606060;"> 2:</span></pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum3" style="color:#606060;"> 3:</span> <span style="color:#0000ff;">GO</span></pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;"><span id="lnum4" style="color:#606060;"> 4:</span></pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum5" style="color:#606060;"> 5:</span> <span style="color:#0000ff;">CHECKPOINT</span>;</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;"><span id="lnum6" style="color:#606060;"> 6:</span></pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum7" style="color:#606060;"> 7:</span> <span style="color:#0000ff;">GO</span></pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;"><span id="lnum8" style="color:#606060;"> 8:</span></pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum9" style="color:#606060;"> 9:</span> <span style="color:#0000ff;">DBCC</span> DROPCLEANBUFFERS;</pre>
<p>&nbsp;</p>
</div>
</div>
<p>I can verify that the page is not in the buffer pool by using the dm_os_buffer_descriptors  dmv.</p>
<div id="codeSnippetWrapper">
<div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum1" style="color:#606060;"> 1:</span> <span style="color:#0000ff;">select</span> * <span style="color:#0000ff;">from</span> sys.dm_os_buffer_descriptors</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;"><span id="lnum2" style="color:#606060;"> 2:</span> <span style="color:#0000ff;">where</span> page_id = 222 <span style="color:#0000ff;">and</span> database_id = 7</pre>
<p>&nbsp;</p>
</div>
</div>
<p>&nbsp;</p>
<p><a href="http://togrady.files.wordpress.com/2011/08/image3.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" src="http://togrady.files.wordpress.com/2011/08/image_thumb3.png?w=529&#038;h=56" alt="image" width="529" height="56" border="0" /></a></p>
<p>&nbsp;</p>
<p>Next I am going to bring the tblTest into the buffer pool and dirty it., I am going to do this by updating all the existing rows in the table.</p>
<p><a href="http://togrady.files.wordpress.com/2011/08/image5.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" src="http://togrady.files.wordpress.com/2011/08/image_thumb4.png?w=244&#038;h=125" alt="image" width="244" height="125" border="0" /></a></p>
<p>&nbsp;</p>
<p>I can verify that the page is now in the buffer pool and that the page has been modified (dirty). The is_modiifed column in sys.dm_os_buffer_discriptors indicates the status of the page (clean / dirty as 1/0)</p>
<div id="codeSnippetWrapper">
<div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum1" style="color:#606060;"> 1:</span> <span style="color:#0000ff;">select</span> * <span style="color:#0000ff;">from</span> sys.dm_os_buffer_descriptors</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;"><span id="lnum2" style="color:#606060;"> 2:</span> <span style="color:#0000ff;">where</span> page_id = 222 <span style="color:#0000ff;">and</span> database_id = 7</pre>
<p>&nbsp;</p>
</div>
</div>
<p>&nbsp;</p>
<p><a href="http://togrady.files.wordpress.com/2011/08/image6.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" src="http://togrady.files.wordpress.com/2011/08/image_thumb5.png?w=529&#038;h=87" alt="image" width="529" height="87" border="0" /></a></p>
<p>&nbsp;</p>
<p>When we run a checkpoint again the page should remain in the buffer pool but it should now be clean</p>
<p>&nbsp;</p>
<div id="codeSnippetWrapper">
<div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum1" style="color:#606060;"> 1:</span> CHECPOINT;</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;"><span id="lnum2" style="color:#606060;"> 2:</span></pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum3" style="color:#606060;"> 3:</span> <span style="color:#0000ff;">GO</span></pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;"><span id="lnum4" style="color:#606060;"> 4:</span></pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum5" style="color:#606060;"> 5:</span> <span style="color:#0000ff;">select</span> * <span style="color:#0000ff;">from</span> sys.dm_os_buffer_descriptors</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;"><span id="lnum6" style="color:#606060;"> 6:</span> <span style="color:#0000ff;">where</span> page_id = 222 <span style="color:#0000ff;">and</span> database_id = 7</pre>
<p>&nbsp;</p>
</div>
</div>
<p><a href="http://togrady.files.wordpress.com/2011/08/image7.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" src="http://togrady.files.wordpress.com/2011/08/image_thumb6.png?w=537&#038;h=64" alt="image" width="537" height="64" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>This shows that the checkpoint process cleaned the page and left it in the buffer pool</p>
<p>&nbsp;</p>
<h2>Checkpoint and the transaction log</h2>
<p>I am not going to get into Transaction Log management. For the purposes of the demo I setup the following</p>
<ul>
<li>The database is in the simple recovery mode</li>
<li>There were no outstanding active transactions</li>
<li>No other transaction log dependant features such as replication or DB mirroring were setup on the box.</li>
</ul>
<p>I have a database setup and I have run a number of transactions against it. The recovery interval has been set to 1000 minutes. I am going to use DBCC LOGINFO and the undocumented</p>
<div id="codeSnippetWrapper" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:97.5%;">
<div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum1" style="color:#606060;"> 1:</span></pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;"><span id="lnum2" style="color:#606060;"> 2:</span></pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum3" style="color:#606060;"> 3:</span> <span style="color:#0000ff;">DBCC</span> LOGINFO;</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;"><span id="lnum4" style="color:#606060;"> 4:</span></pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum5" style="color:#606060;"> 5:</span></pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;"><span id="lnum6" style="color:#606060;"> 6:</span> <span style="color:#0000ff;">SELECT</span> [<span style="color:#0000ff;">Current</span> LSN],[previous LSN], [<span style="color:#0000ff;">Operation</span>], context,</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum7" style="color:#606060;"> 7:</span> [<span style="color:#0000ff;">Checkpoint</span> <span style="color:#0000ff;">Begin</span>], [<span style="color:#0000ff;">checkpoint</span> <span style="color:#0000ff;">end</span>], [page id], [minimum lsn],</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;"><span id="lnum8" style="color:#606060;"> 8:</span> Dirty Pages] spid, [<span style="color:#0000ff;">Begin</span> <span style="color:#0000ff;">Time</span>], [<span style="color:#0000ff;">Transaction</span> Name],</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum9" style="color:#606060;"> 9:</span> [<span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Time</span>], [Lock Information],Description</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;"><span id="lnum10" style="color:#606060;"> 10:</span> <span style="color:#0000ff;">FROM</span> ::fn_dblog(<span style="color:#0000ff;">NULL</span>, <span style="color:#0000ff;">NULL</span>) ;</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum11" style="color:#606060;"> 11:</span></pre>
<p>&nbsp;</p>
</div>
</div>
<p>&nbsp;</p>
<p><a href="http://togrady.files.wordpress.com/2011/08/image8.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" src="http://togrady.files.wordpress.com/2011/08/image_thumb7.png?w=600&#038;h=255" alt="image" width="600" height="255" border="0" /></a></p>
<div id="codeSnippetWrapper"></div>
<div></div>
<div>
<div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum1" style="color:#606060;"> 1:</span> <span style="color:#0000ff;">checkpoint</span>;</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;"><span id="lnum2" style="color:#606060;"> 2:</span></pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum3" style="color:#606060;"> 3:</span> <span style="color:#0000ff;">dbcc</span> loginfo;</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;"><span id="lnum4" style="color:#606060;"> 4:</span></pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum5" style="color:#606060;"> 5:</span> <span style="color:#0000ff;">SELECT</span> [<span style="color:#0000ff;">Current</span> LSN],[previous LSN], <span style="color:#0000ff;">Operation</span>, context,</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;"><span id="lnum6" style="color:#606060;"> 6:</span> [<span style="color:#0000ff;">Checkpoint</span> <span style="color:#0000ff;">Begin</span>], [<span style="color:#0000ff;">checkpoint</span> <span style="color:#0000ff;">end</span>], [page id], [minimum lsn],</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum7" style="color:#606060;"> 7:</span> [Dirty Pages] spid, [<span style="color:#0000ff;">Begin</span> <span style="color:#0000ff;">Time</span>], [<span style="color:#0000ff;">Transaction</span> Name], [<span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Time</span>],</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;"><span id="lnum8" style="color:#606060;"> 8:</span> [Lock Information], Description</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;"><span id="lnum9" style="color:#606060;"> 9:</span> <span style="color:#0000ff;">FROM</span> ::fn_dblog(<span style="color:#0000ff;">NULL</span>, <span style="color:#0000ff;">NULL</span>)</pre>
<p>&nbsp;</p>
</div>
</div>
<p>&nbsp;</p>
<p><a href="http://togrady.files.wordpress.com/2011/08/image9.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" src="http://togrady.files.wordpress.com/2011/08/image_thumb8.png?w=600&#038;h=245" alt="image" width="600" height="245" border="0" /></a></p>
<p>&nbsp;</p>
<h2>So when does checkpoint run</h2>
<p>When the database is shutdown a checkpoint is run against each database. The only exception to this is when shutdown is called with the no wait option or the server crashes.</p>
<p>The checkpoint process is run before each backup</p>
<p>The transaction exceeds maximum&#8217;s for the active portion</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/togrady.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/togrady.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/togrady.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/togrady.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/togrady.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/togrady.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/togrady.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/togrady.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/togrady.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/togrady.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/togrady.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/togrady.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/togrady.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/togrady.wordpress.com/202/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=togrady.wordpress.com&amp;blog=4825359&amp;post=202&amp;subd=togrady&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://togrady.wordpress.com/2011/08/22/checkpoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0cf64726cc495f45c6e760a17556b864?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">togrady</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2011/08/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2011/08/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2011/08/image_thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2011/08/image_thumb5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2011/08/image_thumb6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2011/08/image_thumb7.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2011/08/image_thumb8.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Server Clustering 2 &#8211; Windows Setup</title>
		<link>http://togrady.wordpress.com/2011/08/02/sql-server-clustering-2-windows-setup/</link>
		<comments>http://togrady.wordpress.com/2011/08/02/sql-server-clustering-2-windows-setup/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 15:59:49 +0000</pubDate>
		<dc:creator>togrady</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://togrady.wordpress.com/2011/08/02/sql-server-clustering-2-windows-setup/</guid>
		<description><![CDATA[We currently run a couple of production SQL Server clusters, the trouble for me is that they are very stable, I do not have to do much to maintain availability. to improve my Clustering knowledge I am taking a&#160; 2 phased approach. Since I learn best by doing, on top of reading up on the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=togrady.wordpress.com&amp;blog=4825359&amp;post=183&amp;subd=togrady&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We currently run a couple of production SQL Server clusters, the trouble for me is that they are very stable, I do not have to do much to maintain availability. to improve my Clustering knowledge I am taking a&#160; 2 phased approach. Since I learn best by doing, on top of reading up on the theory I am going to&#160; build a two node windows 2003 cluster (virtualised) I am going to install SQL 2005 on top of it.</p>
<p>&#160;</p>
<p>I was lucky that a few things went wrong and I learned a lot doing the install. The most important thing I learned do not attempt to install a SQL Server Cluster using RDP. Make sure all RDP connections are closed before starting the install and install from the console. I do not know why this is an issue, I must investigate further??? The error messages returned talked about Error message saying the native client will not install and No process is on the other end of the pipe. troubleshooting both of these, in the end it was RDP that was causing the issues.</p>
<p>&#160;</p>
<p>I used VMware to build a 2 node windows 2003 cluster and I installed a SQL Server 2005 Developer Edition cluster on top of this. The main documents I consulted during the install were </p>
<table border="0" cellspacing="0" cellpadding="1" width="599">
<tbody>
<tr>
<td valign="top" width="137">VMware</td>
<td valign="top" width="460"><a title="http://www.vmware.com/pdf/vi3_301_201_mscs.pdf" href="http://www.vmware.com/pdf/vi3_301_201_mscs.pdf">http://www.vmware.com/pdf/vi3_301_201_mscs.pdf</a></td>
</tr>
<tr>
<td valign="top" width="139">SQL 2005 Clustering White Paper</td>
<td valign="top" width="459"><a title="https://www.microsoft.com/downloads/en/details.aspx?familyid=818234dc-a17b-4f09-b282-c6830fead499&amp;displaylang=en" href="https://www.microsoft.com/downloads/en/details.aspx?familyid=818234dc-a17b-4f09-b282-c6830fead499&amp;displaylang=en">https://www.microsoft.com/downloads/en/details.aspx?familyid=818234dc-a17b-4f09-b282-c6830fead499&amp;displaylang=en</a></td>
</tr>
<tr>
<td valign="top" width="140">Windows 2003 Cluster White Paper</td>
<td valign="top" width="458"><a title="http://technet.microsoft.com/en-us/library/cc778252%28WS.10%29.aspx" href="http://technet.microsoft.com/en-us/library/cc778252%28WS.10%29.aspx">http://technet.microsoft.com/en-us/library/cc778252%28WS.10%29.aspx</a></td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<h2>Following this documentation, these are the notes I made to assist me with future installs.</h2>
<ul>
<li>Setup a single Virtual Machine using a standard configuration but add an additional NIC for the private heartbeat </li>
<li>Install Microsoft Windows Enterprise Edition with all applicable updates on both nodes, keeping both configurations identical. When the setup completes </li>
<li>Configure networking for both the LAN and the Private heartbeat NIC’s </li>
<li>Under Control Panel &gt; Network Connections &gt; Advanced Settings &gt; </li>
<li>Configure the binding order, the LAN NIC should come first </li>
<li>Configure the private NIC </li>
<li>&#160;&#160;&#160;&#160; Disable everything except TCP/IP </li>
<li>&#160;&#160;&#160;&#160; Set the duplicity to half / 10mb&#8217;s &#8211;reliability over performance </li>
<li>&#160;&#160;&#160;&#160; Use a separate class of network to public </li>
<li>&#160;&#160;&#160;&#160; FOR TCP/IP have no default gateway, no DNS, disable NETBIOS </li>
<li>Power off Node1 </li>
<li>Within VMware Clone Node1 </li>
<li>Turn on the cloned Node1 which becomes Node2 </li>
<li>Change the server name and the assigned IP addresses </li>
<li>Add Node2 to a&#160; domain </li>
<li>Turn on Node1 </li>
<li>On both nodes run ipconfig /all and complete a quick comparison between nodes </li>
<li>Add Node1 to domain </li>
<li>A&#160; minimum of 3 shared disk are required (Quorum, MSDTC, SQL) </li>
<li>Add the shared disks to Node1, to do this the disk must first be zeroed out. </li>
</ul>
<p><a href="http://togrady.files.wordpress.com/2011/08/image4.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="Image[4]" border="0" alt="Image[4]" src="http://togrady.files.wordpress.com/2011/08/image4_thumb.png?w=501&#038;h=124" width="501" height="124" /></a></p>
<ul>
<li>Use PUTTY to logon to the Server console and run vmkfstools –w diskname.vmdk </li>
<li>When adding the disk there is a requirement to use a new SCSI controller which is set to LSI Logic, with the SCSI bus sharing set to Virtual. </li>
</ul>
<p><a href="http://togrady.files.wordpress.com/2011/08/image14.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="Image(1)[4]" border="0" alt="Image(1)[4]" src="http://togrady.files.wordpress.com/2011/08/image14_thumb.png?w=459&#038;h=222" width="459" height="222" /></a></p>
<ul>
<li>Add the disks to Node2 following the same procedure </li>
<li>Power off both nodes </li>
<li>Power on Node1 and add the disks through disk management and DISKPART setting the partition alignment. </li>
<li>Verify the disks in window&#8217;s explorer &#8211; add txt document edit and delete </li>
<li>Power off Node1 </li>
<li>Power on Node2 and Test the disks </li>
<li>Power off Node2 </li>
<li>Power on Node1 </li>
<li>Ensure to have
<ul>
<li>IP address for Cluster and a cluster name </li>
<li>A domain account which has local Admin rights on Node1 and 2 </li>
</ul>
</li>
<li>from Cluster Administrator launch cluster setup wizard </li>
</ul>
<p><a href="http://togrady.files.wordpress.com/2011/08/image24.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="Image(2)[4]" border="0" alt="Image(2)[4]" src="http://togrady.files.wordpress.com/2011/08/image24_thumb.png?w=244&#038;h=191" width="244" height="191" /></a></p>
<p><a href="http://togrady.files.wordpress.com/2011/08/image34.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="Image(3)[4]" border="0" alt="Image(3)[4]" src="http://togrady.files.wordpress.com/2011/08/image34_thumb.png?w=244&#038;h=189" width="244" height="189" /></a></p>
<ul>
<li>When the setup completed review the cluster configuration log file C:\WINDOWS\system32\LogFiles\Cluster\clcsfsrv.log </li>
<li>power on Node2 </li>
<li>From Node1 add Node2 using Cluster Administrator add node </li>
<li>Test that failover works between both nodes. </li>
<li>From Cluster Administrator
<ul>
<li>Set the Network Priority. Give private priority </li>
<li>Configure Private (heartbeat) for Private only </li>
<li>Public (LAN) for mixed </li>
</ul>
<p> On both node1 and node2 </li>
</ul>
<ul>
<li>Enable MSDTC http://support.microsoft.com/kb/817064 </li>
<li>Configure MSDTC <a href="http://support.microsoft.com/?id=301600">http://support.microsoft.com/?id=301600</a> </li>
<li>Ensure MSDTC will failover for both nodes </li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/togrady.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/togrady.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/togrady.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/togrady.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/togrady.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/togrady.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/togrady.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/togrady.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/togrady.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/togrady.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/togrady.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/togrady.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/togrady.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/togrady.wordpress.com/183/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=togrady.wordpress.com&amp;blog=4825359&amp;post=183&amp;subd=togrady&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://togrady.wordpress.com/2011/08/02/sql-server-clustering-2-windows-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0cf64726cc495f45c6e760a17556b864?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">togrady</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2011/08/image4_thumb.png" medium="image">
			<media:title type="html">Image[4]</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2011/08/image14_thumb.png" medium="image">
			<media:title type="html">Image(1)[4]</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2011/08/image24_thumb.png" medium="image">
			<media:title type="html">Image(2)[4]</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2011/08/image34_thumb.png" medium="image">
			<media:title type="html">Image(3)[4]</media:title>
		</media:content>
	</item>
		<item>
		<title>Query Performance</title>
		<link>http://togrady.wordpress.com/2011/08/02/query-performance/</link>
		<comments>http://togrady.wordpress.com/2011/08/02/query-performance/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 15:56:59 +0000</pubDate>
		<dc:creator>togrady</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">https://togrady.wordpress.com/2011/08/02/query-performance/</guid>
		<description><![CDATA[How can I identify slow running queries and what causes a query to run slowly? One approach I like to use to identify query performance issues&#160; is use the built-in DMV’s available from SQL Server 2005 onwards. One of my favourites to start is sys.dm_exec_query_stats. This DMV looks at plans that are stored in the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=togrady.wordpress.com&amp;blog=4825359&amp;post=174&amp;subd=togrady&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>How can I identify slow running queries and what causes a query to run slowly?</p>
<p>One approach I like to use to identify query performance issues&#160; is use the built-in DMV’s available from SQL Server 2005 onwards. One of my favourites to start is <strong>sys.dm_exec_query_stats.</strong> This DMV looks at <strong>plans that are stored in the plan (procedure) cache</strong>. The view returns one row for each statement in a plan. When using this dmv I have to remind myself&#160; that not everything gets stored in the plan cache for instance:</p>
<ul>
<li>Zero cost or trivial plans </li>
<li>DBCC , Backups and RECOMPILES, </li>
</ul>
<p>On top of this older plans can get aged out depending on resource requirements, so it will not give a complete picture of your system, but it is a good good place to start given its benefit&#8217;s including:</p>
<ul>
<li>the data already collected for you by SQL Server </li>
<li>it is non intrusive and resource light </li>
</ul>
<h2>Query Anatomy</h2>
<p>It is worth taking a quick step back and reviewing how the plan cache fits into to the Anatomy of a Query.&#160; When a user executes a query SQL Server asks the&#160; command parser to verify that the query is syntactically correct, once this completes successfully it next generates a hash for the query and checks the plan cache to see if an existing plan is available for the query. <strong>Command Parser checks the –&gt; plan cache (part of the buffer pool memory).</strong> It is area of memory that sys.dm_exec_query_stats queries for its information</p>
<p><a href="http://togrady.files.wordpress.com/2011/08/sqlplancahce.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="sqlplancahce" border="0" alt="sqlplancahce" src="http://togrady.files.wordpress.com/2011/08/sqlplancahce_thumb.png?w=322&#038;h=186" width="322" height="186" /></a></p>
<h2>sys.dm_exec_query_stats</h2>
<p><strong>sys.dm_exec_query_stats</strong> can help identify where plans are over utilising resources such as:</p>
<ul>
<li>CPU&#160; (worker) </li>
<li>I/O – Memory (logical) </li>
<li>I/O – Disk (Physical) </li>
<li>CLR </li>
<li>Recompiles A bottleneck on any of these resources can cause queries to run slowly. </li>
</ul>
<p>A quick but important distinction, important for SQL Server performance</p>
<ul>
<li>Physical I/O = Disk = Expensive (slow) </li>
<li>Logical I/O = Memory = Faster </li>
</ul>
<blockquote><p>sys.dm_exec_query_stats gives the time the plan last&#160; started executing and the time the plan was compiled. This can be useful in narrowing the scope of the result set, for example if I only want to look at queries executed today or this week. The dmv also gives the plan handle and sql handle these are tokens that refer to the batch and plan that the query is part of, more on these later.</p>
<p>&#160;</p>
</blockquote>
<p>The chart below distinguishes between the various resources required by a query and the values we can obtain from sys.dm_exec_query_stats.</p>
<p><a href="http://togrady.files.wordpress.com/2011/08/image1.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://togrady.files.wordpress.com/2011/08/image_thumb1.png?w=593&#038;h=125" width="593" height="125" /></a></p>
<p>Totals – are totals since last compile</p>
<p>max / min – values are values achieved ever by the query</p>
<p>When running a query I can order the result set based on any of the resources identified above. If for example I have already identified that&#160; CPU is a bottleneck then I can order the result set by either total_worker_time or the average worker time DESCENDING.</p>
<p>Taking all this on board I usually end up with a query that look like:</p>
<p>SELECT    <br />sql_handle     <br />,plan_handle     <br />,creation_time &#8211;time plan was last compiled     <br />,last_execution_time &#8212; time the plan last started executing     <br />,plan_generation_num – The number of times the plan was recompiled    <br />,execution_count – number of times plan was executed since last recompile    <br />,total_elapsed_time     <br />,total_worker_time     <br />,total_logical_reads     <br />,total_physical_reads     <br />,total_logical_writes     <br />,last_elapsed_time     <br />,total_worker_time/ execution_count&#160; as avg_CPU_time     <br />,last_worker_time     <br />,total_logical_reads / execution_count&#160; as avg_Logical_read     <br />,last_logical_reads     <br />,total_physical_reads&#160; / execution_count&#160; as avg_Physical_read     <br />,last_physical_reads     <br />,total_logical_writes / execution_count&#160; as avg_logical_writes     <br />,last_logical_writes     <br />,total_elapsed_time     <br />,last_elapsed_time     <br />FROM SYS.dm_exec_query_stats     <br />order by avg_CPU_time DESC</p>
<p>The result set will tell me; for an averaged execution which queries are using the most CPU time.</p>
<p>&#160;</p>
<ul>
<li>Has a query started to run slower and how can we tell ? </li>
<li>We already looked at the total_elapsed_time&#160; /&#160; execution_count = Average Elapsed time </li>
<li>Difference between the last_elapsed_time and the total_elapsed_time gives us an idea if it is running more slowly. Also we can look at the max_elapsed_time and the min_elapsed_time </li>
<li>Difference between Average worker Time&#160; and last_worker_time = increase in query cpu time for last time run </li>
<li>Is the difference across multiple queries or just one? </li>
</ul>
<h2>sys.dm_exec_sql_text</h2>
<p>To make it more meaningful and to allow me to start troubleshooting performance issues what I&#160; need to see is the text of the query and the plan the query is using. To get these I use the sql_handle and plan_handle tokens I talked about earlier to call a couple of more DMV’s. Firstly <strong>sys.dm_exec_sql_text</strong>, this dmv is a function and takes the sql_handle as a parameter, it needs to be combined with the statement_start_offset and the statement_end_offset to retrieve the query text. Books Online has an example of how to achieve this.</p>
<p>(SELECT SUBSTRING(st.text, statement_start_offset/2 + 1,    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; (CASE WHEN statement_end_offset = -1     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; THEN LEN(CONVERT(nvarchar(max), st.text)) * 2     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ELSE statement_end_offset     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; END &#8211; statement_start_offset) / 2     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; )     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; FROM sys.dm_exec_sql_text([sql_handle]) AS st) AS query_text</p>
<h2>sys.dm_exec_query_plan</h2>
<p>TO look at the query plan,I use the sys.dm_exec_query_plan dmv this takes the plan_handle as a parameter and returns the queries execution plan. Exercise caution when executing this dmv as can be resource intensive.</p>
<p>select * from sys.dm_exec_query_plan([plan_handle])</p>
<h2>&#160;</h2>
<p>References</p>
<p><a title="http://technet.microsoft.com/en-us/library/bb838723%28office.12%29.aspx" href="http://technet.microsoft.com/en-us/library/bb838723%28office.12%29.aspx">http://technet.microsoft.com/en-us/library/bb838723%28office.12%29.aspx</a></p>
<p>BOL search for : sys.dm_exec_query_stats </p>
<p><a title="http://sqlblog.com/blogs/adam_machanic/archive/2010/04/22/a-warning-to-those-using-sys-dm-exec-query-stats.aspx" href="http://sqlblog.com/blogs/adam_machanic/archive/2010/04/22/a-warning-to-those-using-sys-dm-exec-query-stats.aspx">http://sqlblog.com/blogs/adam_machanic/archive/2010/04/22/a-warning-to-those-using-sys-dm-exec-query-stats.aspx</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/togrady.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/togrady.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/togrady.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/togrady.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/togrady.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/togrady.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/togrady.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/togrady.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/togrady.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/togrady.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/togrady.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/togrady.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/togrady.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/togrady.wordpress.com/174/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=togrady.wordpress.com&amp;blog=4825359&amp;post=174&amp;subd=togrady&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://togrady.wordpress.com/2011/08/02/query-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0cf64726cc495f45c6e760a17556b864?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">togrady</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2011/08/sqlplancahce_thumb.png" medium="image">
			<media:title type="html">sqlplancahce</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2011/08/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>VMware ESX 4.1 Server</title>
		<link>http://togrady.wordpress.com/2011/04/29/vmware-esx-4-1-server/</link>
		<comments>http://togrady.wordpress.com/2011/04/29/vmware-esx-4-1-server/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 11:36:51 +0000</pubDate>
		<dc:creator>togrady</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://togrady.wordpress.com/2011/04/29/vmware-esx-4-1-server/</guid>
		<description><![CDATA[When I attempted to remove&#160; remove a virtual switch using the vSphere Client I kept getting the following error “HostNetworkSystem.UpdateNetworkConfig&#34; for object &#34;networkSystem&#34; failed &#160; To resolve the issue I deleted the configuration from the console using the command esxcfg-vswitch –d &#60;virtual switch name&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=togrady.wordpress.com&amp;blog=4825359&amp;post=169&amp;subd=togrady&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When I attempted to remove&#160; remove a virtual switch using the vSphere Client I kept getting the following error</p>
<p><font color="#ff0000">“HostNetworkSystem.UpdateNetworkConfig&quot; for object &quot;networkSystem&quot; failed</font></p>
<p>&#160;</p>
<p>To resolve the issue I deleted the configuration from the console using the command </p>
<p>esxcfg-vswitch –d &lt;virtual switch name&gt;    </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/togrady.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/togrady.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/togrady.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/togrady.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/togrady.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/togrady.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/togrady.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/togrady.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/togrady.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/togrady.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/togrady.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/togrady.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/togrady.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/togrady.wordpress.com/169/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=togrady.wordpress.com&amp;blog=4825359&amp;post=169&amp;subd=togrady&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://togrady.wordpress.com/2011/04/29/vmware-esx-4-1-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0cf64726cc495f45c6e760a17556b864?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">togrady</media:title>
		</media:content>
	</item>
		<item>
		<title>Trying to utilise all a Physical Servers CPU&#8217;s of one host in VMware</title>
		<link>http://togrady.wordpress.com/2011/04/06/trying-to-utilise-all-a-physical-servers-cpus-of-one-host-in-vmware/</link>
		<comments>http://togrady.wordpress.com/2011/04/06/trying-to-utilise-all-a-physical-servers-cpus-of-one-host-in-vmware/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 11:16:41 +0000</pubDate>
		<dc:creator>togrady</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://togrady.wordpress.com/2011/04/06/trying-to-utilise-all-a-physical-servers-cpus-of-one-host-in-vmware/</guid>
		<description><![CDATA[&#160; Our&#160; VMware vSphere 4 Enterprise license covers us for for 2 physical CPUs (1-6 cores per CPU), we are running it on a 2 CPU x 4 core box giving us 8 virtual CPU’s&#160; but as we discovered we can only allocate 4 virtual CPU’s per host. TO resolve this we would have to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=togrady.wordpress.com&amp;blog=4825359&amp;post=167&amp;subd=togrady&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p>Our&#160; VMware vSphere 4 Enterprise license covers us for for 2 physical CPUs (1-6 cores per CPU), we are running it on a 2 CPU x 4 core box giving us 8 virtual CPU’s&#160; but as we discovered we can only allocate 4 virtual CPU’s per host. <a href="http://togrady.files.wordpress.com/2011/04/image.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;" title="image" border="0" alt="image" src="http://togrady.files.wordpress.com/2011/04/image_thumb.png?w=483&#038;h=213" width="483" height="213" /></a></p>
<p>TO resolve this we would have to purchase an Enterprise Plus license per cpu for a 2 cpu server.&#160; In fact to enable failover and VM ware high availability features we would also need to purchase a set of licences for an additional server.</p>
<p> We are currently&#160; evaluating the best way to provide a high availability SQL Server environment. At the moment we are using&#160; <a href="http://msdn.microsoft.com/en-us/library/ms952401.aspx">MSCS</a> we felt we may be able to better utilise server resources if we could move SQL Server to VMware but this may not&#160; be justifiable given the license costs of&#160; Enterprise Plus&#160; </p>
<p>VMware have a KB about it here <a title="http://www.vmware.com/products/vsphere/buy/editions_comparison.html" href="http://www.vmware.com/products/vsphere/buy/editions_comparison.html">http://www.vmware.com/products/vsphere/buy/editions_comparison.html</a></p>
<p>VMware also have a Compare vSphere Editions chart at </p>
<p><a title="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1019868" href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1019868">http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1019868</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/togrady.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/togrady.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/togrady.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/togrady.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/togrady.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/togrady.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/togrady.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/togrady.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/togrady.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/togrady.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/togrady.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/togrady.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/togrady.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/togrady.wordpress.com/167/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=togrady.wordpress.com&amp;blog=4825359&amp;post=167&amp;subd=togrady&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://togrady.wordpress.com/2011/04/06/trying-to-utilise-all-a-physical-servers-cpus-of-one-host-in-vmware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0cf64726cc495f45c6e760a17556b864?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">togrady</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2011/04/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Time vs. Stress Analysis for Tour Tailteann Part 1</title>
		<link>http://togrady.wordpress.com/2011/03/31/time-vs-stress-analysis-for-tour-tailteann-part-1/</link>
		<comments>http://togrady.wordpress.com/2011/03/31/time-vs-stress-analysis-for-tour-tailteann-part-1/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 19:11:45 +0000</pubDate>
		<dc:creator>togrady</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://togrady.wordpress.com/2011/03/31/time-vs-stress-analysis-for-tour-tailteann-part-1/</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=togrady.wordpress.com&amp;blog=4825359&amp;post=162&amp;subd=togrady&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://togrady.files.wordpress.com/2011/03/tour.jpg"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0 none;" title="tour" src="http://togrady.files.wordpress.com/2011/03/tour_thumb.jpg?w=414&#038;h=312" border="0" alt="tour" width="414" height="312" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/togrady.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/togrady.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/togrady.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/togrady.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/togrady.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/togrady.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/togrady.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/togrady.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/togrady.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/togrady.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/togrady.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/togrady.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/togrady.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/togrady.wordpress.com/162/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=togrady.wordpress.com&amp;blog=4825359&amp;post=162&amp;subd=togrady&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://togrady.wordpress.com/2011/03/31/time-vs-stress-analysis-for-tour-tailteann-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0cf64726cc495f45c6e760a17556b864?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">togrady</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2011/03/tour_thumb.jpg" medium="image">
			<media:title type="html">tour</media:title>
		</media:content>
	</item>
		<item>
		<title>Removing a CX300LUN from Windows Server</title>
		<link>http://togrady.wordpress.com/2011/03/29/removing-a-cx300lun-from-windows-server/</link>
		<comments>http://togrady.wordpress.com/2011/03/29/removing-a-cx300lun-from-windows-server/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 10:16:49 +0000</pubDate>
		<dc:creator>togrady</dc:creator>
				<category><![CDATA[SAN]]></category>
		<category><![CDATA[Storage]]></category>

		<guid isPermaLink="false">https://togrady.wordpress.com/2011/03/29/removing-a-cx300lun-from-windows-server/</guid>
		<description><![CDATA[2 Step Process Login to navisphere manager and remove the LUN Tidy up the windows OS Can be done while server is running &#160; Login to Navisphere Manager Select Storage &#62; Storage Groups&#62; Select LUN’s From the selected LUNs list choose the LUNS to remove Remove the LUNs and click Apply &#160; Login to Windows [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=togrady.wordpress.com&amp;blog=4825359&amp;post=157&amp;subd=togrady&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3>2 Step Process</h3>
<ul>
<li>Login to navisphere manager and remove the LUN</li>
<li>Tidy up the windows OS</li>
<li>Can be done while server is running</li>
</ul>
<p>&nbsp;</p>
<h3>Login to Navisphere Manager</h3>
<ul>
<li>Select Storage &gt; Storage Groups&gt; Select LUN’s</li>
<li><a href="http://togrady.files.wordpress.com/2011/03/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://togrady.files.wordpress.com/2011/03/image_thumb.png?w=207&#038;h=244" border="0" alt="image" width="207" height="244" /></a></li>
<li>From the selected LUNs list choose the LUNS to remove</li>
<li>Remove the LUNs and click Apply</li>
</ul>
<p>&nbsp;</p>
<p>Login to Windows Server</p>
<ul>
<li>From Computer Management</li>
<li>Disk Management &gt; Rescan Disks</li>
<li>From the Command Prompt  navigate to C:\Program Files (x86)\EMC\PowerPath</li>
<li>run <strong><span style="color:#ff0000;">powermt check</span></strong></li>
<li>Accept all the changes</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/togrady.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/togrady.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/togrady.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/togrady.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/togrady.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/togrady.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/togrady.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/togrady.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/togrady.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/togrady.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/togrady.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/togrady.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/togrady.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/togrady.wordpress.com/157/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=togrady.wordpress.com&amp;blog=4825359&amp;post=157&amp;subd=togrady&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://togrady.wordpress.com/2011/03/29/removing-a-cx300lun-from-windows-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0cf64726cc495f45c6e760a17556b864?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">togrady</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2011/03/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Setup Integration Services to run on a SQL Server cluster and migrate over a simple DTS package</title>
		<link>http://togrady.wordpress.com/2010/05/11/migrating-a-simple-dts-package-to-integration-services-to-run-on-a-sql-server-cluster/</link>
		<comments>http://togrady.wordpress.com/2010/05/11/migrating-a-simple-dts-package-to-integration-services-to-run-on-a-sql-server-cluster/#comments</comments>
		<pubDate>Tue, 11 May 2010 10:31:58 +0000</pubDate>
		<dc:creator>togrady</dc:creator>
				<category><![CDATA[SQL Server Integration Services]]></category>
		<category><![CDATA[Integration Services]]></category>

		<guid isPermaLink="false">https://togrady.wordpress.com/2010/05/07/migrating-a-simple-dts-package-to-integration-services-to-run-on-a-sql-server-cluster/</guid>
		<description><![CDATA[&#160; Currently we have several SQL Server 2000 DTS packages running within a cluster ,they&#160; use few features but move a significant chunk of data by executing&#160; stored procedures, creating temporary tables and exporting the results to CSV files.&#160; As part of the 2005 cluster&#160; upgrade the packages needed to be either; Run as 2000 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=togrady.wordpress.com&amp;blog=4825359&amp;post=134&amp;subd=togrady&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<blockquote><p>&#160;</p>
</blockquote>
<p>Currently we have several SQL Server 2000 DTS packages running within a cluster ,they&#160; use few features but move a significant chunk of data by executing&#160; stored procedures, creating temporary tables and exporting the results to CSV files.&#160; As part of the 2005 cluster&#160; upgrade the packages needed to be either;</p>
<ol>
<li>Run as 2000 DTS&#160; packages in the SQL Server 2005 environment </li>
<li>Rewritten&#160; Integration Services packages. </li>
</ol>
<p>Both of these options have several flavours to them, for instance I could have embedded the DTS package as a Integration Services task.</p>
<p>Option 2 offered us the ability to take full advantage of our new 64 bit environment and meant we did not have to install the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&amp;displaylang=en">Backward compatibility components</a> since the rewrite was straightforward this was the obvious choice.</p>
<h5>The steps to complete this</h5>
<ul>
<li>Rewrite DTS package as a Integration Services Project </li>
<li>Configure Integration services to work with our 2005 cluster </li>
<li>Import the IS package into Integration services </li>
<li>Schedule the package in SQL Server Agent </li>
<li>Test the results obtained from the 2005 package against the 2000 results&#160; </li>
</ul>
<h5>Rewrite DTS package as a Integration Services Project</h5>
<p>This was straightforward, creating a new Integration services project I was only working with 2 components the Execute SQL task and Data flow task.</p>
<h5>Configure Integration services to work with a clustered environment</h5>
<p>This step is not necessary in order to get the packages to run, but it is useful for administrating them.</p>
<p>Integration services gets installed as part of a SQL Server Cluster, however it is not setup as a clustered resource and <a href="http://msdn.microsoft.com/en-us/library/ms345193.aspx">Microsoft do not recommend</a> doing so. </p>
<p>Following&#160; <a href="http://msdn.microsoft.com/en-us/library/ms137789.aspx">Microsoft&#8217;s instructions</a> I had&#160; to edit the <font color="#008000">MsDtsSrvr.ini.xml</font> file on all nodes in the cluster, changing the <font color="#008000">&lt;ServerName&gt;.&lt;/ServerName&gt;</font> tag by&#160; replacing localhost with the SQL Server cluster network name.</p>
<h5>&#160;</h5>
<p>Next the&#160; security settings in Component Services need to be modified. The “Launch and Activate permissions” need to be changed in two places;</p>
<ul>
<li>Under Component Services &gt; My Computer &gt; Properties </li>
</ul>
<p><a href="http://togrady.files.wordpress.com/2010/05/image2.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://togrady.files.wordpress.com/2010/05/image_thumb2.png?w=244&#038;h=163" width="244" height="163" /></a> </p>
<ul>
<li>Under&#160; Component Services &gt; DCOM Config &gt; MsDtsServer &gt;Properties </li>
</ul>
<p><a href="http://togrady.files.wordpress.com/2010/05/image3.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://togrady.files.wordpress.com/2010/05/image_thumb3.png?w=244&#038;h=94" width="244" height="94" /></a> </p>
<p><a title="http://dougbert.com/blogs/dougbert/archive/2009/04/09/ssis-and-clustering-what-you-should-do-instead.aspx" href="http://dougbert.com/blogs/dougbert/archive/2009/04/09/ssis-and-clustering-what-you-should-do-instead.aspx"></a></p>
<p>In both cases any accounts that will be connecting to Integration Services will need to appropriate permissions.</p>
<p>One other&#160; point on this, it is only possible to connect to SQL 2005 Integration Services from the 2005 Management Studio, it it not possible to connect to&#160; a 2005 server from the 2008 Management Studio</p>
<h5>Import the IS package into Integration services </h5>
<p>Not that it is possible to connect to Integration through SSMS. I can import the package into the MSDB database.</p>
<p>Firstly use SSMS to connect to Integration services, specifying the SQL Server cluster network name</p>
<p><a href="http://togrady.files.wordpress.com/2010/05/image4.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://togrady.files.wordpress.com/2010/05/image_thumb4.png?w=244&#038;h=174" width="244" height="174" /></a> </p>
<p>Once connected add the package to the MSDB database</p>
<p><a href="http://togrady.files.wordpress.com/2010/05/image5.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://togrady.files.wordpress.com/2010/05/image_thumb5.png?w=244&#038;h=207" width="244" height="207" /></a> </p>
<p>&#160;</p>
<h5>Scheduling the package in SQL Server Agent </h5>
<p>When configuring the package to run as a scheduled task the Windows account under which the package will run requires permissions to execute the package and also possibly permissions to connect to data sources within the package depending on how it is configured. I looked at 2 choices to achieve this</p>
<ol>
<li>Give the SQL Server Agent Account the necessary permissions </li>
<li>Create a proxy account </li>
</ol>
<p>Looking ahead we will probably need to configure a number of different packages to run on the server over its lifetime, potentially these may be from different business entities, with this in mind using proxy accounts will give us more flexibility. </p>
<h5>To&#160; create a proxy account</h5>
<p>&#160;</p>
<p>Add the NT users credentials </p>
<table border="0" cellspacing="0" cellpadding="2" width="600">
<tbody>
<tr>
<td valign="top" width="27"><a href="http://togrady.files.wordpress.com/2010/05/image6.png"><img style="display:inline;border-width:0;margin:10px 0 0;" title="image" border="0" alt="image" src="http://togrady.files.wordpress.com/2010/05/image_thumb6.png?w=210&#038;h=244" width="210" height="244" /></a></td>
<td valign="top" width="373">
<ol>
<li>In SSMS browse to Security &gt; Credentials </li>
<li>Right click to create the account credentials </li>
<li>Give the credentials&#160; a name </li>
<li>Enter the name of the NT account as well as the username and password for the account </li>
</ol>
</td>
</tr>
<tr>
<td width="27">
<ul>
<li>&#160;&#160;&#160;&#160; T<strong>SQL</strong> </li>
</ul>
</td>
<td valign="top" width="373">
<p class="MsoNormal"><span style="font-family:&quot;color:blue;font-size:10pt;">USE</span><span style="font-family:&quot;font-size:10pt;"> [master] </span>
</p>
</p>
<p class="MsoNormal"><span style="font-family:&quot;color:blue;font-size:10pt;">CREATE</span><span style="font-family:&quot;font-size:10pt;"> <span style="color:blue;">CREDENTIAL</span> [&lt;Credential Name&gt;] <span style="color:blue;">WITH</span> </span>
</p>
</p>
<p class="MsoNormal"><span style="font-family:&quot;color:blue;font-size:10pt;">IDENTITY</span><span style="font-family:&quot;font-size:10pt;"> <span style="color:gray;">=</span> <span style="color:red;">N&#8217;<font color="#008000">&lt;DOMAIN&gt;\&lt;USERNAME&gt;</font>&#8216;</span><span style="color:gray;">,</span> </span>
</p>
</p>
<p class="MsoNormal"><span style="font-family:&quot;color:blue;font-size:10pt;">SECRET</span><span style="font-family:&quot;font-size:10pt;"> <span style="color:gray;">=</span> <span style="color:red;">N&#8217;<font color="#008000">&lt;Password&gt;</font>&#8216;</span></span></p>
</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>Create the proxy account</p>
<table border="0" cellspacing="0" cellpadding="2" width="600">
<tbody>
<tr>
<td valign="top" width="20"><a href="http://togrady.files.wordpress.com/2010/05/image7.png"><img style="display:inline;border-width:0;margin:10px 0 0;" title="image" border="0" alt="image" align="left" src="http://togrady.files.wordpress.com/2010/05/image_thumb7.png?w=210&#038;h=244" width="210" height="244" /></a></td>
<td valign="top" width="380">
<ol>
<li>In SSMS&#160; browse to SQL Server Agent &gt; Proxies &gt; SSIS Package Execution </li>
<li>Right Click to create a new Proxy </li>
<li>Give the Proxy a meaningful name </li>
<li>Choose the credentials account created above </li>
<li>Select the SSIS Integration Services Subsystem </li>
<li>Click on the principals option </li>
<li>Add the SQL Server Agent Account as a Proxy Account Principal, giving it access to the proxy account </li>
</ol>
</td>
</tr>
<tr>
<td width="20" align="center">
<ul>
<li>
<div align="left">&#160;&#160;&#160;&#160; <strong>TSQL</strong></div>
</li>
</ul>
</td>
<td valign="top" width="380">
<p class="MsoNormal"><span style="font-family:&quot;color:blue;font-size:10pt;">USE</span><span style="font-family:&quot;font-size:10pt;"> [msdb] </span></p>
</p>
</p>
<p class="MsoNormal"><span style="font-family:&quot;color:blue;font-size:10pt;">EXEC</span><span style="font-family:&quot;font-size:10pt;"> msdb<span style="color:gray;">.</span>dbo<span style="color:gray;">.</span><span style="color:maroon;">sp_add_proxy</span><span style="color:blue;"> </span></span>
</p>
</p>
<p class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">@proxy_name<span style="color:gray;">=</span><span style="color:red;">N&#8217;</span><span style="color:#76923c;"><font color="#008000">&lt;Proxy Name&gt;</font></span><span style="color:red;">&#8216;</span><span style="color:gray;">, </span></span>
</p>
</p>
<p class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">@credential_name<span style="color:gray;">=</span><span style="color:red;">N&#8217;</span><span style="color:#76923c;"><font color="#008000">&lt;Name&gt;</font></span><span style="color:red;">&#8216;</span><span style="color:gray;">,</span> </span></p>
</p>
</p>
<p class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">@enabled<span style="color:gray;">=</span>1 </span></p>
</p>
</p>
<p class="MsoNormal"><span style="font-family:&quot;color:blue;font-size:10pt;"></span></p>
<p class="MsoNormal"><span style="font-family:&quot;color:blue;font-size:10pt;">EXEC</span><span style="font-family:&quot;font-size:10pt;"> msdb<span style="color:gray;">.</span>dbo<span style="color:gray;">.</span><span style="color:maroon;">sp_grant_proxy_to_subsystem</span><span style="color:blue;"> </span></span>
</p>
</p>
<p class="MsoNormal"><span style="font-family:&quot;font-size:10pt;">@proxy_name<span style="color:gray;">=</span><span style="color:red;">N&#8217;</span><span style="color:#76923c;"><font color="#008000">&lt;Proxy Name&gt;</font></span><span style="color:red;">&#8216;</span><span style="color:gray;">,</span> @subsystem_id<span style="color:gray;">=</span>11</span></p>
</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>Give the account the necessary permissions</p>
<table border="0" cellspacing="0" cellpadding="2" width="600">
<tbody>
<tr>
<td valign="top" width="62"><a href="http://togrady.files.wordpress.com/2010/05/image8.png"><img style="display:inline;border-width:0;margin:5px 0 0;" title="image" border="0" alt="image" src="http://togrady.files.wordpress.com/2010/05/image_thumb8.png?w=185&#038;h=244" width="185" height="244" /></a></td>
<td valign="top" width="338">
<ol>
<li>Add the account to the&#160; MSDB database and granting it the db_dtsltduser role </li>
</ol>
</td>
</tr>
<tr>
<td width="62">&#160;
<ul>
<li>&#160;&#160;&#160;&#160; T<strong>SQL</strong> </li>
</ul>
</td>
<td valign="top" width="338">
<p class="MsoNormal"><span style="font-family:&quot;color:blue;font-size:10pt;">USE</span><span style="font-family:&quot;font-size:10pt;"> [msdb] </span>
</p>
</p>
<p class="MsoNormal"><span style="font-family:&quot;color:blue;font-size:10pt;">CREATE</span><span style="font-family:&quot;font-size:10pt;"> <span style="color:fuchsia;">USER</span> [<font color="#008000">&lt;Username&gt;</font>] <span style="color:blue;">FOR</span> </span>
</p>
</p>
<p class="MsoNormal"><span style="font-family:&quot;color:blue;font-size:10pt;">LOGIN</span><span style="font-family:&quot;font-size:10pt;"> [<font color="#008000">&lt;Domain Name&gt;\&lt;Username&gt;</font>] <span style="color:blue;">WITH</span> </span>
</p>
</p>
<p class="MsoNormal"><span style="font-family:&quot;color:blue;font-size:10pt;">DEFAULT_SCHEMA</span><span style="font-family:&quot;color:gray;font-size:10pt;">=</span><span style="font-family:&quot;font-size:10pt;">[dbo] </span>
</p>
</p>
<p class="MsoNormal"><span style="font-family:&quot;font-size:10pt;"><span style="color:blue;">ALTER</span> <span style="color:blue;">AUTHORIZATION</span> </span>
</p>
</p>
<p class="MsoNormal"><span style="font-family:&quot;font-size:10pt;"><span style="color:blue;">ON</span> <span style="color:blue;">SCHEMA</span><span style="color:gray;">::</span>[db_dtsltduser] <span style="color:blue;">TO</span> [<font color="#008000">&lt;Username&gt;</font>] </span>
</p>
</p>
</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<h5>Add the package to SQL Server Agent </h5>
<table border="0" cellspacing="0" cellpadding="2" width="600">
<tbody>
<tr>
<td valign="top" width="300"><a href="http://togrady.files.wordpress.com/2010/05/image9.png"><img style="display:inline;border-width:0;margin:10px 0 0;" title="image" border="0" alt="image" src="http://togrady.files.wordpress.com/2010/05/image_thumb9.png?w=244&#038;h=197" width="244" height="197" /></a> </td>
<td valign="top" width="300">
<ol>
<li>In SSMS browse to SQL Server Agent &gt; Jobs &gt; New Job </li>
<li>Give the job a name </li>
<li>Add a step to the job </li>
<li>Give the step a name </li>
<li>Under <strong>Run as </strong>choose the name of the Proxy account created above </li>
<li>Enter the name of the SQL Server where the package is stored </li>
<li>Browse and Select the package </li>
<li>Save the step and enter a schedule for the package </li>
</ol>
</td>
</tr>
<tr>
<td valign="top" width="300">&#160;</td>
<td valign="top" width="300">&#160;</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>To do a comparison between the old CSV and the new CSV file I ran the job I created above when the files were generated I imported them back into SQL Server tables, I also generated the files using the old DTS package but against the same data set, I imported this into a separate set of tables. I then compared the data in both tables using the TSQL except statement to compare the two tables</p>
<p class="MsoNormal"><span style="font-family:&quot;color:blue;font-size:10pt;">SELECT</span><span style="font-family:&quot;font-size:10pt;"> <span style="color:gray;">*</span><span>&#160;&#160; </span><span style="color:blue;">FROM</span> <font color="#008000"><span style="color:gray;">&lt;</span>table1<span style="color:gray;">&gt; </span>
</p>
<p>     </font></span></p>
</p>
<p class="MsoNormal"><span style="font-family:&quot;color:blue;font-size:10pt;">except</span><span style="font-family:&quot;font-size:10pt;"> </span>
</p>
</p>
<p class="MsoNormal"><span style="font-family:&quot;color:blue;font-size:10pt;">SELECT</span><span style="font-family:&quot;font-size:10pt;"> <span style="color:gray;">*</span><span>&#160;&#160; </span><span style="color:blue;">FROM</span> <font color="#008000"><span style="color:gray;">&lt;</span>table2<span style="color:gray;">&gt;</span></font></span></p>
<p>&#160;</p>
<p>As part of doing some research for this, I found the following articles useful</p>
<ul>
<li><a title="http://www.sqlservercentral.com/articles/SQL+Server+2005+-+SSIS/upgradingsqlserver2000dtspackagestossis/2201/" href="http://www.sqlservercentral.com/articles/SQL+Server+2005+-+SSIS/upgradingsqlserver2000dtspackagestossis/2201/">http://www.sqlservercentral.com/articles/SQL+Server+2005+-+SSIS/upgradingsqlserver2000dtspackagestossis/2201/</a> </li>
<li><a title="http://blogs.msdn.com/psssql/archive/2009/02/19/how-to-copy-dts-2000-packages-between-servers-and-from-sql-2000-to-sql-2005-and-sql-2008.aspx" href="http://blogs.msdn.com/psssql/archive/2009/02/19/how-to-copy-dts-2000-packages-between-servers-and-from-sql-2000-to-sql-2005-and-sql-2008.aspx">http://blogs.msdn.com/psssql/archive/2009/02/19/how-to-copy-dts-2000-packages-between-servers-and-from-sql-2000-to-sql-2005-and-sql-2008.aspx</a> </li>
<li><a title="http://msdn.microsoft.com/en-us/library/aa337083.aspx" href="http://msdn.microsoft.com/en-us/library/aa337083.aspx">http://msdn.microsoft.com/en-us/library/aa337083.aspx</a> </li>
<li><a title="http://mohansmindstorms.spaces.live.com/Blog/cns!69AE1BEA50F1D0E7!213.entry" href="http://mohansmindstorms.spaces.live.com/Blog/cns!69AE1BEA50F1D0E7!213.entry">http://mohansmindstorms.spaces.live.com/Blog/cns!69AE1BEA50F1D0E7!213.entry</a> </li>
<li><a title="http://www.sqlservercentral.com/Forums/Topic560372-391-1.aspx" href="http://www.sqlservercentral.com/Forums/Topic560372-391-1.aspx">http://www.sqlservercentral.com/Forums/Topic560372-391-1.aspx</a> </li>
<li><a title="http://dougbert.com/blogs/dougbert/archive/2009/04/09/ssis-and-clustering-what-you-should-do-instead.aspx" href="http://dougbert.com/blogs/dougbert/archive/2009/04/09/ssis-and-clustering-what-you-should-do-instead.aspx">http://dougbert.com/blogs/dougbert/archive/2009/04/09/ssis-and-clustering-what-you-should-do-instead.aspx</a> </li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/togrady.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/togrady.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/togrady.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/togrady.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/togrady.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/togrady.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/togrady.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/togrady.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/togrady.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/togrady.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/togrady.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/togrady.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/togrady.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/togrady.wordpress.com/134/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=togrady.wordpress.com&amp;blog=4825359&amp;post=134&amp;subd=togrady&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://togrady.wordpress.com/2010/05/11/migrating-a-simple-dts-package-to-integration-services-to-run-on-a-sql-server-cluster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0cf64726cc495f45c6e760a17556b864?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">togrady</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2010/05/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2010/05/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2010/05/image_thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2010/05/image_thumb5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2010/05/image_thumb6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2010/05/image_thumb7.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2010/05/image_thumb8.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2010/05/image_thumb9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Moving SQL Server user accounts</title>
		<link>http://togrady.wordpress.com/2010/05/06/move-sql-users-between-servers/</link>
		<comments>http://togrady.wordpress.com/2010/05/06/move-sql-users-between-servers/#comments</comments>
		<pubDate>Thu, 06 May 2010 14:15:42 +0000</pubDate>
		<dc:creator>togrady</dc:creator>
				<category><![CDATA[SQL Server Admin]]></category>
		<category><![CDATA[SQL Server Integration Services]]></category>

		<guid isPermaLink="false">https://togrady.wordpress.com/2010/05/06/move-sql-users-between-servers/</guid>
		<description><![CDATA[A number of databases currently&#160; running on SQL Server 2000 are been upgraded to a new 2005 installation, this also requires moving the existing logins. Several options are available to achieve this but I found the method below to be the most straightforward. Firstly make a backup of the existing database and restore it on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=togrady.wordpress.com&amp;blog=4825359&amp;post=125&amp;subd=togrady&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A number of databases currently&#160; running on SQL Server 2000 are been upgraded to a new 2005 installation, this also requires moving the existing logins. Several options are available to achieve this but I found the method below to be the most straightforward.</p>
<p>Firstly make a backup of the existing database and restore it on the destination Server.</p>
<p>Next create a project in Integration Services (IS) and use the ‘transfer logins task’ to move the logins, to complete this the following properties need populating :</p>
<p><a href="http://togrady.files.wordpress.com/2010/05/image.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://togrady.files.wordpress.com/2010/05/image_thumb.png?w=244&#038;h=133" width="244" height="133" /></a><a href="http://togrady.files.wordpress.com/2010/05/image1.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://togrady.files.wordpress.com/2010/05/image_thumb1.png?w=244&#038;h=144" width="244" height="144" /></a> </p>
<p>&#160;</p>
<ol>
<li>Setup source connection </li>
<li>Setup destination connection </li>
<li>for LoginsToTransfer Specify <strong>SelectedLogins</strong> </li>
<li>Choose the logins to move </li>
<li>Save and Execute the task </li>
</ol>
<p>Ensure&#160; all the logins on the source server&#160; have all their attributes populated. When I initially ran the the IS package I got the error message “This property may not exist for this object, or may not be retrievable due to insufficient access rights” I traced the cause to&#160;&#160; not having a default database associated with the login, this error message appeared for all logins that were missing the attribute, even if they weren&#8217;t been moved.</p>
<p>Once the IS task completes successfully;</p>
<p>On the destination server, for each of the SQL Server logins Execute the following TSQL code. I did not have to do this for the NT logins.</p>
<p>USE <font color="#008000">&lt;Database Name&gt;</font>     <br />GO     <br />EXEC sp_change_users_login &#8216;UPDATE_ONE&#8217;, &#8216;<font color="#008000">&lt;username&gt;</font>&#8216;, &#8216;<font color="#008000">&lt;login name&gt;</font>&#8216;     <br />GO</p>
<p>&#160;</p>
<p>References</p>
<p><a title="http://sqlblog.com/blogs/eric_johnson/archive/2008/10/17/fixing-orphaned-users.aspx" href="http://sqlblog.com/blogs/eric_johnson/archive/2008/10/17/fixing-orphaned-users.aspx">http://sqlblog.com/blogs/eric_johnson/archive/2008/10/17/fixing-orphaned-users.aspx</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/togrady.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/togrady.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/togrady.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/togrady.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/togrady.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/togrady.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/togrady.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/togrady.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/togrady.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/togrady.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/togrady.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/togrady.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/togrady.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/togrady.wordpress.com/125/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=togrady.wordpress.com&amp;blog=4825359&amp;post=125&amp;subd=togrady&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://togrady.wordpress.com/2010/05/06/move-sql-users-between-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0cf64726cc495f45c6e760a17556b864?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">togrady</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2010/05/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://togrady.files.wordpress.com/2010/05/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
	</channel>
</rss>
