Forum Discussion
Evangeline
Mar 26, 2026Copper Contributor
SQL Migration from SQL2017 to SQL2022
AG1: Win OS 2016, SQL 2017 AG2: Win OS 2019, SQL 2022 We are trying to migrate database from AG1 to AG2 via distributed AG. As the database is on different version, the status of the db on AG2 will...
deepeshd87
Apr 20, 2026Copper Contributor
- Run DBCC CheckDB on AG1.If AG1 passes CHECKDB, any page corruption on AG2 would surface as redo errors in the SQL error log.
- Monitor Error logs and track for error number 824 and 829. If there is any corruption, these errors will be thrown.
- Monitor synchronization health on AG2
SELECT db_name(drs.database_id) AS DatabaseName, drs.synchronization_state_desc, drs.synchronization_health_desc, drs.log_send_queue_size, drs.log_send_rate, drs.redo_queue_size, drs.redo_rate, drs.last_redone_lsn, drs.last_hardened_lsn, drs.last_received_lsn FROM sys.dm_hadr_database_replica_states drs JOIN sys.availability_replicas ar ON drs.replica_id = ar.replica_id WHERE db_name(drs.database_id) = 'YourDatabaseName';4. Take a backup on AG1 and restore it on sql 2022 which is not in AG. Run DBCC CheckDB.
The standalone SQL 2022 restore and DBCC CHECKDB approach is the best approach.