When using the alter script capability, the script that is generated, has some fundamental issues. Say we add a single new column to a fact table (dimensional modeling).
The script basically follows this pattern:
- Generates a whole new copy, with a different name
- Does a select insert, into the new table.
- Drops the old table.
- Renames the new table to the original name.
There are a number of issues with this:
Default object with the same name cannot exist in the same DB.
Copying all that data takes forever.
There are a lot of places for errors to occur, when creating a whole new table. What if one of the objects does not generated. Weve now lost it forever.
What it should do, is alter the table, and add the new column, with a default value.
Is there a way to modify this behavior or does this have to be addressed as an enhancement request?
Alter Script Example.txt (1.42 KB)