<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>UK Microsoft Dynamics Support Team Blog : SQL</title><link>http://blogs.msdn.com/ukdynsupport/archive/tags/SQL/default.aspx</link><description>Tags: SQL</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>SQL Server Trace Flag 4616 no longer required for Dynamics NAV 2009 SP1</title><link>http://blogs.msdn.com/ukdynsupport/archive/2009/10/28/sql-server-trace-flag-4616-no-longer-required-for-dynamics-nav-2009-sp1.aspx</link><pubDate>Wed, 28 Oct 2009 18:12:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9914240</guid><dc:creator>ukdynsupport</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/ukdynsupport/comments/9914240.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ukdynsupport/commentrss.aspx?PostID=9914240</wfw:commentRss><description>&lt;p&gt;Starting with Dynamics NAV 4.0 SP3 build 24080, all builds of NAV (SQL option) have a prerequisite that SQL&amp;#160; Server trace flag 4616 must be turned on. This was initially required when running NAV with SQL Server 2005 but subsequently was also required for SQL Server 2008 when that became a supported database platform.&lt;/p&gt;  &lt;p&gt;Why did we need this trace flag? SQL Server 2005 introduced increased security protection for database metadata which means that visibility is restricted by default for users in such a way that they can no longer see connection details for other logins unless the user is granted “VIEW SERVER STATE” permissions. However, Dynamics NAV licensing functionality and the client feature for displaying database sessions both required that users must have visibility to all active connection details. SQL Server trace flag 4616 causes SQL Server 2005 and 2008 to behave in the same way as SQL Server 2000 with respect to metadata visibility. Therefore, when support for SQL Server 2005 was added to the Dynamics NAV product the requirement to turn on trace flag 4616 was also introduced.&lt;/p&gt;  &lt;p&gt;Why do we no longer need this trace flag? With the release of Dynamics NAV 2009 SP1, trace flag 4616 is no longer required. The product now uses “VIEW SERVER STATE” permissions to enable visibility to the required connection information for each user. &lt;/p&gt;  &lt;p&gt;For customers who have been using SQL Server trace flag 4616 for older versions of Dynamics NAV Microsoft recommends disabling this trace flag after upgrading to Dynamics NAV 2009 SP1 if there are no other applications which require it. Most environments will have this trace flag added to the startup parameters for SQL Server so the following steps can be used to remove it as required:&lt;/p&gt;  &lt;p&gt;1. Go to Start-&amp;gt; Run and select the &amp;quot;Microsoft SQL Server 2005/2008&amp;quot; program group, select the &amp;quot;Configuration Tools&amp;quot; folder and then the &amp;quot;SQL Server Configuration Manager&amp;quot; tool.&lt;/p&gt;  &lt;p&gt;2. Double-click on the SQL Server service.&lt;/p&gt;  &lt;p&gt;3. Select the &amp;quot;Advanced&amp;quot; tab&lt;/p&gt;  &lt;p&gt;4. In the list of values double-click on the one called &amp;quot;Startup Parameters&amp;quot;&lt;/p&gt;  &lt;p&gt;5. In the list of values for this parameter (normally near the end), remove the following: ';-T4616'&lt;/p&gt;  &lt;p&gt;6. Click OK to save the change.&lt;/p&gt;  &lt;p&gt;7. Restart the SQL Server service&lt;/p&gt;  &lt;p&gt;In some rare cases the trace flag may be enabled on SQL Server using some other means (e.g. DBCC TRACEON command). Consult your SQL Server database administrator for advice in these scenarios. &lt;/p&gt;  &lt;p&gt;Best regards, &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Gerard Conroy&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Microsoft Dynamics NAV Support, UK.&lt;/strong&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9914240" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ukdynsupport/archive/tags/Support/default.aspx">Support</category><category domain="http://blogs.msdn.com/ukdynsupport/archive/tags/SQL/default.aspx">SQL</category><category domain="http://blogs.msdn.com/ukdynsupport/archive/tags/NAV+2009/default.aspx">NAV 2009</category></item><item><title>Identify and kill SQL processes causing CPU shortage</title><link>http://blogs.msdn.com/ukdynsupport/archive/2009/05/08/identify-and-kill-sql-processes-causing-cpu-shortage.aspx</link><pubDate>Fri, 08 May 2009 12:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9596506</guid><dc:creator>ukdynsupport</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/ukdynsupport/comments/9596506.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ukdynsupport/commentrss.aspx?PostID=9596506</wfw:commentRss><description>&lt;SPAN style="COLOR: #006600"&gt;&lt;FONT color=#000000 size=3 face=Calibri&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;There might be cases in which the SQL processes running against the MSCRM database, start using all available CPU resources causing bad performance&amp;nbsp;and downtimes. Using the following script it is easy to identify which processes are running in the SQL instance and, take reactive actions.&lt;/SPAN&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #006600"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;-- THIS SCRIPT HAS TO BE USED IN CASE THE SQL SERVER CPU REMAINS CONSTANTLY AT 100%&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #006600"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;-- IT ALLOWS TO INTERCEPT (AND KILL IF NECESSARY) THE PROCESS CAUSING THE PROBLEM&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #006600"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;-- CHANGE THE CONTEXT TO MASTER AND LIST ALL THE PROCESSES RUNNING &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #006600"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;-- AGAINST THE CRM DATABASE SORTING BY CPU UTILIZATION.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #006600"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;-- REMEMBER TO CHANGE THE DATABASE NAME ACCORDING TO THE NAME OF THE CRM DATABASE&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: blue"&gt;USE&lt;/SPAN&gt; Master&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #006600"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;-- RETRIEVE THE DATABASE ID FOR THE MSCRM DATABASE&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: blue"&gt;DECLARE&lt;/SPAN&gt; @DATABASE_ID &lt;SPAN style="COLOR: blue"&gt;INT&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: blue"&gt;SET&lt;/SPAN&gt; @DATABASE_ID = &lt;SPAN style="COLOR: #ff33cc"&gt;DB_ID&lt;/SPAN&gt;(&lt;SPAN style="COLOR: red"&gt;N'OrganizationName_MSCRM'&lt;/SPAN&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: blue"&gt;SELECT&lt;/SPAN&gt; ST.&lt;SPAN style="COLOR: blue"&gt;TEXT&lt;/SPAN&gt;,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;SP.* &lt;/FONT&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: blue"&gt;FROM&lt;/SPAN&gt; DBO.&lt;SPAN style="COLOR: #006600"&gt;SYSPROCESSES&lt;/SPAN&gt; SP&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: gray; mso-themecolor: background1; mso-themeshade: 128"&gt;CROSS APPLY&lt;/SPAN&gt; &lt;SPAN style="COLOR: #006600"&gt;SYS.DM_EXEC_SQL_TEXT&lt;/SPAN&gt;(SP.&lt;SPAN style="COLOR: blue"&gt;SQL_HANDLE&lt;/SPAN&gt;) ST&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: blue"&gt;WHERE&lt;/SPAN&gt; SP.DBID = @DATABASE_ID &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: blue"&gt;ORDER&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;BY&lt;/SPAN&gt; CPU &lt;SPAN style="COLOR: blue"&gt;DESC&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;SPAN style="COLOR: #006600"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #006600"&gt;-- ONCE YOU IDENTIFY THE PROCESS, IF IS POSSIBLE, KILL IT. TO KILL THE PROCESS IDENTIFY ITS &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #006600"&gt;-- SPID AND USE THE KILL COMMAND (REMEMBER TO REMOVE "&amp;lt;" AND "&amp;gt;")&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: blue"&gt;KILL&lt;/SPAN&gt;&lt;FONT color=#000000&gt; &amp;lt;SPID&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Berlin Sans FB','sans-serif'; FONT-SIZE: 10pt; mso-ansi-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-fareast-language: EN-GB; mso-no-proof: yes" lang=EN-US&gt;&lt;FONT color=#000000&gt;Carlo Gallazzi&amp;nbsp;| Business Systems Architect |&amp;nbsp;Microsoft&amp;nbsp;Dynamics CRM&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9596506" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ukdynsupport/archive/tags/CRM+3.0/default.aspx">CRM 3.0</category><category domain="http://blogs.msdn.com/ukdynsupport/archive/tags/CRM+4.0/default.aspx">CRM 4.0</category><category domain="http://blogs.msdn.com/ukdynsupport/archive/tags/SQL/default.aspx">SQL</category><category domain="http://blogs.msdn.com/ukdynsupport/archive/tags/CPU/default.aspx">CPU</category><category domain="http://blogs.msdn.com/ukdynsupport/archive/tags/Process/default.aspx">Process</category></item></channel></rss>