在Azure存储上托管SQLite DB? [英] Hosting SQLite DB on Azure Storage?

查看:104
本文介绍了在Azure存储上托管SQLite DB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在Azure上托管一个SQLite数据库,该数据库将在多个Web应用程序之间共享.我唯一的选择似乎是Azure Blob或文件存储(因为它们摆脱了提供在Web实例之间共享的专用存储的"Azure网站").但是,似乎没有任何方法可以将Azure存储共享映射到Web App可以识别的驱动器,因此无法生成SQLite可以使用的路径.显然,在没有大量SQLite VFS黑客攻击的情况下,SQLite不能使用REST API来访问数据库.

I need to host an SQLite database on Azure that will be shared among several web apps. My only options seem to be Azure Blob or File Storage (since they got rid of the "Azure Websites" that provided dedicated storage shared among web instances). However, there does not appear to be any way to map an Azure Storage share to a drive that the Web App will recognize, and thus no way to generate a path that SQLite can use. And obviously, SQLite can't use REST APIs to access the DB without tremendous hacking in the SQLite VFS.

所以我想知道是否有人成功在Azure存储上托管了SQLite数据库,使得Web应用程序可以访问它?

So I'm wondering if anyone has successfully hosted an SQLite DB on Azure Storage such that it was accessible to a Web App?

推荐答案

Azure Web应用程序(以前称为网站)仍然存在,并且在整个Web应用程序实例之间仍具有持久的共享存储.

Azure Web Apps (formerly known as Web Sites) still exists, and still has durable, shared storage across your web app instances.

您不能使用Blob来保存SQLite,因为它与文件I/O不兼容(它具有用于访问的REST API).而且,您不能简单地附加一个Azure文件存储卷(您可以通过API 使用一个卷,但不能将其装载到Azure Web App实例).

You cannot use a blob to hold SQLite, as it is not compatible with file I/O (it has a REST API for access). And you cannot simply attach an Azure File Storage volume (you can use one, via API, but cannot mount it to an Azure Web App instance).

Web应用程序没有任何变化:只需将SQLite数据库放置在应用程序根目录下的目录中即可.

Nothing's changed with Web Apps: just place your SQLite database in a directory underneath your app's root directory.

这篇关于在Azure存储上托管SQLite DB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆