I am working on a student project and I need some guidance on what solution I can use.
- The goal of the project is to create a dummy web page that would send dummy data to 2 databases(or read from one of them).
- If at any point one of them is unavailable it should keep sending data to the one that still works.
- When the unavailable database returns to function it should check with the one that was still working, synchronize all changes made to data and continue on. It should work both ways.
- Both DB1 and DB2 can shutdown but when they return to function they should synchronize with the one that was working.
Professor recommended MS SQL server 2019 Developer, so far I managed to make database replication so any change made to DB1 is replicated on DB2, but I can only send data to DB1 because it doesn't work the other way. I followed this How to Configure MS SQL Server Replication: Complete Walkthrough tutorial. Basically it is transactional replication between 2 SQL Server dbs that run on 2 VMs.
I can't figure out the way to do this so I would appreciate if anyone has any suggestions or tutorials that could help me. One thing that I found and I think would work is MS SQL peer to peer replication, but it is only available for Enterprise edition.