Retrieve Deadlock Info with SQL Server 2008

Did you know that SQL Server 2008 has the ability to retrieve deadlock information after the fact without having previously enabled any additional tracing?  It’s part of the new advanced troubleshooting feature called Extended Events. Here’s a SQL query from Jonathan Kehayias which retrieves SQL Server 2008 deadlock information:

select CAST( REPLACE( REPLACE(XEventData.XEvent.value(‘(data/value)[1]’, ‘varchar(max)’), ”, ”), ”,”) as xml) as DeadlockGraph FROM (select CAST(target_data as xml) as TargetData from sys.dm_xe_session_targets st join sys.dm_xe_sessions s on s.address = st.event_session_address where name = ‘system_health’) AS Data CROSS APPLY TargetData.nodes (‘//RingBufferTarget/event’) AS XEventData (XEvent) where XEventData.XEvent.value(‘@name’, ‘varchar(4000)’) = ‘xml_deadlock_report’

More info. here: Using SQL Server 2008 Extended Events

ClearTrace for SQL Server 2008

I blogged about ClearTrace a while back. There’s a new version available that targets SQL Server 2008 (as well as SQL Server 2005). Download here. It’s a useful tool and the improved performance loading large trace files is a bonus.

Perth .NET User Group Meeting: When should ASP.NET Developers leverage the SharePoint Platform?

Join us at the Perth .NET User Group, Thurs July 2nd to hear Jeremy Thake answer a common question: Is SharePoint is the correct choice as a base platform for a solution? Jeremy Thake will present the advantages (and disadvantages) of leveraging the SharePoint Platform. Some lines in the sand will be drawn to make it easier to make the decision early on the project based on real world experience gathered by Jeremy from the SharePoint community.

TOPIC: When should ASP.NET Developers leverage the SharePoint Platform?
DATE: Thursday, July 2nd, 5:30pm
VENUE: Excom, Ground Floor, 23 Barrack Street, Perth
COST: Free. All welcome

More details here.

SQL Server 2005 and 2008 – Backup, Integrity Check and Index Optimization

Ola Hallengren has updated his SQL Server maintenance scripts with several new features:

  • Rebuild and reorganize partitioned indexes on the partition level in IndexOptimize. Just set the new parameter @PartitionLevel = ‘Y’.
  • Exclusion of indexes on read-only filegroups in IndexOptimize.
  • Use LiteSpeed compression in DatabaseBackup. Just set the new parameter @BackupSoftware = ‘LITESPEED’.
  • New feature to run the stored procedures without executing the commands. Just use the parameter @Execute = ‘N’.
  • The solution now works on all builds and editions of SQL Server 2005 and SQL Server 2008

Well worth checking out.

.NET HTML Agility Pack

Ever needed a HTML parser that is very tolerant of “real world” malformed HTML, builds a read/writable DOM and supports plain XPATH or XSLT? Sounds like the HTML Agility Pack .NET library. The object model is very similar to XmlDocument.

Among the myriad of possible applications, it can be used for page fixups, generating pages, web scrapers, etc.

Troubleshoot SQL Server Connectivity Problems: PortQryUI

If you want a quick and easy way to check SQL Server connectivity, without resorting to the full blown functionality of WireShark (or similiar), you can use Microsoft’s PortQryUI utility to troubleshoot TCP/IP connectivity problems. PortQryUI is a GUI on top of the PortQry command line tool, with predefined groups of ports to scan. One of the these groups targets SQL Server, which consists of UDP port 1434 and TCP port 1433. To check these ports, enter the IP address (or fully qualified domain name) of the target SQL Server instance, select SQL Service in the ‘Service to Query’ drop-down box and click the Query button.

If the ports are OK, the utility will list the ports as Listening. Otherwise, it will tell you the ports are being Filtered or are Not Listening.

You can download PortQryUI from here: PortQryUI – User Interface for the PortQry Command Line Port Scanner.

IIS Search Engine Optimization Toolkit Beta

Microsoft have announced the Beta version of the IIS Search Engine Optimization (SEO) Toolkit, over at the official Microsoft IIS site (www.iis.net):

The IIS Search Engine Optimization (SEO) Toolkit helps Web developers, hosting
providers, and Web server administrators to improve their Web site’s relevance
in search results by recommending how to make the site content more search
engine-friendly. The IIS SEO Toolkit includes the Site Analysis module, the
Robots Exclusion module, and the Sitemaps and Site Indexes module, which let you
perform detailed analysis and offer recommendations and editing tools for
managing your Robots and Sitemaps.

Windows Experience Index

Here’s a screenshot of my new PC’s index score running Windows 7 64 Bit Ultimate (I was a little disappointed by the disk score…):