This is a utility to show how well your column sizes suit your data (or vice versa)..
By default, the script will run for every table in the database you run it in.
This may prove quite time consuming so set the @SCHEMA and @TABLE variables at the top of the script to the schema and table name respectively to analyse only one table.
The output is fairly self explanatory i.e. the name of the name, it's rowcount and column details.
For each column, 3 length values are given (where appropriate)
- COLUMN_MAX_LENGTH is the defined length of the column.
- DATA_MIN_LENGTH is the lengthof the smallest data found in the column
- DATA_MAX_LENGTH is the length of the largest data found in the column
I had fun creating it, I hope someone (who isn't using SSIS 2008 Data Profiler!) finds it useful.