简体   繁体   English

如何在 ASP.NET Web 应用程序中热交换重建的数据库

[英]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.我有一个场景,一个基于 ASP.NET C# 的 Web 应用程序正在从一个大型 SQL 数据库中提取数据,该数据库由一个独立的应用程序每隔一小时左右用新鲜数据重建,问题是重建过程偶尔会导致锁定干扰网络应用程序。 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.我正在考虑使用第二个数据库来重建一个数据库,而另一个数据库正在被 Web 应用程序使用,然后进行两个切换。 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) 数据库快照 (SQL Server)

Understanding Database snapshots 了解数据库快照

SQL Server Database Snapshots (sqlservercentral) SQL Server 数据库快照 (sqlservercentral)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何验证ASP.NET Web应用程序以访问SQL数据库 - How to authenticate an asp.net web app to access sql database 具有ASP.NET MVC的数据库Web应用 - Database web app with ASP.NET MVC 带有 Javascript 的 ASP.NET Web 应用程序 - 正确填充数据库列 - ASP.NET web app with Javascript - properly populate database columns ASP.NET 内核 Web API 应用内多数据库 - ASP.NET Core Web API multi database in app 如何将 ASP.NET Web 应用程序部署到 Azure 与现有的 Z9778840A0104CB30C52ZB7 服务器数据库 (76410CB30C52ZB7) 服务器数据库 - How to deploy an ASP.NET Web App to Azure with an existing SQL Server database (Azure Data Studio) 如何允许来自ASP.NET Web应用程序和Windows服务的SQL Server数据库连接? - How to allow SQL Server database connection from an ASP.NET web app and a Windows service? 是否可以顺利“热部署”ASP.NET Core应用程序? - Is it possible to smoothly “hot deploy” an ASP.NET Core app? 如何使用EF5和数据库优先方法在ASP.NET MVC4 Web应用程序中重构web.config? - How to refactor web.config in an ASP.NET MVC4 Web App with EF5 and Database First approach? 如何访问ASP.NET Web应用程序随附的数据库? - How to access the database that comes with ASP.NET Web Application? 如何在 web 应用程序中使用 ASP.NET 核心身份框架,当只有 web Z8A5DA52ED126447135AZE70C0 访问数据库时? - How to use ASP.NET Core Identity framework in web app when only web api has access to database?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM