<?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>Paulo&#039;s SQL SERVER Weblog</title>
	<atom:link href="http://netic.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://netic.wordpress.com</link>
	<description>Just another module from my kernel…</description>
	<lastBuildDate>Fri, 29 Jul 2011 13:32:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='netic.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Paulo&#039;s SQL SERVER Weblog</title>
		<link>http://netic.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://netic.wordpress.com/osd.xml" title="Paulo&#039;s SQL SERVER Weblog" />
	<atom:link rel='hub' href='http://netic.wordpress.com/?pushpress=hub'/>
		<item>
		<title>I had to post this ! Met Kalen Delaney in SQL PORT EVENT :)</title>
		<link>http://netic.wordpress.com/2011/07/29/i-had-to-post-this-met-kalen-delaney-in-sql-port-event/</link>
		<comments>http://netic.wordpress.com/2011/07/29/i-had-to-post-this-met-kalen-delaney-in-sql-port-event/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 13:32:46 +0000</pubDate>
		<dc:creator>Paulo Condeça</dc:creator>
				<category><![CDATA[sqlserver]]></category>

		<guid isPermaLink="false">http://netic.wordpress.com/?p=94</guid>
		<description><![CDATA[Kalen Delaney with Paulo Condeça on SQL PORT Meeting. More information about Kalen Delaney @ AboutKalenDelaney .<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netic.wordpress.com&amp;blog=1762839&amp;post=94&amp;subd=netic&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="mceTemp mceIEcenter" style="text-align:right;">
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><a href="http://netic.files.wordpress.com/2011/07/oldphotopro.jpg"><img class="size-medium wp-image-95  " title="Kalen Delaney with Paulo Condeça on SQL PORT Meeting." src="http://netic.files.wordpress.com/2011/07/oldphotopro.jpg?w=300&#038;h=224" alt="" width="300" height="224" /></a></dt>
<dd class="wp-caption-dd">Kalen Delaney with Paulo Condeça on SQL PORT Meeting.</dd>
</dl>
</div>
<p>More information about Kalen Delaney @ <a href="http://www.sqlserverinternals.com/about.html" target="_blank">AboutKalenDelaney</a> .</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netic.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netic.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netic.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netic.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/netic.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/netic.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/netic.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/netic.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netic.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netic.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netic.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netic.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netic.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netic.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netic.wordpress.com&amp;blog=1762839&amp;post=94&amp;subd=netic&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://netic.wordpress.com/2011/07/29/i-had-to-post-this-met-kalen-delaney-in-sql-port-event/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a02d019603fa7ac617f49043696f2fce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Netic</media:title>
		</media:content>

		<media:content url="http://netic.files.wordpress.com/2011/07/oldphotopro.jpg?w=300" medium="image">
			<media:title type="html">Kalen Delaney with Paulo Condeça on SQL PORT Meeting.</media:title>
		</media:content>
	</item>
		<item>
		<title>Disable Lock Escalation in SQL SERVER 2008 or Higher</title>
		<link>http://netic.wordpress.com/2011/04/18/disable-lock-escalation-in-sql-server-2008-or-higher/</link>
		<comments>http://netic.wordpress.com/2011/04/18/disable-lock-escalation-in-sql-server-2008-or-higher/#comments</comments>
		<pubDate>Mon, 18 Apr 2011 16:47:31 +0000</pubDate>
		<dc:creator>Paulo Condeça</dc:creator>
				<category><![CDATA[sqlserver]]></category>
		<category><![CDATA[bottleneck]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[tuning]]></category>

		<guid isPermaLink="false">http://netic.wordpress.com/?p=79</guid>
		<description><![CDATA[For who don&#8217;t know, it is know possible to remove Lock Escalation, and this is something that be &#8220;granularly&#8221; done to a table on SQL SERVER 2008 or Higher without the need to use Trace Flags. Sample sintax ALTER TABLE table_name_goes_gere SET (LOCK_ESCALATION=DISABLE) . &#8211; PT &#8211; Para quem não sabe, já é possível remover [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netic.wordpress.com&amp;blog=1762839&amp;post=79&amp;subd=netic&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For who don&#8217;t know, it is know possible to remove Lock Escalation, and this is something that be &#8220;granularly&#8221; done to a table on SQL SERVER 2008 or Higher without the need to use Trace Flags.</p>
<p>Sample sintax ALTER TABLE table_name_goes_gere SET (LOCK_ESCALATION=DISABLE) .</p>
<p>&#8211; PT &#8211;</p>
<p>Para quem não sabe, já é possível remover &#8220;Lock Escalation&#8221;, de uma forma mais &#8220;granular&#8221; em uma tabela no SQL SERVER 2008 ou superior, sem ser preciso usar Trace Flags.</p>
<p>Exemplo de sintaxe: ALTER TABLE table_name_goes_gere SET (LOCK_ESCALATION = DISABLE).</p>
<p>Find bellow the Lock Escalation Thresholds ( from Books on line ).</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Lock escalation is triggered when lock escalation is not disabled on the table by using the ALTER TABLE SET LOCK_ESCALATION option, and when either of the following conditions exists:</p>
<p>A single Transact-SQL statement acquires at least 5,000 locks on a single nonpartitioned table or index.</p>
<p>A single Transact-SQL statement acquires at least 5,000 locks on a single partition of a partitioned table and the ALTER TABLE SET LOCK_ESCALATION option is set to AUTO.</p>
<p>The number of locks in an instance of the Database Engine exceeds memory or configuration thresholds.</p>
<p>If locks cannot be escalated because of lock conflicts, the Database Engine periodically triggers lock escalation at every 1,250 new locks acquired.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netic.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netic.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netic.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netic.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/netic.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/netic.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/netic.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/netic.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netic.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netic.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netic.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netic.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netic.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netic.wordpress.com/79/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netic.wordpress.com&amp;blog=1762839&amp;post=79&amp;subd=netic&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://netic.wordpress.com/2011/04/18/disable-lock-escalation-in-sql-server-2008-or-higher/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a02d019603fa7ac617f49043696f2fce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Netic</media:title>
		</media:content>
	</item>
		<item>
		<title>Run SSIS Packages in SQL SERVER 2005 x64 with Jet4 OleDB connections (eg:excel)</title>
		<link>http://netic.wordpress.com/2011/04/08/run-ssis-packages-in-sql-server-2005-x64-with-jet4-oledb-connections-egexcel/</link>
		<comments>http://netic.wordpress.com/2011/04/08/run-ssis-packages-in-sql-server-2005-x64-with-jet4-oledb-connections-egexcel/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 16:06:01 +0000</pubDate>
		<dc:creator>Paulo Condeça</dc:creator>
				<category><![CDATA[sqlserver]]></category>
		<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://netic.wordpress.com/?p=73</guid>
		<description><![CDATA[To sum up, I had to solve a situation in a client that wasn&#8217;t able to run a couple of SSIS package with SQLSERVER AGENT but they were running ok in BIDS. Since SQL SERVER was running on a x64 environment, and the SSIS package was connecting to a excel files ( JET 4 OleDB [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netic.wordpress.com&amp;blog=1762839&amp;post=73&amp;subd=netic&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To sum up,<br />
I had to solve a situation in a client that wasn&#8217;t able to run a couple of SSIS package with SQLSERVER AGENT but they were running ok in BIDS.</p>
<p>Since SQL SERVER was running on a x64 environment, and the SSIS package was connecting to a excel files ( JET 4 OleDB ), it was throwing the following error :</p>
<p>DestinationConnectionExcel&#8221; Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0&#215;80040154. An OLE DB record is available. Source: &#8220;Microsoft OLE DB Service Components&#8221; Hresult: 0&#215;80040154 Description: &#8220;Class not registered&#8221;. End Error Error: 2011-01-04 12:38:36.75 Code: 0xC00291EC Source: Preparation SQL Task Execute SQL Task Description: Failed to acquire connection &#8220;DestinationConnectionExcel&#8221;. Connection may not be configured correctly or you may not have the right permissions on this connection. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 12:38:35 Finished: 12:38:36 Elapsed: 0.765 seconds. The package execution failed. The step failed.</p>
<p>To solve, just create a simple process to call DTEXEC @ x86 DTS bin.</p>
<p>I had to make some “special t-sql” to be able to run the SSIS packages because there are no JET drivers for x64 ( connect to excel ). I’m sharing this with you,</p>
<div><code><br />
-- Since this there is no Jet Driver for x64, processes must be run using x86 DTEXEC</code></div>
<p><code>DECLARE @dtexec_path nvarchar(100)</p>
<p>DECLARE @params nvarchar(150)</p>
<p>DECLARE @ssis_package varchar(100)</p>
<p>DECLARE @stmt nvarchar(350)</p>
<p>SET @dtexec_path='D:\mssql\sql2k5\"tools (x86)"\90\DTS\Binn\dtexec /SQL "\'</p>
<p>SET @params ='" /SERVER "DbInstanceName" /DECRYPT PasswordGoesHere /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING E'</p>
<p>CREATE TABLE #report_to_execute ( report_path varchar(100) )</p>
<p>INSERT INTO #report_to_execute (report_path)</p>
<p>SELECT 'SSIS_PACKAGE_1' UNION ALL SELECT 'SSIS_PACKAGE_2' UNION ALL SELECT 'SSIS_PACKAGE_3'</p>
<p>DECLARE report_cursor CURSOR</p>
<p>FOR select report_path from #report_to_execute</p>
<p>OPEN report_cursor</p>
<p>FETCH NEXT FROM report_cursor into @ssis_package</p>
<p>WHILE @@fetch_status=0</p>
<p>BEGIN</p>
<p>SET @stmt = @dtexec_path + + @ssis_package + @params</p>
<p>EXEC xp_cmdshell @stmt</p>
<p>FETCH NEXT FROM report_cursor into @ssis_package</p>
<p>END</p>
<p>CLOSE report_cursor</p>
<p>DEALLOCATE report_cursor</p>
<p></code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netic.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netic.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netic.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netic.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/netic.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/netic.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/netic.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/netic.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netic.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netic.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netic.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netic.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netic.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netic.wordpress.com/73/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netic.wordpress.com&amp;blog=1762839&amp;post=73&amp;subd=netic&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://netic.wordpress.com/2011/04/08/run-ssis-packages-in-sql-server-2005-x64-with-jet4-oledb-connections-egexcel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a02d019603fa7ac617f49043696f2fce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Netic</media:title>
		</media:content>
	</item>
		<item>
		<title>Negative spid in SQL SERVER.</title>
		<link>http://netic.wordpress.com/2010/03/26/negative-spid-in-sql-server/</link>
		<comments>http://netic.wordpress.com/2010/03/26/negative-spid-in-sql-server/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 10:30:25 +0000</pubDate>
		<dc:creator>Paulo Condeça</dc:creator>
				<category><![CDATA[sqlserver]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[utilities]]></category>

		<guid isPermaLink="false">http://netic.wordpress.com/?p=53</guid>
		<description><![CDATA[When you have a negative spid ( ex: -2) in SQL SERVER, it is related with Microsoft Distributed Transaction Coordinator (MSDTC). You can do it from 2 different ways: Outside SQL SERVER, in component services &#62; DTC &#62; Transactions &#62; rollback the transaction. OR select distinct req_transactionUOW from syslockinfo , ignore the 000000&#8242;s kill &#8216;GUID&#8217; . ( ghost/orphaned transaction [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netic.wordpress.com&amp;blog=1762839&amp;post=53&amp;subd=netic&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">When you have a negative <em>spid</em> ( ex: -2) in SQL SERVER, it is related with Microsoft Distributed Transaction Coordinator (MSDTC).</p>
<p style="text-align:justify;">You can do it from 2 different ways:</p>
<p style="text-align:justify;">Outside SQL SERVER, in component services &gt; DTC &gt; Transactions &gt; rollback the transaction.</p>
<p style="text-align:justify;">OR</p>
<p style="text-align:justify;">select distinct req_transactionUOW from syslockinfo , ignore the 000000&#8242;s</p>
<p style="text-align:justify;">kill &#8216;GUID&#8217; <em>. ( ghost/orphaned transaction ).</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netic.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netic.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netic.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netic.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/netic.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/netic.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/netic.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/netic.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netic.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netic.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netic.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netic.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netic.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netic.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netic.wordpress.com&amp;blog=1762839&amp;post=53&amp;subd=netic&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://netic.wordpress.com/2010/03/26/negative-spid-in-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a02d019603fa7ac617f49043696f2fce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Netic</media:title>
		</media:content>
	</item>
		<item>
		<title>MICROSOFT SQL SERVER PERFORMANCE TUNNING</title>
		<link>http://netic.wordpress.com/2010/02/17/microsoft-sql-server-performance-tunning/</link>
		<comments>http://netic.wordpress.com/2010/02/17/microsoft-sql-server-performance-tunning/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 17:23:50 +0000</pubDate>
		<dc:creator>Paulo Condeça</dc:creator>
				<category><![CDATA[sqlserver]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[tuning]]></category>

		<guid isPermaLink="false">http://netic.wordpress.com/?p=46</guid>
		<description><![CDATA[I&#8217;m writing this article to help everyone who whats &#8220;more juice&#8221; from a MS SQL SERVER INFRASTRUCTURE . Instead of writing lots of articles i will update this post every week. I will mix lots of concepts in this post, ranging from Physical Infrastructure/ Operating System/ SQL SERVER PARAMETERS / T-SQL . I will write a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netic.wordpress.com&amp;blog=1762839&amp;post=46&amp;subd=netic&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I&#8217;m writing this article to help everyone who whats &#8220;more juice&#8221; from a MS SQL SERVER INFRASTRUCTURE .</p>
<p style="text-align:justify;">Instead of writing lots of articles i will update this post every week. I will mix lots of concepts in this post, ranging from Physical Infrastructure/ Operating System/ SQL SERVER PARAMETERS / T-SQL .</p>
<p style="text-align:justify;">I will write a more detailed article related with SQL SERVER PERFORMANCE TUNING, but for now, i will just suggest the following tips for a better SQL SERVER ARCHITECTURE /  :</p>
<ul style="text-align:justify;">
<li><strong>CPU</strong>
<ul>
<li><strong>DISABLE HYPERTHREADING </strong>- This will give better performance during high workloads, you can read this great article from Slava Oks&#8217;s ( <a href="http://blogs.msdn.com/slavao/archive/2005/11/12/492119.aspx">http://blogs.msdn.com/slavao/archive/2005/11/12/492119.aspx</a> ).</li>
</ul>
</li>
</ul>
<ul style="text-align:justify;">
<li><strong>WINDOWS</strong>
<ul>
<li>Configure the <strong>NIC </strong>(Network Interface Card) for &#8220;<strong>MAXIMIZE DATA THROUGHPUT FOR NETWORK APPLICATIONS</strong>&#8221;  instead of &#8220;<strong>MAXIMIZE DATA <strong>THROUGHPUT FOR FILESHARING</strong><span style="font-weight:normal;">&#8220;, this will give an overall boost of </span>10-20 %<span style="font-weight:normal;"> . </span></strong></li>
<li><strong><span style="font-weight:normal;"><strong><span style="font-weight:normal;">Don&#8217;t forget that windows server is configured as a file-server out-of-the-box !</span></strong></span></strong></li>
<li><strong><span style="font-weight:normal;"><strong><span style="font-weight:normal;">Configure Windows Server to favor </span><em>BACKGROUND SERVICES </em><span style="font-weight:normal;">and </span>PROGRAMS !</strong></span></strong></li>
</ul>
</li>
</ul>
<ul style="text-align:justify;">
<li><strong>STORAGE INFRASTRUCTURE</strong>
<ul>
<li>Use <strong>different volumes</strong> for <strong>SYSTEM </strong>&amp; <strong>PAGEFILE (KEEP A FIXED SIZE FOR SWAP)</strong>.</li>
<li><strong>Avoid RAID-5</strong> ,  use and abuse from<strong> RAID-10</strong>, I understand that this is impossible mos of the timesw, because of the costs that are related with this type of configuration, performance has a price, and this one is quite expensive.</li>
<li>Change the registry key <strong>HKLM\CurrentControlSet\ Control\FileSystem\ContigFileAllocSize</strong> to <strong>64</strong>, this will ajust the minimum contiguous file allocation to<strong> 64KB</strong>.</li>
<li><strong>USE MULTIPLE LUNs / FILEGROUPS / DATAFILES.</strong></li>
<li><strong>USE DISKPAR </strong>to align LUN partition with the underlying disk clusters.</li>
<li><strong>ENABLE MPIO &#8211; Multi-Path IO .</strong></li>
<li><strong>FORMAT the DATA Drives with NTFS 64kb block size (</strong> SQL Server pages are 8192 bytes, so the default NTFS block size (4096) reads only ½ a page and effectively doubles the number of I/O operations. Also consider formatting the DATA drives in 64KB blocks, since SQL Server commonly does an eight page read-ahead to improve performance<strong>)</strong></li>
<li><strong>FORMAT LOG Drives with default block size ( 4kb ).</strong></li>
</ul>
</li>
</ul>
<ul style="text-align:justify;">
<li><strong>ANTIVIRUS</strong>
<ul>
<li>Make sure the antivirus doesn&#8217;t scan SQL SERVER related processes and *mdf/*ldf/*ndf*/*mdb .</li>
</ul>
</li>
</ul>
<ul>
<li style="text-align:justify;"><strong>SQL SERVER PARAMETERS</strong>
<ul>
<li><strong>Pre-Allocate memory for SQL SERVER .</strong></li>
<li>Consider changing the <strong>lock table</strong> for more than <strong>5000 minimum locks</strong> ( default ) if the application makes many lock requests, this is particularly true in<strong> Biztalk Environments</strong> . A simple way to achieve this magic number, is to monitor the<strong> lock requests / second</strong> and give more 15 % than the maximum value observed .</li>
<li>Optimize <strong>TEMPDB, create one datafile for each processor core and put it on a separate LUNs. </strong></li>
<li><strong>Consider reducing MAXDOP ( MAX DEGREE OF PARALLELISM ) i</strong>f you having lots of<strong> CX-PACKET WAITS.</strong></li>
</ul>
<div><strong><br />
</strong></div>
</li>
<li><strong>SQL SERVER PARTITIONING</strong>
<ul>
<li style="text-align:justify;">This is a great feature available only in Enterprise Edition and is a great for <em>VLBD</em>, you can read an article that i wrote for sql-server-performance.com ( <a href="http://www.sql-server-performance.com/articles/reporting/Data_Warehouse_Partition_Strategies_p1.aspx">http://www.sql-server-performance.com/articles/reporting/Data_Warehouse_Partition_Strategies_p1.aspx</a> ), there is also a portuguese version of it in http://netic.wordpress.com/2008/05/05/microsoft-sql-server-2005-partitioning/ .</li>
</ul>
</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netic.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netic.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netic.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netic.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/netic.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/netic.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/netic.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/netic.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netic.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netic.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netic.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netic.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netic.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netic.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netic.wordpress.com&amp;blog=1762839&amp;post=46&amp;subd=netic&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://netic.wordpress.com/2010/02/17/microsoft-sql-server-performance-tunning/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a02d019603fa7ac617f49043696f2fce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Netic</media:title>
		</media:content>
	</item>
		<item>
		<title>Linux find command</title>
		<link>http://netic.wordpress.com/2010/02/12/linux-find-command/</link>
		<comments>http://netic.wordpress.com/2010/02/12/linux-find-command/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 10:56:41 +0000</pubDate>
		<dc:creator>Paulo Condeça</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[commands]]></category>

		<guid isPermaLink="false">http://netic.wordpress.com/?p=40</guid>
		<description><![CDATA[Linux command to find files / directories . find . -name "WhatYouWant" -print<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netic.wordpress.com&amp;blog=1762839&amp;post=40&amp;subd=netic&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Linux command to find files / directories .</p>
<p><kbd>find . -name "WhatYouWant" -print </kbd></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netic.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netic.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netic.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netic.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/netic.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/netic.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/netic.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/netic.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netic.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netic.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netic.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netic.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netic.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netic.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netic.wordpress.com&amp;blog=1762839&amp;post=40&amp;subd=netic&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://netic.wordpress.com/2010/02/12/linux-find-command/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a02d019603fa7ac617f49043696f2fce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Netic</media:title>
		</media:content>
	</item>
		<item>
		<title>SSMS (SQL SERVER MANAGEMENT STUDIO) slow startup &#8211; solved</title>
		<link>http://netic.wordpress.com/2009/10/28/ssms-sql-server-management-studio-slow-startup-solved/</link>
		<comments>http://netic.wordpress.com/2009/10/28/ssms-sql-server-management-studio-slow-startup-solved/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 17:06:12 +0000</pubDate>
		<dc:creator>Paulo Condeça</dc:creator>
				<category><![CDATA[sqlserver]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[ssms]]></category>

		<guid isPermaLink="false">http://netic.wordpress.com/?p=28</guid>
		<description><![CDATA[SSMS (SQL SERVER MANAGEMENT STUDIO) slow startup and how to optimize SSMS startup time : To sump up, everytime you open SSMS it will check some certs, so, do the following if you want faster load times : Open IE &#62; TOOLS &#62; OPTIONS &#62; ADVANCED &#62; UNCHECK PUBLISHER CERTIFICATE REVOCATION .<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netic.wordpress.com&amp;blog=1762839&amp;post=28&amp;subd=netic&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>SSMS (SQL SERVER MANAGEMENT STUDIO) slow startup and how to optimize SSMS startup time :<br />
To sump up, everytime you open SSMS it will check some certs, so, do the following if you want faster load times :</p>
<p>Open IE &gt; TOOLS &gt; OPTIONS &gt; ADVANCED &gt; UNCHECK PUBLISHER CERTIFICATE REVOCATION .</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netic.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netic.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netic.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netic.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/netic.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/netic.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/netic.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/netic.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netic.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netic.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netic.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netic.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netic.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netic.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netic.wordpress.com&amp;blog=1762839&amp;post=28&amp;subd=netic&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://netic.wordpress.com/2009/10/28/ssms-sql-server-management-studio-slow-startup-solved/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a02d019603fa7ac617f49043696f2fce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Netic</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple command to get Linux disk usage by dir</title>
		<link>http://netic.wordpress.com/2009/10/28/simple-command-to-get-linux-disk-usage-by-dir/</link>
		<comments>http://netic.wordpress.com/2009/10/28/simple-command-to-get-linux-disk-usage-by-dir/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 13:19:18 +0000</pubDate>
		<dc:creator>Paulo Condeça</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[utilities]]></category>

		<guid isPermaLink="false">http://netic.wordpress.com/2009/10/28/simple-command-to-get-linux-disk-usage-by-dir/</guid>
		<description><![CDATA[This is a simple and practical command to get disk usage by dir in Linux -&#62; du -sh *<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netic.wordpress.com&amp;blog=1762839&amp;post=26&amp;subd=netic&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a simple and practical command to get disk usage by dir in Linux -&gt; <code>du -sh *</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netic.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netic.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netic.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netic.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/netic.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/netic.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/netic.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/netic.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netic.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netic.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netic.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netic.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netic.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netic.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netic.wordpress.com&amp;blog=1762839&amp;post=26&amp;subd=netic&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://netic.wordpress.com/2009/10/28/simple-command-to-get-linux-disk-usage-by-dir/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a02d019603fa7ac617f49043696f2fce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Netic</media:title>
		</media:content>
	</item>
		<item>
		<title>Analyzing SQL SERVER 2005 LONG RUNNING QUERIES</title>
		<link>http://netic.wordpress.com/2008/08/11/analyzing-sql-server-2005-long-running-queries/</link>
		<comments>http://netic.wordpress.com/2008/08/11/analyzing-sql-server-2005-long-running-queries/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 13:58:08 +0000</pubDate>
		<dc:creator>Paulo Condeça</dc:creator>
				<category><![CDATA[sqlserver]]></category>
		<category><![CDATA[bottleneck]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[tuning]]></category>

		<guid isPermaLink="false">http://netic.wordpress.com/?p=10</guid>
		<description><![CDATA[I&#8217;m leaving this tip for you to find what exactly is running on sql server. SELECT r.session_id, s.HOST_NAME, s.PROGRAM_NAME, s.host_process_id, r.status, r.wait_time, wait_type, r.wait_resource, SUBSTRING(qt.text,(r.statement_start_offset/2) +1, (CASE WHEN r.statement_end_offset = -1 THEN LEN(CONVERT(nvarchar(max), qt.text)) * 2 ELSE r.statement_end_offset END -r.statement_start_offset)/2) AS stmt_executing,r.blocking_session_id, r.cpu_time,r.total_elapsed_time,r.reads,r.writes, r.logical_reads, r.plan_handle FROM sys.dm_exec_requests r CROSS APPLY sys.dm_exec_sql_text(sql_handle) as qt, sys.dm_exec_sessions s [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netic.wordpress.com&amp;blog=1762839&amp;post=10&amp;subd=netic&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m leaving this tip for you to find what exactly is running on sql server.</p>
<p>SELECT r.session_id, s.HOST_NAME, s.PROGRAM_NAME,<br />
s.host_process_id, r.status, r.wait_time,<br />
wait_type, r.wait_resource,<br />
SUBSTRING(qt.text,(r.statement_start_offset/2) +1,<br />
(CASE WHEN r.statement_end_offset = -1</p>
<p>THEN LEN(CONVERT(nvarchar(max), qt.text)) * 2</p>
<p>ELSE r.statement_end_offset</p>
<p>END -r.statement_start_offset)/2)</p>
<p>AS stmt_executing,r.blocking_session_id,<br />
r.cpu_time,r.total_elapsed_time,r.reads,r.writes,<br />
r.logical_reads, r.plan_handle</p>
<p>FROM sys.dm_exec_requests r</p>
<p>CROSS APPLY sys.dm_exec_sql_text(sql_handle) as qt, sys.dm_exec_sessions s</p>
<p>WHERE r.session_id &gt; 50 and r.session_id=s.session_id<br />
ORDER BY r.session_id, s.host_name, s.program_name, r.status</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/netic.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/netic.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netic.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netic.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netic.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netic.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/netic.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/netic.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/netic.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/netic.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netic.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netic.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netic.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netic.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netic.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netic.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netic.wordpress.com&amp;blog=1762839&amp;post=10&amp;subd=netic&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://netic.wordpress.com/2008/08/11/analyzing-sql-server-2005-long-running-queries/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a02d019603fa7ac617f49043696f2fce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Netic</media:title>
		</media:content>
	</item>
		<item>
		<title>MICROSOFT SQL SERVER 2005 Partitioning (English Version)</title>
		<link>http://netic.wordpress.com/2008/08/11/microsoft-sql-server-2005-partitioning-english-version/</link>
		<comments>http://netic.wordpress.com/2008/08/11/microsoft-sql-server-2005-partitioning-english-version/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 13:52:59 +0000</pubDate>
		<dc:creator>Paulo Condeça</dc:creator>
				<category><![CDATA[sqlserver]]></category>
		<category><![CDATA[datawarehouse]]></category>
		<category><![CDATA[partitioning]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[tuning]]></category>

		<guid isPermaLink="false">http://netic.wordpress.com/?p=8</guid>
		<description><![CDATA[SQL SERVER 2005 Partitioning &#60;- Can read a fully formated .doc in here . Microsoft worked well in the Microsoft SQL Server 2005 (even better in MSSQL Server 2008), bringing a shine to their RDBMS engine and building it to be a real Enterprise Class Product. I’m not going to write about all the new features [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netic.wordpress.com&amp;blog=1762839&amp;post=8&amp;subd=netic&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="result_box" dir="ltr"><a href="http://netic.files.wordpress.com/2008/08/techwriting1-sqlserver2005partitioning.doc">SQL SERVER 2005 Partitioning</a> &lt;- Can read a fully formated .doc in here .</div>
<div dir="ltr">
<div>
<p><span style="font-size:x-small;font-family:Verdana;">Microsoft worked well in the Microsoft SQL Server 2005 (even better in MSSQL Server 2008), bringing a shine to their RDBMS engine and building it to be a real Enterprise Class Product.</span></p>
<p><span style="font-size:x-small;font-family:Verdana;">I’m not going to write about all the new features of the OLTP Engine, I will focus this article on Database Partition, giving you a real case scenario.</span></p>
<p><span style="font-size:x-small;color:#3366ff;font-family:Verdana;">I. Benefits and Limitations of Partitioning (HEAPS/CLUSTERED/NONCLUSTERED). </span></p>
<p><span style="font-size:x-small;color:#3366ff;font-family:Verdana;">II. Implementation Methodology. </span><span style="font-size:x-small;font-family:Verdana;"> <br />
 <br />
</span><span style="font-size:x-small;color:#3366ff;font-family:Verdana;">III. Partitioning Management.</span><span style="font-size:x-small;font-family:Verdana;">  <br />
</span></p>
<p><span style="font-size:x-small;font-family:Verdana;"> <br />
</span><span style="font-size:x-small;color:#3366ff;font-family:Verdana;">I. Benefits and Limitations of Partitioning (HEAPS/CLUSTERED/NONCLUSTERED):</span><span style="font-size:x-small;font-family:Verdana;"> <br />
 <br />
</span><span style="font-size:small;color:#0000ff;font-family:Verdana;"><strong>+</strong></span><span style="font-size:x-small;font-family:Verdana;"> <br />
 <br />
Data can be accessed through multiple partitions in parallel, this will results in faster DML.</span></p>
<p><span style="font-size:x-small;font-family:Verdana;">Different partitions can be managed separately.  <br />
 <br />
Management of history more efficient (without having to leave the table).  <br />
 <br />
</span><span style="font-size:small;color:#ff0000;font-family:Verdana;"><strong>-</strong></span><span style="font-size:x-small;font-family:Verdana;"> <br />
 <br />
Limit of 1000 Partitions by Table. </span></p>
<p><span style="font-size:x-small;font-family:Verdana;"> <br />
Inability to use Indexed Views.  <br />
</span> </p>
<p><span style="font-size:x-small;color:#3366ff;font-family:Verdana;">II. Implementation Methodology.</span></p>
<p><span style="font-size:x-small;font-family:Verdana;">I’m going to focus in the most common scenario:</span></p>
<p><span style="font-size:x-small;font-family:Verdana;">Typically, in a DW environment there is a large Fact Table (<em>a.k.a the Monster</em>).</span></p>
<p><span style="font-size:x-small;font-family:Verdana;">In this article the Fact Table contains all the banking movements of all accounts within the last 4 years in the <em>MAIN</em> database and the remaining years in a <em>HISTORY</em> database.</span></p>
<p><span style="font-size:x-small;font-family:Verdana;">In this case, because there is a <em>chronology</em> to follow, I will use the extract day date column of the table as the <em>KEY</em> to our <em>Partition Strategy</em>.</span></p>
<p><span style="font-size:x-small;font-family:Verdana;">In this situation, I recommend the creation of a <strong><em>Partitioned Clustered Index</em></strong> because typically all access to the fact table always has the date in the <em>SARG.</em>  <br />
</span></p>
<p><span style="font-size:x-small;font-family:Verdana;">The fact table will be partitioned by month. <br />
</span> </p>
<p><span style="font-size:x-small;font-family:Verdana;">Technical approach:  <br />
</span></p>
<p><span style="font-size:x-small;font-family:Verdana;">Storage Arquitecture &#8211; <strong>3</strong> <em>RAID-5</em> Partition (2TB each), <strong>1</strong> <em>RAID 01</em> for Transaction Log and <strong>1</strong> more <em>RAID 01</em> for Non-Clustered indexes.</span></p>
<p><span style="font-size:x-small;font-family:Verdana;">First off all you will need to develop the <em>Partition Function</em>.</span></p>
<p><span style="font-size:x-small;font-family:Verdana;">The <em>Partition Function defines the values which the partition scheme will bind with the Filegroups.</em> </span></p>
<p><span style="font-size:x-small;font-family:Verdana;">Our boundary will be the date, and right <em>range(</em>boundary right <em>aligned)</em>.</span></p>
<p><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">CREATE</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">PARTITION</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">FUNCTION</span><span style="font-size:xx-small;font-family:Verdana;"> PFFactTableMonthly </span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">(</span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">SMALLDATETIME</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">)</span></p>
<p><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">AS</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">RANGE</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">RIGHT</span></p>
<p><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">FOR</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">VALUES</span><span style="font-size:xx-small;font-family:Verdana;"> </span></p>
<ul>     <span style="font-size:xx-small;color:#808080;font-family:Verdana;">(</span></ul>
<p>            <span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2007-01-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2007-02-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2007-03-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2007-04-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2007-05-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span></p>
<p>            <span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2007-06-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2007-07-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2007-08-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2007-09-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2007-10-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span></p>
<p>            <span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2007-11-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2007-12-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2008-01-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2008-02-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2008-03-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span></p>
<p>            <span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2008-04-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2008-05-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2008-06-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2008-07-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2008-08-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span></p>
<p>            <span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2008-09-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2008-10-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2008-11-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2008-12-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2009-01-01&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span></p>
<p>            <span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2009-02-01&#8242;</span></p>
<p>            <span style="font-size:xx-small;color:#808080;font-family:Verdana;">)</span></p>
<p><span style="font-size:x-small;font-family:Verdana;"> <br />
Create the Datafiles and assign each file to a differente Filegroup. In this situation <strong>27</strong> Datafiles/Filegroups will be created. </span></p>
<p><span style="font-size:x-small;font-family:Verdana;">Now that the Filegroups are created, assign them to a <em>Partition Scheme that </em>acts like a <em>ROUTER,</em> because it will forward the data to a specified path.</span></p>
<p><span style="font-size:x-small;font-family:Verdana;">The <em>Partition Scheme</em> will use the <em>Partition Function </em>to link the <em>logical layer to the physical layer.</em></span></p>
<p><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">CREATE</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">PARTITION</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">SCHEME</span><span style="font-size:xx-small;font-family:Verdana;"> PSFactTableMonthly</span></p>
<p><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">AS</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">PARTITION</span><span style="font-size:xx-small;font-family:Verdana;"> PFFactTableMonthly</span></p>
<p><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">TO</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">(</span></p>
<p>      <span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_BASE</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200701</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200702</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span></p>
<p>      <span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200703</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200704</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200705</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span></p>
<p>      <span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200706</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200707</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200708</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span></p>
<p>      <span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200709</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200710</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200711</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span></p>
<p>      <span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200712</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200801</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200802</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span></p>
<p>      <span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200803</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200804</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200805</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span></p>
<p>      <span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200806</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200807</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200808</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span></p>
<p>      <span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200809</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200810</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200811</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span></p>
<p>      <span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200812</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200901</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200902</span></p>
<p>      <span style="font-size:xx-small;color:#808080;font-family:Verdana;">)</span></p>
<p><span style="font-size:x-small;font-family:Verdana;">Now that we have the <em>Partition Scheme</em>, just create the <em>Clustered Index </em>on the Fact table with a FILLFACTOR 90% with PAD_INDEX on. </span></p>
<p><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">CREATE</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">CLUSTERED</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">INDEX</span><span style="font-size:xx-small;font-family:Verdana;"> [IDXC_FACTTABLE] </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">ON</span><span style="font-size:xx-small;font-family:Verdana;"> MIS</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">.</span><span style="font-size:xx-small;font-family:Verdana;">FACTTABLE</span></p>
<p>      <span style="font-size:xx-small;color:#808080;font-family:Verdana;">(</span></p>
<p>      <span style="font-size:xx-small;font-family:Verdana;">datecolumn</span></p>
<p>      <span style="font-size:xx-small;color:#808080;font-family:Verdana;">)</span><span style="font-size:xx-small;font-family:Verdana;"> </span></p>
<p>      <span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">WITH</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">(</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">PAD_INDEX</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">=</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">ON</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">FILLFACTOR</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">=</span><span style="font-size:xx-small;font-family:Verdana;"> 90</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">STATISTICS_NORECOMPUTE</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">=</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">OFF</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;"> </span></p>
<p>      <span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">IGNORE_DUP_KEY</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">=</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">OFF</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">ALLOW_ROW_LOCKS</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">=</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">ON</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">ALLOW_PAGE_LOCKS</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">=</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">ON</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">)</span><span style="font-size:xx-small;font-family:Verdana;"> </span> </p>
<p><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">on</span><span style="font-size:xx-small;font-family:Verdana;"> PSFactTableMonthly </span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">(</span><span style="font-size:xx-small;font-family:Verdana;">DATECOLUMN</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">)</span> </p>
<p><span style="font-size:x-small;color:#3366ff;font-family:Verdana;">III. Partitioning Management.</span> </p>
<p><span style="font-size:x-small;font-family:Verdana;">Now, that our table is partitioned, you are wondering, what will happen if there is an insert that has a date &gt;= </span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;2009-03-01&#8242;</span><span style="font-size:x-small;font-family:Verdana;">, what will happen is that all the data will be placed in the </span><span style="font-size:xx-small;font-family:Verdana;">FG_FactTable_200902 </span><span style="font-size:x-small;font-family:Verdana;">s because the data is <em>right</em> aligned as specified when we created the <em>Partition Function</em>.</span></p>
<p><span style="font-size:x-small;font-family:Verdana;">To maintain the data equally distributed between Filegroups, you must plan the future growth of you Database and continue adding Filegroups to the <em>Partition Scheme</em> and continuing to add <em>dates</em> to the <em>Partition Function</em>.</span></p>
<p><span style="font-size:x-small;font-family:Verdana;">Add a FG to the Partition Scheme:</span></p>
<p><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">ALTER</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">PARTITION</span><span style="font-size:xx-small;font-family:Verdana;"> PSFactTableMonthly </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">SCHEME</span><span style="font-size:xx-small;font-family:Verdana;"> </span></p>
<p><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">NEXT</span><span style="font-size:xx-small;font-family:Verdana;"> USED [FG_FactTable_200903]</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">.</span><span style="font-size:xx-small;font-family:Verdana;"> </span> </p>
<p><span style="font-size:x-small;font-family:Verdana;">Add a new boundary to the Partition Function:</span></p>
<p><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">ALTER</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">PARTITION</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">FUNCTION</span><span style="font-size:xx-small;font-family:Verdana;"> PFFactTableMonthly</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;"> ()</span></p>
<p><span style="font-size:xx-small;font-family:Verdana;">SPLIT </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">RANGE</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">(</span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8217;20090301&#8242;</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">)</span><span style="font-size:xx-small;font-family:Verdana;"> </span> </p>
<p><span style="font-size:x-small;font-family:Verdana;">Know the detail about the Partition Function :</span></p>
<p><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">SELECT</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">*</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">FROM</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#008000;font-family:Verdana;">sys.partition_functions</span><span style="font-size:xx-small;font-family:Verdana;"> </span></p>
<p><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">WHERE</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">name</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">=</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8216;PFFactTableMonthly&#8217;</span> </p>
<p><span style="font-size:x-small;font-family:Verdana;">Show the boundaries of the Partition Function :</span></p>
<p><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">SELECT</span><span style="font-size:xx-small;font-family:Verdana;"> a</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">.</span><span style="font-size:xx-small;font-family:Verdana;">name</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;"> b</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">.*</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">FROM</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#008000;font-family:Verdana;">sys.partition_functions</span><span style="font-size:xx-small;font-family:Verdana;"> a</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">,</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#008000;font-family:Verdana;">sys.partition_range_values</span><span style="font-size:xx-small;font-family:Verdana;"> b</span></p>
<p><span style="font-size:xx-small;color:#0000ff;font-family:Verdana;">WHERE</span><span style="font-size:xx-small;font-family:Verdana;"> a</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">.</span><span style="font-size:xx-small;font-family:Verdana;">function_id </span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">=</span><span style="font-size:xx-small;font-family:Verdana;"> b</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">.</span><span style="font-size:xx-small;font-family:Verdana;">function_id </span></p>
<p><span style="font-size:xx-small;color:#808080;font-family:Verdana;">and</span><span style="font-size:xx-small;font-family:Verdana;"> a</span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">.</span><span style="font-size:xx-small;font-family:Verdana;">name </span><span style="font-size:xx-small;color:#808080;font-family:Verdana;">=</span><span style="font-size:xx-small;font-family:Verdana;"> </span><span style="font-size:xx-small;color:#ff0000;font-family:Verdana;">&#8216;PFFactTableMonthly&#8217;</span></p>
<p><span style="font-size:x-small;font-family:Verdana;">Show Allocation Units</span></p>
<p><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">SELECT</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#ff00ff;font-family:Courier New;">object_name</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">(</span><span style="font-size:x-small;color:#ff00ff;font-family:Courier New;">object_id</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">)</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">AS</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">name</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">,</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">    partition_id</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">,</span><span style="font-size:x-small;font-family:Courier New;"> partition_number </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">AS</span><span style="font-size:x-small;font-family:Courier New;"> pnum</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">,</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">rows</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">,</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">    allocation_unit_id </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">AS</span><span style="font-size:x-small;font-family:Courier New;"> au_id</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">,</span><span style="font-size:x-small;font-family:Courier New;"> type_desc </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">as</span><span style="font-size:x-small;font-family:Courier New;"> page_type_desc</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">,</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">    total_pages </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">AS</span><span style="font-size:x-small;font-family:Courier New;"> pages</span></p>
<p><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">FROM</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#008000;font-family:Courier New;">sys.partitions</span><span style="font-size:x-small;font-family:Courier New;"> p </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">JOIN</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#008000;font-family:Courier New;">sys.allocation_units</span><span style="font-size:x-small;font-family:Courier New;"> a</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">   </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">ON</span><span style="font-size:x-small;font-family:Courier New;"> p</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">partition_id </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">=</span><span style="font-size:x-small;font-family:Courier New;"> a</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">container_id</span></p>
<p><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">WHERE</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#ff00ff;font-family:Courier New;">object_id</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">=</span><span style="font-size:x-small;color:#ff00ff;font-family:Courier New;">object_id</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">(</span><span style="font-size:x-small;color:#ff0000;font-family:Courier New;">&#8216;schema.FactTable</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">)</span> <br />
 <br />
 <br />
 <br />
 <br />
 </p>
<p><span style="font-size:x-small;font-family:Verdana;">From my point of view this is the best statement there is available to have a neat overview of your partitioned table, because it shows the INDEX_ID, Partition_Number, Filegroup that is associated the respective Partition_Number, ROWS, PAGES and the date that is associated with the FileGroup.</span> </p>
<p><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">SELECT</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#ff00ff;font-family:Courier New;">OBJECT_NAME</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">(</span><span style="font-size:x-small;font-family:Courier New;">i</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;color:#ff00ff;font-family:Courier New;">object_id</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">)</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">as</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#ff00ff;font-family:Courier New;">Object_Name</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">,</span></p>
<p>            <span style="font-size:x-small;font-family:Courier New;">i</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">index_id </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">AS</span><span style="font-size:x-small;font-family:Courier New;"> Index_ID</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">,</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">         p</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">partition_number</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">,</span><span style="font-size:x-small;font-family:Courier New;"> </span></p>
<ul>
<li> 
<ul><span style="font-size:x-small;font-family:Courier New;">fg</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">name </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">AS</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#ff00ff;font-family:Courier New;">Filegroup_Name</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">,</span><span style="font-size:x-small;font-family:Courier New;"> </span></ul>
</li>
</ul>
<ul>
<li> 
<ul><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">rows</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">,</span><span style="font-size:x-small;font-family:Courier New;"> </span></ul>
</li>
</ul>
<ul>
<li> 
<ul><span style="font-size:x-small;font-family:Courier New;">au</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">total_pages</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">,</span></ul>
</li>
</ul>
<p><span style="font-size:x-small;font-family:Courier New;">         </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">CASE</span><span style="font-size:x-small;font-family:Courier New;"> boundary_value_on_right</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">             </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">WHEN</span><span style="font-size:x-small;font-family:Courier New;"> 1 </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">THEN</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#ff0000;font-family:Courier New;">&#8216;less than&#8217;</span></p>
<ul>
<li> 
<ul><span style="font-size:x-small;font-family:Courier New;">      </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">ELSE</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#ff0000;font-family:Courier New;">&#8216;less than or equal to&#8217;</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">END</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">as</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#ff0000;font-family:Courier New;">&#8216;comparison&#8217;</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">,</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">value</span></ul>
</li>
</ul>
<ul><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">FROM</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#008000;font-family:Courier New;">sys.partitions</span><span style="font-size:x-small;font-family:Courier New;"> p </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">JOIN</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#008000;font-family:Courier New;">sys.indexes</span><span style="font-size:x-small;font-family:Courier New;"> i</span></ul>
<p><span style="font-size:x-small;font-family:Courier New;">      </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">ON</span><span style="font-size:x-small;font-family:Courier New;"> p</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;color:#ff00ff;font-family:Courier New;">object_id</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">=</span><span style="font-size:x-small;font-family:Courier New;"> i</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;color:#ff00ff;font-family:Courier New;">object_id</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">and</span><span style="font-size:x-small;font-family:Courier New;"> p</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">index_id </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">=</span><span style="font-size:x-small;font-family:Courier New;"> i</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">index_id</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">       </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">JOIN</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#008000;font-family:Courier New;">sys.partition_schemes</span><span style="font-size:x-small;font-family:Courier New;"> ps</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">                </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">ON</span><span style="font-size:x-small;font-family:Courier New;"> ps</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">data_space_id </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">=</span><span style="font-size:x-small;font-family:Courier New;"> i</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">data_space_id</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">       </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">JOIN</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#008000;font-family:Courier New;">sys.partition_functions</span><span style="font-size:x-small;font-family:Courier New;"> f</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">                   </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">ON</span><span style="font-size:x-small;font-family:Courier New;"> f</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">function_id </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">=</span><span style="font-size:x-small;font-family:Courier New;"> ps</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">function_id</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">       </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">LEFT</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">JOIN</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#008000;font-family:Courier New;">sys.partition_range_values</span><span style="font-size:x-small;font-family:Courier New;"> rv</span></p>
<p>     <span style="font-size:x-small;color:#0000ff;font-family:Courier New;">ON</span><span style="font-size:x-small;font-family:Courier New;"> f</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">function_id </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">=</span><span style="font-size:x-small;font-family:Courier New;"> rv</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">function_id</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">                    </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">AND</span><span style="font-size:x-small;font-family:Courier New;"> p</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">partition_number </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">=</span><span style="font-size:x-small;font-family:Courier New;"> rv</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">boundary_id</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">     </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">JOIN</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#008000;font-family:Courier New;">sys.destination_data_spaces</span><span style="font-size:x-small;font-family:Courier New;"> dds</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">             </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">ON</span><span style="font-size:x-small;font-family:Courier New;"> dds</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">partition_scheme_id </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">=</span><span style="font-size:x-small;font-family:Courier New;"> ps</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">data_space_id</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">                  </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">AND</span><span style="font-size:x-small;font-family:Courier New;"> dds</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">destination_id </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">=</span><span style="font-size:x-small;font-family:Courier New;"> p</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">partition_number</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">     </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">JOIN</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#008000;font-family:Courier New;">sys.filegroups</span><span style="font-size:x-small;font-family:Courier New;"> fg</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">                </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">ON</span><span style="font-size:x-small;font-family:Courier New;"> dds</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">data_space_id </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">=</span><span style="font-size:x-small;font-family:Courier New;"> fg</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">data_space_id</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">     </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">JOIN</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">(</span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">SELECT</span><span style="font-size:x-small;font-family:Courier New;"> container_id</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">,</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#ff00ff;font-family:Courier New;">sum</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">(</span><span style="font-size:x-small;font-family:Courier New;">total_pages</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">)</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">as</span><span style="font-size:x-small;font-family:Courier New;"> total_pages</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">                     </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">FROM</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#008000;font-family:Courier New;">sys.allocation_units</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">                     </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">GROUP</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">BY</span><span style="font-size:x-small;font-family:Courier New;"> container_id</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">)</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">AS</span><span style="font-size:x-small;font-family:Courier New;"> au</span></p>
<p><span style="font-size:x-small;font-family:Courier New;">                </span><span style="font-size:x-small;color:#0000ff;font-family:Courier New;">ON</span><span style="font-size:x-small;font-family:Courier New;"> au</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">container_id </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">=</span><span style="font-size:x-small;font-family:Courier New;"> p</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;font-family:Courier New;">partition_id</span></p>
<p>     <span style="font-size:x-small;color:#0000ff;font-family:Courier New;">WHERE</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#ff00ff;font-family:Courier New;">OBJECT_NAME</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">(</span><span style="font-size:x-small;font-family:Courier New;">i</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">.</span><span style="font-size:x-small;color:#ff00ff;font-family:Courier New;">object_id</span><span style="font-size:x-small;color:#808080;font-family:Courier New;">)</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#808080;font-family:Courier New;">=</span><span style="font-size:x-small;font-family:Courier New;"> </span><span style="font-size:x-small;color:#ff0000;font-family:Courier New;">&#8216;FactTable&#8217;</span> </p>
<p><span style="font-size:x-small;font-family:Verdana;">Some useful Tips : </span></p>
<ul type="DISC">
<li><span style="font-size:x-small;font-family:Verdana;">Always use a rule on DataFiles/FileGroup nomenclature, to make it easier to understand the dependencies.</span></li>
<li><span style="font-size:x-small;font-family:Verdana;">When partitioning tables, don’t randomize the creation of the DataFiles, for example put the DF1 on StorageA, DF2 on StorageB, DF3 on StorageC, DF4 on StorageA,DF4 on StorageB&#8230;</span></li>
<li><span style="font-size:x-small;font-family:Verdana;">For best performance align your non-clustered indexes with the partition.</span></li>
<li><span style="font-size:x-small;font-family:Verdana;">After the end of the previous month, rebuild the respective previous partition number.</span></li>
<li><span style="font-size:x-small;font-family:Verdana;">Be creative ! </span></li>
</ul>
<p><span style="font-size:x-small;font-family:Verdana;">Paulo Condeça. paulo at citen dot net</span></div>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/netic.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/netic.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netic.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netic.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netic.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netic.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/netic.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/netic.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/netic.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/netic.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netic.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netic.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netic.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netic.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netic.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netic.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netic.wordpress.com&amp;blog=1762839&amp;post=8&amp;subd=netic&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://netic.wordpress.com/2008/08/11/microsoft-sql-server-2005-partitioning-english-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a02d019603fa7ac617f49043696f2fce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Netic</media:title>
		</media:content>
	</item>
	</channel>
</rss>
