简体   繁体   中英

How to hot swap rebuilt database in an ASP.NET web app

I have a scenario where a an ASP.NET C# based web app is pulling data from a large SQL database that gets rebuilt by a separate app with fresh data every hour or so, the problem is that the rebuild process occasionally causes locks the interfere with the web app. I was thinking about using a second database in order to have one DB rebuild, while the other was being used by the web app, and then have the two switch. What is the best way to manage something like this, or is there a better approach in general?

if you only Pull data from the DB (not updating and/or making operations) a great idea could be instead of rebuilding the database making an Snapshot the database and work with that one, here are some useful articles that can guide you:

Database Snapshots (SQL Server)

Understanding Database snapshots

SQL Server Database Snapshots (sqlservercentral)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM