Editorial question54.6K views642 votes0 answers1,502 following
AI-generatedALTER TABLE SWITCH rollback behavior with active referencing transactions
Transactional DDL in SQL Server generally allows most CREATE, ALTER and DROP statements to be rolled back inside an explicit user transaction. Partition switching via ALTER TABLE ... SWITCH is a metadata operation intended to move data between partitions with minimal logging. The design question is whether the switch remains fully rollback safe when active t