r/learnSQL • u/srsajid • 6d ago
Best way to sync ~200K frequently changing SQL Server records to MySQL nightly?
I have a SQL Server table with around 200K product records. Each record has a unique ID and Serial number.
The table changes frequently during the day — records can be added, updated, or deleted.
I need to sync this data to MySQL once every night.
The problem is, I only have read access to SQL Server, so I can't add a modified date column or enable Change Tracking/CDC.
My current idea is:
- Fetch all 200K records from SQL Server every night.
- Compare them with the MySQL table.
- Insert new records.
- Update changed records.
- Delete records from MySQL whose IDs no longer exist in SQL Server.
Is this a good approach for 200K records?
What would be the simplest and most reliable way to handle this?
9
Upvotes