Open HamsterExAstris opened 3 months ago
This could also be accomplished with the ELEVATE_ONLINE database scoped configuration setting: https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-database-scoped-configuration-transact-sql?view=sql-server-ver16#elevate_online---off--when_supported--fail_unsupported-
Is your feature request related to a problem? Please describe. SQL Server Enterprise Edition and Azure SQL support the concept of "online" schema operations, which perform the operations more slowly but with shorter locking periods. I would like to have the option for
sqlpackage
to generate scripts that take advantage of this functionality where possible forALTER COLUMN
commands.Describe the solution you'd like Either when
/p:PerformIndexOperationsOnline
or a new parameter is enabled, emitWITH (ONLINE = ON)
when scripting eligibleALTER COLUMN
commands.Describe alternatives you've considered A custom deployment contributor that finds eligible operations and updates the SQL before being emitted, similar to the one linked here for index operations.
Additional context
27 provided support for
WITH (ONLINE = ON)
for index operations. Per the documentation,ALTER COLUMN
supports it as well, but enabling/p:PerformIndexOperationsOnline
only enables it for index operations, notALTER COLUMN
.