Script for SQL Server 2008~2017 to help some devs and admin to do this work
In some cases, for some reason we or other people in our team make bad choose with data type in design time of some objects and later we need make some fix. This is a very hard work to do manually, because in some enviroments we may have some tables, but in other inviroments we can have hundreds of objects (ie. Tables, index, views, store procedures, functions, etc) and some help perhaps these cases is its not a bad idea.
- Index.
- Check constraint.
- Cefault constraint.
- Check constraint.
- Foreign keys.
With this information you can make a preview of workaround that you will do.