We have 40TB size SQL Server 2016 database. we have tables with 100+ billion rows per table which are partitioned. The older partitions are read only and new partitions are Read write. Recently for few tables, one of the column is defined as integer and the value is reaching maximum and we need to convert this column datatype to bigint.
Any suggestions how easily we can convert this column to bigint?
our database is quite during the day and we need to find a way to convert these table column to bigint.
1 Answer 1
Any suggestions how easily we can convert this column to bigint?
https://www.brentozar.com/archive/2020/04/video-altering-datatypes-with-almost-no-downtime/
ALTER TABLE YourTable ALTER COLUMN YourColumn bigint NOT NULL
does that not work?