Cannot insert the value null into column ‘diagram_id’, table dbo.sysdiagrams

When ever I copy the database from the production server to the development machine the database throws an error when updating a database diagram or creating a new database diagram. The error in question is The solution to this problem is rather simple go to dbo.sysdiagram table and set change the diagram_id default value to … Read more

NTEXT vs NVARCHAR(MAX) in SQL 2005

I recently profiled a sproc that makes heavy use of the TSQL SUBSTRING function (hundreds of thousands of times) to see how it performs on a SQL 2005 database compared to a SQL 2000 database. Much to my surprise the SQL 2005 database performed worse…dramatically worse than SQL 2000. After much researching it turns out … Read more