Monthly Archives: November 2007

SQL Server 2008 Nov CTP Released

The November CTP for SQL Server 2008 has been released: http://www.microsoft.com/downloads/details.aspx?FamilyId=3BF4C5CA-B905-4EBC-8901-1D4C1D1DA884&displaylang=en

Posted in SQL Server Administration | 9 Comments

List statistics and date updated

The following query will list all the statistics in the current database, and the date they were lasted updated. SELECT object_name(object_id) as tablename, name AS index_name, STATS_DATE(object_id, stats_id) AS statistics_update_date FROM sys.stats WHERE object_id > 1000 ORDER BY object_name(object_id), STATS_DATE(object_id, … Continue reading

Posted in SQL Server Administration | 6 Comments

Sorting uniqueidentifiers in SQL Server 2005

I had an issue recently where I needed to sort on a uniqueidentifier column and read the data in .Net. I found that .Net sorts Guids differently than SQL Server. You can see for yourself. Run the following code. DECLARE … Continue reading

Posted in SQL Server Development | 12 Comments

Are Foreign Keys Bad?

The Problem Mike Simpson’s post on foreign keys raises some good points: http://www.slipjig.org/Mike/post/2007/11/Are-Foreign-Keys-Bad–You-Decide!.aspx. The main issue raised is how foreign keys cause deadlocks. In order to avoid deadlocks, you have to acquire locks on records in the same order, always. … Continue reading

Posted in SQL Server Development | 19 Comments

Hello world!

I thought that blogs would be a fad, but it seems to have out lasted the fad stage   I use blogs everyday in my work looking for answers that other people have already seen and answered.  I hope with … Continue reading

Posted in Uncategorized | 5 Comments