Sample Header Ad - 728x90

Are there best practices for SQL Server blue/green deployment?

5 votes
1 answer
509 views
Is it possible to spin up the new instance with the same structure and replicate all the data there, then perform some long running blocking operations that actually do not perform incompatible changes (for example change bigint to int or nvarchar to varchar if the types were chosen incorrectly), sync the data and then perform the connection switch in the application? There will always be writes to the main database, so all the data will need to be synced to the new instance. And there could be some downtime, but not very big, let's say ~10 minutes. What approach could be used for that? The edition of SQL Server is Enterprise. Our main use case would be to change the data type on the PK of the very large tables. There are hundreds of millions of records in several pretty wide tables where this change should be made. The expected downtime is a way more than 10 minutes, it is hours and hours and we can't afford such downtime.
Asked by Dmitrij Kultasev (191 rep)
Dec 6, 2024, 06:45 AM
Last activity: Dec 9, 2024, 10:03 PM