Why is SQL Server deprecating SET ANSI_PADDING OFF?
Asked Answered
R

2

13

According to MSDN BOL (Books Online) on SET ANSI_PADDING,

In a future version of Microsoft SQL Server ANSI_PADDING will always be ON and any applications that explicitly set the option to OFF will produce an error. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

I have never used this option but it looks like it can actually save a lot of database spaces for char and varbinary fields if used correctly.

Why is SET ANSI_PADDING becoming obsolete, other than the fact that it is not ANSI-compliant?

Are there any good reasons why?

Restore answered 12/9, 2009 at 17:51 Comment(0)
D
12

Not an answer, just an opinion:

I personally would like to believe they're removing it because it's a nulling pain in the null. If one database object is created, used, referenced, or whatever with it ON, a second one is done so with it OFF, and you try to work with both at the same time (two tables, procedure referencing table, etc.), your results may be inconsistant or may not make sense, and it will take you Forever to figure out what's going on.

(There are other SET settings like this, and worse. I hope they deprecate them all.)

Donal answered 12/9, 2009 at 18:57 Comment(1)
Well your opinion makes sense for me as an answer ;) Thanks PhilipRestore
C
5

That feature wasn't used at all and it isn't ANSI compliant also, so they will remove it. The space saving on can be done regardless of ansi_padding, sql server can remove the padding internally.

Coligny answered 12/9, 2009 at 17:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.