Is there a way to change the values ​​for FixedLenNullInSource and TrimTrailingBlanks?

Is there a way to change the values ​​for FixedLenNullInSource and TrimTrailingBlanks ?

I use sp_help to compare results from different servers to see if the tables are identical. FixedLenNullInSource and TrimTrailingBlanks discard my comparisons.

+3
source share
1 answer

TrimTrailingBlanks refers to the SET ANSI_PADDING when creating a table. Perhaps you can change this without recreating the entire table, similar to my answer here to change the ANSI_NULL parameter.

Otherwise, you will need to recreate the table with the selected semantics.

Looking for sp_help definition

  'FixedLenNullInSource' = CASE WHEN Type_name(system_type_id) NOT IN ( 'varbinary', 'varchar', 'binary', 'char' ) THEN '(n/a)' WHEN is_nullable = 0 THEN @no ELSE @yes END 

therefore, for FixedLenNullInSource different values ​​are displayed, just indicate that the nullability value of the column is different and that this is one of the 4 specified data types. You will need to fix this with ALTER TABLE ... ALTER COLUMN

You are probably much better off using a third-party tool to compare databases such as Redgate SQL Compare or SQL Server Data Tools, or even just query sys.tables and sys.columns yourself, rather than using sp_help .

+3
source

All Articles