<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nick Heppleston's BizTalk Blog &#187; SQL Server</title>
	<atom:link href="http://www.modhul.com/category/sql-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.modhul.com</link>
	<description>Experiences of a UK BizTalk Consultant</description>
	<lastBuildDate>Sun, 13 Mar 2011 17:01:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>A Helpful SQL Server DBA Checklist</title>
		<link>http://www.modhul.com/2008/09/19/a-helpful-sql-server-dba-checklist/</link>
		<comments>http://www.modhul.com/2008/09/19/a-helpful-sql-server-dba-checklist/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 15:01:55 +0000</pubDate>
		<dc:creator>Nick Heppleston</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[FAQs  Help  and Tutorials]]></category>
		<category><![CDATA[Microsoft BizTalk Server]]></category>
		<category><![CDATA[Microsoft SQL Server]]></category>

		<guid isPermaLink="false">http://www.modhul.com/?p=239</guid>
		<description><![CDATA[Update: As Omer points out in the comments to this entry, the recommendations made in the DBA Checklist mentioned below are in places at odds with the official BizTalk/SQL Server best practices. When reviewing the checklist, please refer to the Microsoft BizTalk SQL Server Best Practices KB article. SimpleTalk has a helpful DBA checklist for [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong> As Omer points out in the comments to this entry, the recommendations made in the DBA Checklist mentioned below are in places at odds with the official BizTalk/SQL Server best practices. When reviewing the checklist, please refer to the <a title="How to maintain and troubleshoot BizTalk Server databases" href="http://support.microsoft.com/kb/952555/en-us" target="_blank">Microsoft BizTalk SQL Server Best Practices</a> KB article.</p>
<p>SimpleTalk has <a title="Brad's Sure DBA Checklist" href="http://www.simple-talk.com/sql/database-administration/brads-sure-dba-checklist/" target="_blank">a helpful DBA checklist</a> for all those BizTalkers who double-hat and manage a SQL Server as-well-as a BizTalk environment. It covers a number of useful topics, including:</p>
<ul>
<li>General best practices</li>
<li>High-availability</li>
<li>Performance tuning</li>
<li>Application coding and design</li>
<li>SSIS, Analysis Services, Reporting Services &amp; Service Broker</li>
</ul>
<p>Plenty of content for both new and experienced DBA&#8217;s &#8211; well worth a look.</p>
<h6 class="zemanta-related-title">Related articles by Zemanta</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.infoworld.com/article/08/09/05/Microsoft_lays_out_road_map_for_next_BizTalk_releases_1.html?source=rss&amp;url=http://www.infoworld.com/article/08/09/05/Microsoft_lays_out_road_map_for_next_BizTalk_releases_1.html">Microsoft lays out road map for next BizTalk releases</a></li>
<li class="zemanta-article-ul-li"><a href="http://blogs.technet.com/aralves/archive/2008/08/07/sql-server-2008-rtm.aspx">SQL Server 2008 = RTM</a></li>
</ul>
<div class="zemanta-pixie"><a class="zemanta-pixie-a" title="Zemified by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_c.png?x-id=5aea7b59-9279-4da9-93d2-d023a41f19e8" alt="Enhanced by Zemanta" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.modhul.com/2008/09/19/a-helpful-sql-server-dba-checklist/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SQL Server &#8211; Hotfix Available for Elevation of Privilege</title>
		<link>http://www.modhul.com/2008/07/08/sql-server-hotfix-available-for-elevation-of-privilege/</link>
		<comments>http://www.modhul.com/2008/07/08/sql-server-hotfix-available-for-elevation-of-privilege/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 21:08:32 +0000</pubDate>
		<dc:creator>Nick Heppleston</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.modhul.com/?p=158</guid>
		<description><![CDATA[Just a quick heads-up for those of you managing a SQL Server environment, it looks as though there is an important update for SQL Server versions 7.0, 2000 &#38; 2005. Full details of bulletin MS08-040 are available on the Microsoft Security Bulletin Website &#8211; details are as follows (my emphasis): This security update resolves four [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick heads-up for those of you managing a SQL Server environment, it looks as though there is an important update for SQL Server versions 7.0, 2000 &amp; 2005. Full details of bulletin MS08-040 are available on the <a title="Microsoft Security Bulletin MS08-040 – Important" href="http://www.microsoft.com/technet/security/bulletin/ms08-040.mspx?pubDate=2008-07-08" target="_blank">Microsoft Security Bulletin Website</a> &#8211; details are as follows (my emphasis):</p>
<blockquote><p>This security update resolves four privately disclosed vulnerabilities. The more serious of the vulnerabilities <strong>could allow an attacker to run code and to take complete control of an affected system</strong>. An authenticated attacker could then install programs; view, change, or delete data; or create new accounts with full administrative rights.</p>
<p>This security update is rated Important for supported releases of SQL Server 7.0, SQL Server 2000, SQL Server 2005, Microsoft Data Engine (MSDE) 1.0, Microsoft SQL Server 2000 Desktop Engine (MSDE 2000), Microsoft SQL Server 2005 Express Edition, Microsoft SQL Server 2000 Desktop Engine (WMSDE), and Windows Internal Database (WYukon).</p>
<p>The security update addresses the vulnerabilities by modifying the way that SQL Server <strong>manages page reuse, allocating more memory for the convert function, validating on-disk files before loading them, and validating insert statements</strong>.</p></blockquote>
<p>The hotfix will be installed automatically by Windows Update (as it has just done on my development machine); you may want to check it on a non-production environment first to ensure there are no unwanted side affects.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.modhul.com/2008/07/08/sql-server-hotfix-available-for-elevation-of-privilege/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tracking Down Deadlocks using SQL Profiler</title>
		<link>http://www.modhul.com/2008/06/30/tracking-down-deadlocks-using-sql-profiler/</link>
		<comments>http://www.modhul.com/2008/06/30/tracking-down-deadlocks-using-sql-profiler/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 10:50:01 +0000</pubDate>
		<dc:creator>Nick Heppleston</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Deadlocks]]></category>

		<guid isPermaLink="false">http://www.modhul.com/?p=154</guid>
		<description><![CDATA[Yet more great content over on the (RedGate sponsored) Simple Talk blog, this time an excellent article on tracking down deadlocks using SQL Profiler by Brad McGhee, well worth a read before your production system starts to exhibit this behaviour!]]></description>
			<content:encoded><![CDATA[<p>Yet more great content over on the (RedGate sponsored) <a title="Simple-Talk" href="http://www.simple-talk.com/default.aspx" target="_blank">Simple Talk blog</a>, this time an excellent article on <a title="How to Track Down Deadlocks Using SQL Server 2005 Profiler" href="http://www.simple-talk.com/sql/learn-sql-server/how-to-track-down-deadlocks-using-sql-server-2005-profiler/" target="_blank">tracking down deadlocks using SQL Profiler</a> by Brad McGhee, well worth a read before your production system starts to exhibit this behaviour!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.modhul.com/2008/06/30/tracking-down-deadlocks-using-sql-profiler/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Searching *Inside* Stored Procedures</title>
		<link>http://www.modhul.com/2008/04/26/searching-inside-stored-procedures/</link>
		<comments>http://www.modhul.com/2008/04/26/searching-inside-stored-procedures/#comments</comments>
		<pubDate>Sat, 26 Apr 2008 17:45:35 +0000</pubDate>
		<dc:creator>Nick Heppleston</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[INFORMATION_SCHEMA]]></category>

		<guid isPermaLink="false">http://www.modhul.com/?p=135</guid>
		<description><![CDATA[I&#8217;ve recently inherited a large BizTalk system and needed a quick way to determine which custom stored procedures accessed which tables/views and called other sprocs. Thanks to my co-worker Shaun, I now have the power of the INFORMATION_SCHEMA views at my disposal! Information Schema Views Information schema views provide an internal, system table-independent view of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently inherited a large BizTalk system and needed a quick way to determine which custom stored procedures accessed which tables/views and called other sprocs. Thanks to my co-worker Shaun, I now have the power of the INFORMATION_SCHEMA views at my disposal!</p>
<p><strong>Information Schema Views</strong></p>
<p>Information schema views provide an internal, system table-independent view of SQL Server metadata. They provide information on tables, views, stored procedures to name but a few objects. The views included in SQL Server 2005 comply with the ANSI SQL-92 standard definition, so any queries can (theoretically) be taken and executed on Oracle, or DB2, etc. More information can be found online at <a title="Information Schema Views (Transact-SQL)" href="http://msdn2.microsoft.com/en-us/library/ms186778.aspx" target="_blank">http://msdn2.microsoft.com/en-us/library/ms186778.aspx</a></p>
<p><strong>Searching within Stored Procedures</strong></p>
<p>To search for &#8211; or within &#8211; stored procedures, you need to work with the INFORMATION_SCHEMA.ROUTINES view, the following sample returns all stored procedures where the name <em>contains</em> &#8216;BizTalkServerApplication&#8217;:</p>
<blockquote><p><span style="font-size: 10pt; font-family: 'Courier New'; color: green;">–– Change to the BizTalk Message Box database.</span><br />
<span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">USE</span><span style="font-size: 10pt; font-family: 'Courier New';"> BizTalkMsgBoxDb</span><br />
<span style="font-size: 10pt; font-family: 'Courier New';">GO</span><br />
<span style="font-size: 10pt; font-family: 'Courier New';"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="font-size: 10pt; font-family: 'Courier New'; color: green;">–– Search for sprocs with &#8216;BizTalkServerApplication&#8217; in the name.</span><br />
<span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">SELECT</span> ROUTINE_NAME,<br />
<span style="font-size: 10pt; font-family: 'Courier New';"><span style="color: fuchsia;">CONVERT</span>(<span style="color: blue;">VARCHAR</span>(8), created, 3) + <span style="color: red;">&#8216;  &#8216;</span> + <span style="color: fuchsia;">CONVERT</span>(<span style="color: blue;">VARCHAR</span>(8), created, 108) <span style="color: blue;">AS</span> <span style="color: red;">&#8216;Created Date&#8217;</span>,</span><br />
<span style="font-size: 10pt; font-family: 'Courier New';"><span style="color: fuchsia;">CONVERT</span>(<span style="color: blue;">VARCHAR</span>(8), last_altered, 3) + <span style="color: red;">&#8216;  &#8216;</span> + <span style="color: fuchsia;">CONVERT</span>(<span style="color: blue;">VARCHAR</span>(8), last_altered, 108) <span style="color: blue;">AS</span> <span style="color: red;">&#8216;Last Altered On&#8217;</span></span><br />
<span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">FROM</span><span style="font-size: 10pt; font-family: 'Courier New';"> INFORMATION_SCHEMA.ROUTINES</span><br />
<span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">WHERE</span><span style="font-size: 10pt; font-family: 'Courier New';"> ROUTINE_NAME <span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">LIKE </span><span style="font-size: 10pt; font-family: 'Courier New'; color: red;">‘%BizTalkServerApplication%’</span><br />
<span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">ORDER BY</span><span style="font-size: 10pt; font-family: 'Courier New';"> 1</span></span></span></span></p></blockquote>
<p>To search <em>within </em>stored procedures, simply change your WHERE clause to use the ROUTINE_DEFINITION column (<strong>Note: </strong>the ROUTINE_DEFINITION column only includes the first 4000 characters of the T-SQL statements that created the stored procedure). The following sample returns all stored procedures that <em>contain</em> the text &#8216;SuspendedQ&#8217;:</p>
<blockquote><p><span style="font-size: 10pt; font-family: 'Courier New'; color: green;">–– Change to the BizTalk Message Box database.</span><br />
<span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">USE</span><span style="font-size: 10pt; font-family: 'Courier New';"> BizTalkMsgBoxDb</span><br />
<span style="font-size: 10pt; font-family: 'Courier New';">GO</span><br />
<span style="font-size: 10pt; font-family: 'Courier New';"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="font-size: 10pt; font-family: 'Courier New'; color: green;">–– Search for sprocs that contain the text &#8216;SuspendedQ&#8217; in the name.</span><br />
<span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">SELECT</span> ROUTINE_NAME,<br />
<span style="font-size: 10pt; font-family: 'Courier New';"><span style="color: fuchsia;">CONVERT</span>(<span style="color: blue;">VARCHAR</span>(8), created, 3) + <span style="color: red;">&#8216;  &#8216;</span> + <span style="color: fuchsia;">CONVERT</span>(<span style="color: blue;">VARCHAR</span>(8), created, 108) <span style="color: blue;">AS</span> <span style="color: red;">&#8216;Created Date&#8217;</span>,</span><br />
<span style="font-size: 10pt; font-family: 'Courier New';"><span style="color: fuchsia;">CONVERT</span>(<span style="color: blue;">VARCHAR</span>(8), last_altered, 3) + <span style="color: red;">&#8216;  &#8216;</span> + <span style="color: fuchsia;">CONVERT</span>(<span style="color: blue;">VARCHAR</span>(8), last_altered, 108) <span style="color: blue;">AS</span> <span style="color: red;">&#8216;Last Altered On&#8217;</span></span><br />
<span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">FROM</span><span style="font-size: 10pt; font-family: 'Courier New';"> INFORMATION_SCHEMA.ROUTINES</span><br />
<span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">WHERE</span><span style="font-size: 10pt; font-family: 'Courier New';"> ROUTINE_DEFINITION <span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">LIKE </span><span style="font-size: 10pt; font-family: 'Courier New'; color: red;">‘%SuspendedQ%’</span><br />
<span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">ORDER BY</span><span style="font-size: 10pt; font-family: 'Courier New';"> 1</span></span></span></span></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.modhul.com/2008/04/26/searching-inside-stored-procedures/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Why Archive and Purge when you can just Purge?</title>
		<link>http://www.modhul.com/2008/04/13/why-archive-and-purge-when-you-can-just-purge/</link>
		<comments>http://www.modhul.com/2008/04/13/why-archive-and-purge-when-you-can-just-purge/#comments</comments>
		<pubDate>Sun, 13 Apr 2008 19:48:07 +0000</pubDate>
		<dc:creator>Nick Heppleston</dc:creator>
				<category><![CDATA[BizTalk 2006]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Administration]]></category>
		<category><![CDATA[Purging]]></category>
		<category><![CDATA[Tracking Database]]></category>

		<guid isPermaLink="false">http://www.modhul.com/?p=143</guid>
		<description><![CDATA[In BizTalk 2004 SP2, the BizTalk Team gave us the Archive and Purge SQL Server Maintenance Job for managing the size of the Tracking Database. This was a great tool and really took away some of the admin headaches in maintaining this particular database. The job allows administrators to archive olde tracking data and verify [...]]]></description>
			<content:encoded><![CDATA[<p>In BizTalk 2004 SP2, the BizTalk Team gave us the Archive and Purge SQL Server Maintenance Job for managing the size of the Tracking Database. This was a great tool and really took away some of the admin headaches in maintaining this particular database.</p>
<p>The job allows administrators to archive olde tracking data and verify the integrity of the backup before purging from the live database (for detailed instructions, <a title="Archiving and Purging the BizTalk Tracking Database" href="http://msdn2.microsoft.com/en-us/library/aa560754.aspx" target="_blank">see the MSDN website</a>). This is a good, pro-active practice for the health of any BizTalk environment, in that:</p>
<ul>
<li>BizTalkDTADb database growth is constantly checked, allowing the TDDS service to run effectively, thereby maintaining a healthy Message Box.</li>
<li>Maintaining the size of the BizTalkDTADb data and log files ensures that the database doesn&#8217;t just eat all of your available disk space.</li>
<li>The tracking data can be restored in a dedicated OLAP environment, allowing reports to be run without affecting the live BizTalk environment.</li>
</ul>
<p>However, imagine a scenario where <strong>you don&#8217;t want the archived data</strong> &#8211;  you simply want to purge. Where that&#8217;s the case, you can either manually run a truncate on the BizTalkDTADb (see my posts detailing how to do this under <a title="Truncating the BizTalkDTADb Database" href="http://www.modhul.com/2008/01/03/truncating-the-biztalkdtadb-database" target="_blank">BizTalk 2004</a> or <a title="Truncating the BizTalk 2006 Tracking Database" href="http://www.modhul.com/2008/04/10/truncating-the-biztalk-2006-tracking-database/" target="_blank">BizTalk 2006</a> &#8211; there are some subtle differences), or run the hidden admin gem <strong><em>dtasp_PurgeTrackingDatabase</em></strong> (a stored procedure used by the <em>dtasp_ArchiveAndPurgeTrackingDatabase</em> which just purges) on a scheduled basis, so you no longer need to worry about manually purging.</p>
<p><strong>Configuring the </strong><strong>dtasp_PurgeTrackingDatabase Stored Procedure</strong><em><br />
</em></p>
<p>The Purge stored procedure is used in a very similar manner to <em>dtasp_ArchiveAndPurgeTrackingDatabase</em><em>,</em> taking 4 parameters:</p>
<ul>
<li>Live Hours &#8211; Any completed instance older than the live hours + live days&#8230;</li>
<li>Live Days &#8211; &#8230;will be deleted along with all associated data.</li>
<li>Hard Days &#8211; all data older than this will be deleted. The time interval specified here should be greater than the live window of data.</li>
<li>Last Backup &#8211; UTC Datetime of the last backup. When set to NULL, data is not purged from the database.</li>
</ul>
<p>As an example of its usage, if you wanted to purge any tracking data older than two hours and hard-delete any data older than one day, you would use the follow T-SQL:</p>
<blockquote><p><code><br />
<span style="font-size: 10pt; font-family: 'Courier New'; color: green;">–– Change to the BizTalk Tracking database.</span><br />
<span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">USE</span><span style="font-size: 10pt; font-family: 'Courier New';"> BizTalkDTADb<br />
<span style="font-size: 10pt; font-family: 'Courier New';">GO</span></span></code></p>
<p><code><span style="font-size: 10pt; font-family: 'Courier New';"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="font-size: 10pt; font-family: 'Courier New'; color: green;">–– Prune tracking data older than two hours.</span><br />
<span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">DECLARE</span><span style="font-size: 10pt; font-family: 'Courier New';"> @dtLastBackup</span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;"> DATETIME</span><br />
<span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">SET</span><span style="font-size: 10pt; font-family: 'Courier New';"> @dtLastBackup =</span><span style="font-size: 10pt; font-family: 'Courier New'; color: fuchsia;"> GetUTCDate()</span><br />
<span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">EXEC</span><span style="font-size: 10pt; font-family: 'Courier New';"> dtasp_PurgeTrackingDatabase 2, 0, 1, @dtLastBackup</span></span></span></code></p></blockquote>
<p>The <em>@dtLastBackup</em> parameter is used to ensure that records that have not been backed-up are not deleted by the purge procedure, so we set it to the current UTC date/time to ensure that whatever live hours/days you specify, records are deleted. I&#8217;m not too sure why the development team included this as a parameter: the procedure is a wrapper that calls the <em>dtasp_PurgeTrackingDatabase_Internal</em> (which is also called by the <em>dtasp_ArchiveAndPurgeTrackingDatabase</em> procedure) so it could have been included in that wrapper given that it is always defaulted to the current UTC date/time during purges!</p>
<p>One other thing to note is that the wrapper script also modifies the prune before date (the date that is built by the live hours/days specified): this date date is tweaked to remove ten minutes to ensure redundancy in the remaining data.  In the example used above, rather than keeping two hours of data, there will in fact be two hours and ten minutes once the code has been run.</p>
<p><strong>Using the dtasp_PurgeTrackingDatabase Stored Procedure</strong><em><br />
</em></p>
<p>To start using this procedure, I would suggest that you first truncate your database, then configure the SQL Server Agent job to run every X hours/days depending on your environmental requirements. I suggest initially truncating your database to ensure the first run of the job doesn’t take several hours!</p>
<p>Further details about the <em>dtasp_PurgeTrackingDatabase </em>stored procedure can be found <a title="How to Purge Data from the BizTalk Tracking Database" href="http://msdn2.microsoft.com/en-us/library/aa578470.aspx" target="_blank">online at MSDN</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.modhul.com/2008/04/13/why-archive-and-purge-when-you-can-just-purge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Diagnosing Performance Problems in SQL Server</title>
		<link>http://www.modhul.com/2008/04/11/diagnosing-performance-problems-in-sql-server/</link>
		<comments>http://www.modhul.com/2008/04/11/diagnosing-performance-problems-in-sql-server/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 11:01:07 +0000</pubDate>
		<dc:creator>Nick Heppleston</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.modhul.com/?p=131</guid>
		<description><![CDATA[SQL Server is the heart of a BizTalk environment, so a performant database is a must for any self-respecting BizTalk setup. But, if you consider that SQL Server is causing you performance issues, where do you start to look? Thankfully, there is a two part series on this exact topic from Graham Kent, a SQL [...]]]></description>
			<content:encoded><![CDATA[<p>SQL Server is the heart of a BizTalk environment, so a <a title="Performant is not a Word" href="http://boulter.com/blog/2004/08/19/performant-is-not-a-word/" target="_blank">performant</a> database is a must for any self-respecting BizTalk setup. But, if you consider that SQL Server is causing you performance issues, where do you start to look?</p>
<p>Thankfully, there is a two part series on this exact topic from Graham Kent, a SQL Server Support Team escalation engineer, where is he discusses PSSDIAG/SQLDIAG and the information that it produces to help diagnose a whole raft of possible SQL Server performance problems. Links are below, enjoy!</p>
<ul>
<li><a title=".NET Performance Issues: What if I suspect that my performance problem is in SQL Server" href="http://blogs.msdn.com/tess/archive/2008/04/04/net-performance-issue-what-if-i-suspect-that-my-performance-problem-is-in-sql-server.aspx" target="_blank">.NET Performance Issues: What if I suspect that my performance problem is in SQL Server</a></li>
<li><a href="http://blogs.msdn.com/tess/archive/2008/04/10/net-performance-issues-what-if-i-suspect-that-my-performance-problem-is-in-sql-server-part-ii.aspx" target="_blank">.NET Performance Issues: What if I suspect that my performance problem is in SQL Server Part II</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.modhul.com/2008/04/11/diagnosing-performance-problems-in-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Truncating the BizTalk 2006 Tracking Database</title>
		<link>http://www.modhul.com/2008/04/10/truncating-the-biztalk-2006-tracking-database/</link>
		<comments>http://www.modhul.com/2008/04/10/truncating-the-biztalk-2006-tracking-database/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 14:31:01 +0000</pubDate>
		<dc:creator>Nick Heppleston</dc:creator>
				<category><![CDATA[BizTalk 2006]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[BizTalkDTADb]]></category>
		<category><![CDATA[Truncate]]></category>

		<guid isPermaLink="false">http://www.modhul.com/?p=130</guid>
		<description><![CDATA[In Truncating the BizTalk 2004 Tracking  Database I discussed how to truncate the tracking database in BizTalk 2004. Over on the BizTalk Gurus forums, user Nick Busy wanted to do the same thing for BizTalk Server 2006 &#8211; he&#8217;s kindly allowed me to repost his instructions for the community on this blog: 0. Before start, [...]]]></description>
			<content:encoded><![CDATA[<p>In <a title="Permanent Link to " rel="bookmark" href="http://www.modhul.com/2008/01/03/truncating-the-biztalkdtadb-database">Truncating the BizTalk 2004 Tracking  Database</a> I discussed how to truncate the tracking database in BizTalk 2004. Over on the BizTalk Gurus forums, user <em>Nick Busy</em> <a title="Purge a very big Tracking database" href="http://www.biztalkgurus.com/forums/p/9443/18655.aspx#18655" target="_blank">wanted to do the same thing for BizTalk Server 2006</a> &#8211; he&#8217;s kindly allowed me to repost his instructions for the community on this blog:</p>
<p>0. Before start, ensure you have got the database admin priveleges on the database</p>
<p>1. Stop all BizTalk Server Host Instances</p>
<p>2. Full backup BizTalkDTADb database (just in case)</p>
<p>3. Make scripts to create views (MANDATORY)</p>
<blockquote><p><strong>dbo.dtav_ServiceFacts<br />
dbo.dtav_MessageFacts<br />
dbo.dtav_FindMessageFacts</strong></p></blockquote>
<p>4. Run SQL script:</p>
<blockquote><p><strong>use BizTalkDTADb<br />
GO</strong></p>
<p><strong>&#8211; Drop the Views (before you perform this, ensure you take copies of these views!)<br />
&#8211; unfortunately, it&#8217;s necessary for SQL 2000, but you can skip it for SQL 2005<br />
Drop View dbo.dtav_ServiceFacts<br />
Drop View dbo.dtav_MessageFacts<br />
Drop View dbo.dtav_FindMessageFacts<br />
Go</strong></p>
<p><strong>&#8211; Truncate the necessary Tables<br />
Truncate Table dta_CallChain<br />
Truncate Table dta_DebugTrace<br />
Truncate Table dta_MessageInOutEvents</strong></p>
<p><strong>Truncate Table dta_ServiceInstanceExceptions<br />
Truncate Table dta_ServiceInstances</strong></p>
<p><strong>Truncate Table Tracking_Fragments1<br />
Truncate Table Tracking_Parts1<br />
Truncate Table Tracking_Spool1</strong></p>
<p><strong>Truncate Table dta_MessageFieldValues</strong></p>
<p><strong>&#8211; end of the script</strong></p></blockquote>
<p>5. Update statistics on BizTalkDTADb database</p>
<blockquote><p><strong>&#8211; update statistics<br />
exec sp_updatestats</strong></p></blockquote>
<p>6. Run the saved scripts (see step 3) to recreate the dropped views from your own environment.</p>
<p>7. Shrink BizTalkDTADb database (sometimes it doesn&#8217;t work from GUI, so using sql command will help)</p>
<blockquote><p><strong>&#8211; shrink database<br />
dbcc shrinkdatabase (BizTalkDTADb, 10)</strong></p></blockquote>
<p>8. Start BizTalk Server Host Instances</p>
<p>9. Configure and enable SQL Agent job &#8220;DTA Purge and Archive&#8221; (to avoid over-growing the database in the future)</p>
<p>P.S. The script above does not truncate Rule Engine related tables.</p>
<p>Thanks <em>Nick</em>, much appreciated.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.modhul.com/2008/04/10/truncating-the-biztalk-2006-tracking-database/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Can I get some BI with this?</title>
		<link>http://www.modhul.com/2008/03/18/can-i-get-some-bi-with-this/</link>
		<comments>http://www.modhul.com/2008/03/18/can-i-get-some-bi-with-this/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 15:37:44 +0000</pubDate>
		<dc:creator>Nick Heppleston</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.modhul.com/2008/03/18/can-i-get-some-bi-with-this/</guid>
		<description><![CDATA[While I&#8217;m lying in bed dying of flu for the second time this year (grrr!!), here is a little light-hearted look at which tastes better: SQL Server 2005 or Oracle 11g. Click on the screenshot or go to www.databasetastechallenge.com. &#8220;Now&#8230;. Who&#8217;s still thirsty!&#8221;]]></description>
			<content:encoded><![CDATA[<p>While I&#8217;m lying in bed dying of flu for the second time this year (grrr!!), here is a little light-hearted look at which tastes better: SQL Server 2005 or Oracle 11g. Click on the screenshot or go to <a href="http://www.databasetastechallenge.com" title="Database Challenge" target="_blank">www.databasetastechallenge.com</a>.</p>
<p><a href="http://www.databasetastechallenge.com" title="The DBA Taste Challenge" target="_blank"><img src="http://www.modhul.com/wp-content/uploads/2008/03/dbatastechallenge.JPG" alt="DBA Taste Challenge" /></a></p>
<p>&#8220;Now&#8230;. Who&#8217;s still thirsty!&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.modhul.com/2008/03/18/can-i-get-some-bi-with-this/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An Easier Way to do Complex FOR XML EXPLICIT</title>
		<link>http://www.modhul.com/2008/01/23/an-easier-way-to-do-complex-for-xml-explicit/</link>
		<comments>http://www.modhul.com/2008/01/23/an-easier-way-to-do-complex-for-xml-explicit/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 16:17:59 +0000</pubDate>
		<dc:creator>Nick Heppleston</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.modhul.com/2008/01/23/an-easier-way-to-do-complex-for-xml-explicit/</guid>
		<description><![CDATA[I&#8217;ve got to confess that I&#8217;m not all that good with the FOR XML EXPLICIT syntax to generate Xml straight out of SQL Server &#8211; although there are a few good resources on the technology, I don&#8217;t spend enough time writing it and just get hopelessly muddled when I have to write anything remotely complex. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got to confess that I&#8217;m not all that good with the FOR XML EXPLICIT syntax to generate Xml straight out of SQL Server &#8211; although there are a few <a href="http://www32.brinkster.com/srisamp/sqlArticles/article_21.htm" title="Understanding EXPLICIT XML Formatting" target="_blank">good</a> <a href="http://www.quest-pipelines.com/newsletter-v3/0502_B.htm" title="The Explicit Mode of FOR XML" target="_blank">resources</a> on the technology, I don&#8217;t spend enough time writing it and just get hopelessly muddled when I have to write anything remotely complex.</p>
<p>So, after <a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2722445&amp;SiteID=1" title="Generating Header and Item Xml Records" target="_blank">posting a plea for help to the SQL Server Xml MSDN Forum</a> I was pleasantly surprised to learn about  the new <a href="http://msdn2.microsoft.com/en-us/library/ms189885.aspx" title="SQL Server 2005 BOL - Using PATH Mode" target="_blank">PATH Mode</a> for generating Xml that is available in SQL Server 2005. To quote the MSDN website:</p>
<blockquote><p>&#8220;&#8230;the PATH mode provides a simpler way to mix elements and attributes. PATH mode is also a simpler way to introduce additional nesting for representing complex properties. You can use FOR XML EXPLICIT mode queries to construct such XML from a rowset, but the PATH mode provides a simpler alternative to the potentially cumbersome EXPLICIT mode queries. PATH mode, together with the ability to write nested FOR XML queries and the TYPE directive to return <strong>xml</strong> type instances, allows you to write queries with less complexity.&#8221;</p></blockquote>
<p>So, using PATH mode, you can generate Xml along the lines of:</p>
<p><center><img src="http://www.modhul.com/wp-content/uploads/2008/01/xmlpathsqloutput.png" alt="PATH T-SQL Xml Output" /></center>With T-SQL as simple as this:</p>
<p><center><img src="http://www.modhul.com/wp-content/uploads/2008/01/xmlpathsql.png" alt="Xml PATH SQL T-SQL" /></center>Michael Rys has a couple of good blog posts on the subject <a href="http://sqljunkies.com/WebLog/mrys/archive/2004/02/19/1201.aspx" title="Moving FOR XML EXPLICIT to the new PATH mode (part I)" target="_blank">here</a> and <a href="http://sqljunkies.com/WebLog/mrys/archive/2004/02/19/1208.aspx" title="Moving FOR XML EXPLICIT to the new PATH mode (part II)" target="_blank">here</a> &#8211; well worth a read.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.modhul.com/2008/01/23/an-easier-way-to-do-complex-for-xml-explicit/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Further BizTalk &amp; MSDTC Issues</title>
		<link>http://www.modhul.com/2008/01/22/further-biztalk-msdtc-issues/</link>
		<comments>http://www.modhul.com/2008/01/22/further-biztalk-msdtc-issues/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 10:07:30 +0000</pubDate>
		<dc:creator>Nick Heppleston</dc:creator>
				<category><![CDATA[BizTalk 2004]]></category>
		<category><![CDATA[BizTalk 2006]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.modhul.com/2008/01/22/further-biztalk-msdtc-issues/</guid>
		<description><![CDATA[Update 22nd June 2009: I&#8217;ve just encountered yet another issue trying to get MSDTC working. The culprit this time was a rogue entry in the hosts file (C:\WINDOWS\system32\drivers\etc\hosts) which had an incorrect IP address specified for the server I was trying to &#8216;DTC Ping&#8217;. I encountered yet another MSDTC issue when talking to a remote [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong>Update 22nd June 2009:</strong> I&#8217;ve just encountered yet another issue trying to get MSDTC working. The culprit this time was a rogue entry in the </em>hosts <em>file (C:\WINDOWS\system32\drivers\etc\hosts) which had an incorrect IP address specified for the server I was trying to &#8216;DTC Ping&#8217;.</em></p>
<p>I encountered yet another MSDTC issue when talking to a remote SQL Server database following a BizTalk 2006 development environment upgrade from Windows Server 2003 Ent. Ed. to Service Pack 1.</p>
<p>The usual &#8216;Mutual authentication required&#8217; / &#8216;No Authentication Required&#8217; <a title="Fix " href="http://www.howtogeek.com/howto/windows/fix-new-transaction-cannot-enlist-in-the-specified-transaction-coordinator-on-server-2003-sp2/" target="_blank">problem reared its head</a>, and although this needed to be resolved, I was still receiving the &#8216;<a title="http://www.howtogeek.com/howto/windows/fix-new-transaction-cannot-enlist-in-the-specified-transaction-coordinator-on-server-2003-sp2/" href="http://www.modhul.com/wp-admin/New%20transaction%20cannot%20enlist%20in%20the%20specified%20transaction%20coordinator.%20%5B-2147168246%5D" target="_blank">New transaction cannot enlist in the specified transaction coordinator</a>&#8216; error when BizTalk attempted to do anything involving a distributed transaction. Even with a fresh installation and reconfiguration of MSDTC, I still couldn&#8217;t successfully run the DTCPing tool &#8211; the RPC test ran fine, but the Binding test failed every time:</p>
<p align="center"><img src="http://www.modhul.com/wp-content/uploads/2008/01/unsuccessfuldtcpingtest.PNG" alt="Unsuccessful DTCPing Test" /></p>
<p>As discussed in <a title="MSDTC Configuration" href="http://romualdas.spaces.live.com/blog/cns!DCDC5E439E70339D!321.entry" target="_blank">this blog entry by Romualdas</a> MSDTC additionally requires &#8216;NetBIOS over TCP/IP&#8217; functionality enabled on the network adapter/s participating in the DTC transaction &#8211; this setting is disabled by default when using static IP addresses:</p>
<p align="center"><img src="http://www.modhul.com/wp-content/uploads/2008/01/enablenetbiosovertcpip.png" alt="Enable NetBIOS over TCP/IP" /></p>
<p>Because MSDTC uses NetBIOS to resolve remote machine names (rather than DNS Fully Qualified Names which is a little odd <a title="Understanding NetBIOS and Windows Server 2003" href="http://www.windowsdevcenter.com/pub/a/windows/2004/05/11/netbios.html" target="_blank">reading this O&#8217;Reilly article</a>), the DTCPing Binding test was unable to resolve the machine initiating the call and hence the failure of the test. Setting the network adapter to enable NetBIOS over TCP/IP resolved the issue (no restart was required).</p>
<p align="center"><img src="http://www.modhul.com/wp-content/uploads/2008/01/successfuldtcpingtest.PNG" alt="Successful DTCPing Test" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.modhul.com/2008/01/22/further-biztalk-msdtc-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

