Use this script to see showcontig for all tables in the context of the database in which its called. Very handy to schedule during off peak hours prior to any re-indexing to see how bad things are and re-build certain indexes sooner than you thought for peak performance.
This will show the fragmentation and stats before and after a reindex of a specified table. Run in the context for the db that holds the table the proc will get passed and re-index. Complile in master since the master is checked first for any SP that is prefixed with SP_ and you can call […]
When loading data, nothing can be more frustrating than having to deal with stubborn constraints and triggers. This is especially true when you know your data is fine but the constraints are too prohibitive for a mass initial load. Here's a technique I use to disable the constraints and triggers temporarily during a mass load. […]