When you use SQL Server Management Studio to generate a script for creating a table, the last thing it does is set ansi_padding off.
I’ve run into a problem where this statement is causing an issue further down the line when working with xml.
The error message implies that the ansi_padding must be on when using the XQuery features, and googling confirms. However, I’d really like to see some official documentation stating this as a requirement, to make sure there isn’t anything else we’re taking for granted.
I understand the implications of this option and have since removed the statement, but I still want to know:
Is ansi_padding ‘on’ officially required for working with xml columns in SQL Server?
Yes, it is officially required.
http://msdn.microsoft.com/en-us/library/ms188285.aspx
Quoted from above link: