I have a problem modifying a table in SQL Server 2012, to add the 04 columns allowed NULL, I need a large table with 340 columns and approximately 166 M rows and 01 non-clustered index
When recovering from this problem, only a specific table occurs. I am waiting for execution within 10 hours, but it is not finished, so I must cancel it for further investigation. This is so weird because the script is really simple, as shown below, and we have done it successfully before:
alter table sample_database.sample_schema.sample_table
add column_001 int null
,column_002 numeric(18,4) null
,column_003 nvarchar(500) null
,column_004 int null;
My questions:
- Why is this happening weird?
- How to solve this because it is related to our deployment package? We made a workaround like creating a new table with new columns and loading data. But that will not work for us.
- How to prevent this problem in the future?
Many thanks,
source
share