Monthly Archives: June 2007

Smo issue when generating drop default constraint script

In SQL Server 2005, using the following code to script out dropping default constraints, it always fails with the following exception:  Exception: {"Script failed for DefaultConstraint ‘DF_Employee_VacationHours’. "} InnerException: {"Object reference not set to an instance of an object."} using … Continue reading

Posted in SQL Server 2005 SMO | 1 Comment

Alter column for an xml data type may cause row size exceeds limit

When changing a large data type column (e.g. xml data type) in a table several times, you may get the an error saying that row size exceeds the 8060 limit. CREATE TABELE dbo.XmlData ( id int identity not null, xmlData … Continue reading

Posted in SQL server 2005 | Leave a comment