|
|
|
SSCertifiable
       
Group: Moderators
Last Login: Tuesday, June 11, 2013 6:34 AM
Points: 6,463,
Visits: 1,388
|
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 8:55 AM
Points: 223,
Visits: 102
|
|
Adding a column in a hurry without doing checks!
Been there! Done that! and will NEVER DO IT AGAIN! It can cause total destruction and cost you more time in the end.
Andy.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, June 07, 2007 3:19 AM
Points: 2,
Visits: 1
|
|
Great article! This handy checklist will save me a lot of time - thanks!
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 1:21 AM
Points: 2,764,
Visits: 1,439
|
|
How about checking to see if the new column is actually needed? Look at the design of what is there already and ask if it can encompass the need without the adding the extra column. A good example of this is the need to add BIT columns. As you can't index them anyway you may as well have a generic Flags field as an integer and use a bit pattern. This way your existing design allows for additional flags (bits) at a later date. I'm just auditing an external application and it appears that there are at least 4 ways of marking a record as being restricted from public viewing. It looks like the database was built by 4 natural antagonists with a dislike for computers.
LinkedIn Profile
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Thursday, June 06, 2013 9:12 AM
Points: 6,260,
Visits: 1,980
|
|
VERY NICE ! I wish my boss would read it every time I am asked to add one and "it shouldn't take me more than a couple of seconds" comes after that 
* Noel
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Tuesday, June 27, 2006 12:41 PM
Points: 29,
Visits: 1
|
|
I end up scripting just the CREATE component of all views, pocs, functions and then replacint CREATE with ALTER and runing the script in QA to incorporate all column references because it seems like the columns in a view are stored as a positional reference to the column order in the related table, rather than to a table_name.field_name reference. Does the sp_refreshviews do the same thing?
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 1:21 AM
Points: 2,764,
Visits: 1,439
|
|
sp_refreshview recompiles the view which achieves the same thing as running an ALTER statement
LinkedIn Profile
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Tuesday, May 21, 2013 8:38 AM
Points: 1,032,
Visits: 390
|
|
How about "Does the column make sense logically?" i.e. will the column take my BCNF table(s) and turn them into an unnormalized mess of redundancy and inconsistency? This, of course, assumes that the database was designed properly in the first place.
/*****************
If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek
*****************/
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Wednesday, January 23, 2013 11:08 AM
Points: 223,
Visits: 82
|
|
What about DTS packages? I've had developers add columns and forget to tell me, then they wonder why things aren't working correctly when we push to production. Maddening. Cheers,
-m
|
|
|
|