Project Server undocumented reserved keyword

I work with Microsoft Project Server 2010 and found that there are some undocumented limitations. We needed to add a new ECF (Enterprise Custom Field) and named it to ParentProjectUID. This should work without any problem, but it does not! I think it is a reserved keyword for future usage or because of the [dbo].[MSP_EpmInternalProjectHierarchies] table which has a column called ParentProjectUID. Repro steps: Create an ECF custom field and name it to ParentProjectUID.  create... [More]

Damerau–Levenshtein distance in SQL

Couple of years ago I needed to implement a kind of fuzzy matching algorithm in SQL Server. Today I have just found my code I implemented it in SQL 2005 and it works on newer versions as well. Code is based on the Damerau–Levenshtein distance algorithm. I was using a SQL CLR user defined scalar function: inputs are 2 strings and returns a number between 0 and 1. If it is more close to 1 it means the two input strings are closer to each other. Of course SSIS Fuzzy Lookup Transformation may work b... [More]

Lock escalation on partitioned tables

Locking is a necessary thing for better concurrency. SQL Server manages its locks automatically. In general: when a statement issues about 5000 locks on a single table or index, lock manager issues an escalation. Lock escaltion details can be found in BOL at here: http://msdn.microsoft.com/en-us/library/ms184286.aspx What if I have partitioned table? Do I really need to lock the whole table or index? I believe, most of the cases, answer is no. It may be enough to lock that particular ... [More]