I have a table that has close to 20 million records. On this table one of the column needs to be changed from number to char.
I am doing the following to make the column change:
- create a bakup table
- delete the values from the column in question of the original table
- change the column to char
- update the column from the backup table using the primary key
Now I get the following problems:
1. The table gets locked
3. Server gets loaded and locks up the database
2. The data might get currupted due to hanged session
Now what would be the best way to make this change smootly and without loading up the server and locking up the database.