<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/wordpress-mu-1.2.1" -->
<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/"
	>

<channel>
	<title>SQL Server with Mr. Denny</title>
	<link>http://itknowledgeexchange.techtarget.com/sql-server</link>
	<description></description>
	<pubDate>Thu, 15 May 2008 11:00:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=wordpress-mu-1.2.1</generator>
	<language>en</language>
			<item>
		<title>Back To Basics: Service Broker Message Types</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-service-broker-message-types/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-service-broker-message-types/#comments</comments>
		<pubDate>Thu, 15 May 2008 11:00:00 +0000</pubDate>
		<dc:creator>mrdenny</dc:creator>
		
		<category><![CDATA[Back To Basics]]></category>

		<category><![CDATA[Service Broker]]></category>

		<category><![CDATA[SQL]]></category>

		<category><![CDATA[Message Type]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-service-broker-message-types/</guid>
		<description><![CDATA[The message type is the first of the service broker specific objects.  The message type defines the name of the message, and performs any validation that the service broker needs to do on the contents of the message prior to sending the message.  If the message is being sent to another database (on the same server or a different server) then the message type must exist on both databases.]]></description>
			<content:encoded><![CDATA[<p>The message type is the first of the service broker specific objects.  The message type defines the name of the message, and performs any validation that the service broker needs to do on the contents of the message prior to sending the message.  If the message is being sent to another database (on the same server or a different server) then the message type must exist on both databases.</p>
<p>Validation can be one of four options.</p>
<ol>
<li>None (My personal favorate especially for sample code)</li>
<li>Empty</li>
<li>Well_Formed_XML</li>
<li>Valid_XML With Schema Collection</li>
</ol>
<p>1 and 2 are pretty straight forward.  None = No validation is done.  Empty = The message must be empty.  Well_Formed_XML requires that the XML be a valid XML document.  The fourth option requires that not only the XML be valid, but that it fits within a pre-existing XML schema collection (an XSD which has been loaded into the SQL Server).</p>
<p>The syntax to create a Message Type is pretty basic.</p>
<p><code>CREATE MESSAGE TYPE [MessageTypeName]<br />
VALIDATION = NONE</code></p>
<p>That&#8217;s it.  If you need to change the schema use the AUTHORIZATION clause to set the owner of the object.</p>
<p>When using the validation of NONE it is up to the receiving code or application to verify that the data within the message exists and is valid.</p>
<p>Denny</p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-service-broker-message-types/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Any other DBAs brave enough to go to EMC World?</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/any-other-dbas-brave-enough-to-go-to-emc-world/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/any-other-dbas-brave-enough-to-go-to-emc-world/#comments</comments>
		<pubDate>Wed, 14 May 2008 08:00:00 +0000</pubDate>
		<dc:creator>mrdenny</dc:creator>
		
		<category><![CDATA[Storage]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/any-other-dbas-brave-enough-to-go-to-emc-world/</guid>
		<description><![CDATA[Next week I&#8217;ll be stepping into the lion&#8217;s den of sorts.  I&#8217;ll be off to Las Vegas to attend EMC World.  I went last year, and I&#8217;m pretty sure that I was about the only full time DBA there.  The storage folks treated me pretty nice, even after they found out that I was a [...]]]></description>
			<content:encoded><![CDATA[<p>Next week I&#8217;ll be stepping into the lion&#8217;s den of sorts.  I&#8217;ll be off to Las Vegas to attend EMC World.  I went last year, and I&#8217;m pretty sure that I was about the only full time DBA there.  The storage folks treated me pretty nice, even after they found out that I was a DBA.</p>
<p>Hopefully when I get back I&#8217;ll have all sorts of new storage tips and tricks to share with everyone.</p>
<p>If anyone else if brave enough to attend let me know here.  Maybe we can meet up at one of the events.</p>
<p>Denny</p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/any-other-dbas-brave-enough-to-go-to-emc-world/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Data Normalization, with storage being so cheap what&#8217;s the point?</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/data-normalization-with-storage-being-so-cheap-whats-the-point/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/data-normalization-with-storage-being-so-cheap-whats-the-point/#comments</comments>
		<pubDate>Mon, 12 May 2008 09:00:25 +0000</pubDate>
		<dc:creator>mrdenny</dc:creator>
		
		<category><![CDATA[Data Normalization]]></category>

		<category><![CDATA[Data integrity]]></category>

		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/data-normalization-with-storage-being-so-cheap-whats-the-point/</guid>
		<description><![CDATA[Back in the old days one of the big reasons that people enforced such strict rules on data normalization was because it would greatly increase the amount of information you could fit on the hard drive.  Back when everything was measured in kilobytes or megabytes storing redundant information simply wasn't an option.  You had to be able to cram as much information into that little database.]]></description>
			<content:encoded><![CDATA[<p>Back in the old days one of the big reasons that people enforced such strict rules on data normalization was because it would greatly increase the amount of information you could fit on the hard drive.  Back when everything was measured in kilobytes or megabytes storing redundant information simply wasn&#8217;t an option.  You had to be able to cram as much information into that little database.</p>
<p>These days space isn&#8217;t the issue.  Storage is very cheep these days, and if you have the money you can get absolutely massive amounts of storage.  1 TB hard drives are easily found, and when you start talking about RAIDing drives together the storage limits start to become just insane.  100 TB of storage just isn&#8217;t what it used to be.</p>
<p>The problem now becomes that with so much data for the database platform to search through we need to make sure that the indexes which SQL Server is searching as as small as possible so that we can get those indexes read from the disk and into memory as quickly as possible.</p>
<p>Say we have an Employee table which looks like this.</p>
<p><code>CREATE TABLE Employee<br />
(EmployeeId INT,<br />
FirstName NVARCHAR(50),<br />
LastName NVARCHAR(50),<br />
Department NVARCHAR(100),<br />
Manager_First_Name NVARCHAR(50),<br />
Manager_Last_Name NVARCHAR(50),<br />
Location NVARCHAR(50),<br />
Active VARCHAR(5))</code></p>
<p>Now this table is clearly not setup as a normalized table.  <em>We are assuming that this table has best case indexing.</em>  If we have 1000 employees records and we are going to search the Department column the index must be read from disk.  Now assuming that the department names are nice long bureaucratic names which average 30 characters each we have about 30000 bytes (more if you take the fill factor into account) which needs to be read from the disk.  Now if we had a relational version of the table.</p>
<p><code>CREATE TABLE Employee<br />
(EmployeeId INT,<br />
FirstName NVARCHAR(50),<br />
LastName NVARCHAR(50),<br />
DepartmentID INT,<br />
ManagerEmployeeID INT,<br />
LocationId INT,<br />
Active BIT)</code></p>
<p>When we search the Employee table we now are only loading an integer value from the disk into memory. This means that we only have to load 8000 bytes of data from the disk into memory. Now knowing that SQL Server reads data from the disk in 8k blocks even with a 50% fill factor the index only takes 2 blocks on the disk and can then be completed in two read operations to the disk. Now our original table with no fill factor will require 30 data pages (20.297 to be specific), about 60 if we use the same fill factor.</p>
<p>With tables of this size this isn&#8217;t much. But as your database grows the number of additional data pages which would have to be read for a simple search of the table grows exponentially.</p>
<p>Denny</p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/data-normalization-with-storage-being-so-cheap-whats-the-point/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Back To Basics: The SQL Server Service Broker</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-the-sql-server-service-broker/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-the-sql-server-service-broker/#comments</comments>
		<pubDate>Thu, 08 May 2008 11:00:39 +0000</pubDate>
		<dc:creator>mrdenny</dc:creator>
		
		<category><![CDATA[SQL]]></category>

		<category><![CDATA[Service Broker]]></category>

		<category><![CDATA[Back To Basics]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-the-sql-server-service-broker/</guid>
		<description><![CDATA[The SQL Server Service Broker is a fantastic new addition to SQL Server.  For those who have used Microsoft Message Queue (MSMQ) the service broker will be easy to understand as it's the same basic concept.  Messages are sent from one place to another, within a database, from database to database, or from server to server.]]></description>
			<content:encoded><![CDATA[<p>The SQL Server Service Broker is a fantastic new addition to SQL Server.  For those who have used Microsoft Message Queue (MSMQ) the service broker will be easy to understand as it&#8217;s the same basic concept.  Messages are sent from one place to another, within a database, from database to database, or from server to server.</p>
<p> While the configuration can be a daunting task, once the service broker is setup it is a very solid system which can handle a large message load.</p>
<p>The Service Broker give you guaranteed delivery order, with single processing of messages always in the order received.  Messages can be processed on demand (you write software which queries the service broker on a schedule) or automatically via the queue activation.</p>
<p>Check back for information about all the various service broker object an how to configure each of them.</p>
<p>Denny</p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-the-sql-server-service-broker/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Quest Meet the Expert Video published</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/quest-meet-the-expert-video-published/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/quest-meet-the-expert-video-published/#comments</comments>
		<pubDate>Thu, 08 May 2008 04:04:21 +0000</pubDate>
		<dc:creator>mrdenny</dc:creator>
		
		<category><![CDATA[Video]]></category>

		<category><![CDATA[Queue]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/quest-meet-the-expert-video-published/</guid>
		<description><![CDATA[Quest Software has just published the first of a few videos which I recorded with them.
You can download or view the video from here.
I&#8217;ve got to tell you, I had an absolute blast recording the video.
Denny
]]></description>
			<content:encoded><![CDATA[<p>Quest Software has just published the first of a few videos which I recorded with them.</p>
<p>You can download or view the video from <a href="http://www.quest.com/sql-server/video/SQL-Break_Christian-and-Denny.wmv" title="Anarchy Media Player - Right click to download file"><em>here</em></a>.</p>
<p>I&#8217;ve got to tell you, I had an absolute blast recording the video.</p>
<p>Denny</p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/quest-meet-the-expert-video-published/feed/</wfw:commentRss>
<enclosure url="http://www.quest.com/sql-server/video/SQL-Break_Christian-and-Denny.wmv" length="31031381" type="video/x-ms-wmv" />
		</item>
		<item>
		<title>I&#8217;ll be speaking at the Inland Empire .Net User Group</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/ill-be-speaking-at-the-inland-empire-net-user-group/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/ill-be-speaking-at-the-inland-empire-net-user-group/#comments</comments>
		<pubDate>Mon, 05 May 2008 09:00:19 +0000</pubDate>
		<dc:creator>mrdenny</dc:creator>
		
		<category><![CDATA[In Person Events]]></category>

		<category><![CDATA[Query tuning]]></category>

		<category><![CDATA[Resource Governor]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/ill-be-speaking-at-the-inland-empire-net-user-group/</guid>
		<description><![CDATA[The nice folks at the Inland Empire .NET User Group have invited me to come and speak to them.  Read on to see the topics.]]></description>
			<content:encoded><![CDATA[<p>The nice folks at the <a href="http://www.iedotnetug.org" title="Inland Empire .NET User Group">Inland Empire .NET User Group</a> have invited me to come and speak to them.  This is a great speaking opportunity for me as they are about 20 minutes from my house.</p>
<p>I won&#8217;t be speaking there until December 9, 2008 (it&#8217;s amazing just how far in advance some of this stuff gets scheduled).</p>
<p>I&#8217;ll be giving two presentations at the meeting.  The first will be the ever popular Query Tuning, and the second will be a talk on the SQL Server 2008 Resource Governor.  The address and directions to the meeting can be found on the <a target="_blank" href="http://www.iedotnetug.org" title="IE .NET User Group">IE .NET User Group</a> web site.  If you are going to attend there meetings they have an RSVP link on the site.</p>
<p>I&#8217;ll post about this meeting again closer to the meeting.</p>
<p>Denny</p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/ill-be-speaking-at-the-inland-empire-net-user-group/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Checking the cached execution plans</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/checking-the-cached-execution-plans/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/checking-the-cached-execution-plans/#comments</comments>
		<pubDate>Thu, 01 May 2008 09:00:53 +0000</pubDate>
		<dc:creator>mrdenny</dc:creator>
		
		<category><![CDATA[Cache]]></category>

		<category><![CDATA[Query tuning]]></category>

		<category><![CDATA[SQL Server 2005]]></category>

		<category><![CDATA[sys.dm_exec_cached_plans]]></category>

		<category><![CDATA[sys.dm_exec_requests]]></category>

		<category><![CDATA[sys.dm_exec_query_plan]]></category>

		<category><![CDATA[sys.dm_exec_plan_attributes]]></category>

		<category><![CDATA[Execution Plan]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/checking-the-cached-execution-plans/</guid>
		<description><![CDATA[We are going to take a look into sys.dm_exec_cached_plans, sys.dm_exec_requests, sys.dm_exec_query_plan, and sys.dm_exec_plan_attributes.]]></description>
			<content:encoded><![CDATA[<p>As we all know SQL Server, will for good or bad, cache execution plans.  Up until now it&#8217;s been very tough to see the cached execution plans.  You pretty much had to grab the query or procedure (with the parameters) and run it with Query Analyzer and have it return the execution plan.  The only other option was to use SQL Profiler to capture the query along with the execution plan which it used.</p>
<p> Starting in SQL Server 2005 you now have the ability to query the system catalog and see what query plans are stored in the cache, as well as the queries which trigger that plan to be used, as well as how many times that cached plan has been used.</p>
<p>The first DMV to look at is sys.dm_exec_cached_plans.  This DMV gives you the size of the plan, the handle of the plan (which is binary), and the number of times the plan has been used.</p>
<p>The next DMV to look at is sys.dm_exec_requests.  This DMV gives you the currently running processes, wait information, all the session settings for the processes, etc.  It also includes the handle for all the plans which are currently being run.  If you join this sys.dm_exec_requests to sys.dm_exec_cached_plans you can see exactly which processes are using which plans.  Because this shows you the spid (the session_id column) and the plan_handle you can see what users are running which commands.</p>
<p>The next object is a system table function called sys.dm_exec_query_plan.  This function accepts a single input parameter of a plan handle.  There are several columns in the output, the most important of which is the query_plan.  This is the actual xml plan which is stored in the SQL Server.</p>
<p>The last object we&#8217;ll be looking at is the sys.dm_exec_plan_attributes table function.  This function also accepts a single input parameter of a plan handle.  This function returns the various session settings which were in place when the plan was created.  This is important information to have when working with query plans, as changing a single ANSI connection setting will force SQL to create a new execution plan.</p>
<p>Don&#8217;t forget how to <a target="_blank" href="http://itknowledgeexchange.techtarget.com/sql-server/easy-way-to-read-xml-execution-plans/" title="Easy Way to Read XML Execution Plans">view the XML execution plan in the UI</a>.</p>
<p>Denny</p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/checking-the-cached-execution-plans/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Checking free disk space from T/SQL</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/checking-free-disk-space-from-tsql/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/checking-free-disk-space-from-tsql/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 09:00:34 +0000</pubDate>
		<dc:creator>mrdenny</dc:creator>
		
		<category><![CDATA[T/SQL]]></category>

		<category><![CDATA[xp_fixeddrives]]></category>

		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/checking-free-disk-space-from-tsql/</guid>
		<description><![CDATA[I've seen some very creative ways to see how much free disk space SQL Servers have.  Most make use of xp_cmdshell which some very complex dos commands or vbscripts.  Here is a much, much simpler one.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve seen some very creative ways to see how much free disk space SQL Servers have.  Most make use of xp_cmdshell which some very complex dos commands or vbscripts.</p>
<p>However there is a much easier way.  Microsoft has included the system extended stored procedure xp_fixeddrives.  It returns the all the fixed drives and the amount of free space in megs.</p>
<p>Denny</p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/checking-free-disk-space-from-tsql/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My ERRORLOG shows some spids have an &#8217;s&#8217; after them.  What&#8217;s going on?</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/my-errorlog-shows-some-spids-have-an-s-after-them-whats-going-on/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/my-errorlog-shows-some-spids-have-an-s-after-them-whats-going-on/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 12:23:31 +0000</pubDate>
		<dc:creator>mrdenny</dc:creator>
		
		<category><![CDATA[SQL]]></category>

		<category><![CDATA[sp_who3]]></category>

		<category><![CDATA[ERRORLOG]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/my-errorlog-shows-some-spids-have-an-s-after-them-whats-going-on/</guid>
		<description><![CDATA[Starting in SQL Server 2005 system processes no longer need to run with SPIDs less than 50.  Because of this, Microsoft has decided to make live easier when trying to identify the system processes above 50 by putting the s after the SPID number in the logs.]]></description>
			<content:encoded><![CDATA[<p>That &#8220;s&#8221; is new in SQL Server 2005.  It means that the SPID is a system process.  For example my database is having a problem with tempdb running out of space for no reason.  When I look in the log I see that SPID 118s is the offending SPID.  When I watch SPID 118 using <a target="_blank" href="http://itknowledgeexchange.techtarget.com/sql-server/upgrade-for-sp_who2-called-sp_who3/" title="sp_who3 post">sp_who3</a> I see that the output looks a little strange.  I see a lot of CPU and disk load and that the thread and been logged in for ever using the sa account but with no hostname, host process, or mac address listed.  This is because this is the service broker process which is what runs the activated procedures.  Starting in SQL Server 2005 system processes no longer need to run with SPIDs less than 50.  Because of this, Microsoft has decided to make live easier when trying to identify the system processes by putting the s after the SPID number in the logs.</p>
<p>This same information appears to hold true for SQL Sever 2008 (so far at least).</p>
<p>Denny</p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/my-errorlog-shows-some-spids-have-an-s-after-them-whats-going-on/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Back To Basics: The DELETE Statement</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-the-delete-statement/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-the-delete-statement/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 09:00:34 +0000</pubDate>
		<dc:creator>mrdenny</dc:creator>
		
		<category><![CDATA[SQL]]></category>

		<category><![CDATA[DELETE]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-the-delete-statement/</guid>
		<description><![CDATA[When you have data in your table that you need to remove the DELETE statement is the way to do that.]]></description>
			<content:encoded><![CDATA[<p>When you have data in your table that you need to remove the DELETE statement is the way to do that.  Using the DELETE statement without any WHERE clause will remove all the data from your table.  The WHERE clause works the same way as the WHERE clause for SELECT and UPDATE statements.</p>
<p><code>DELETE FROM Employee<br />
WHERE EmployeeId = 4</code></p>
<p>You can also JOIN to a table when you delete data from a table which allows you to use the second table within the filter.  This requires a slightly different syntax than your normal DELETE syntax.</p>
<p><code>DELETE e<br />
FROM Employee e<br />
JOIN Department ON Employee.DepartmentId = Department.DepartmentId<br />
  AND Department.DepartmentName = &#8216;Sales&#8217;</code></p>
<p>As you can see you need to set an alias for the table you are deleting from, and put that alias between the DELETE and FROM words.</p>
<p>Denny</p>
<p>P.S. Sorry this didn&#8217;t come up sooner, I could have sworn that I wrote it and published it back when I started the series.</p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-the-delete-statement/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
