多用户场景中的 SQL Server CE - 这真的非常愚蠢吗?
我正在尝试使用 SQL Server Compact Edition 3.5 作为销售应用程序的数据库后端。将安装 3-4 个 Windows 窗体应用程序,所有这些应用程序(通过 LINQ2SQL)都会读取和写入位于网络共享上的一个 .sdf 文件。
我的(相当不广泛的)测试表明这是可行的。 文档指出 SQL Server CE 支持最多 256 个连接。 SQL Server CE 是否会锁定其行?还有其他我应该担心的并发问题吗?
底线是,是否有人成功使用 SQL Server CE 将多个应用程序连接到同一数据库?
我应该选择 SQL Server Express 来避免将来的麻烦吗?
I am trying to use SQL Server Compact Edition 3.5 as a database backend for a sales application. There would be 3-4 installations of a Windows Forms application which would all (via LINQ2SQL) read from and write to one .sdf file located on a network share.
My (pretty inextensive) testing has shown that this could be viable. Documentation states that SQL Server CE supports up to 256 connections. Does SQL Server CE even lock its rows? Are there other concurrency issues that I should worry about?
Bottom line is, has anyone used SQL Server CE successfully with multiple applications connecting to same database?
Should I spare myself future headaches and go with SQL Server Express?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
MS 推荐(来自 Darian Miller 的 比较指南):
运行时支持同一台机器上的并发,不确定多台机器访问该文件。如果文件存储在网络共享上,则可能不适合 ce 的最佳性能配置文件。我会说使用 EE,使用简单的 msi 即可轻松安装。
SSCE并发:
http://technet.microsoft.com/en-us /library/bb380177%28SQL.90%29.aspx
MS recommends (from Darian Miller's comparison guide):
the runtime supports concurrency on the same machine, not sure about multiple machines accessing the file. in the case the file is stored over a network share, that may not fit the optimal performance profile for ce. i would say go with EE, it's a snap to install with a simple msi.
SSCE Concurrency:
http://technet.microsoft.com/en-us/library/bb380177%28SQL.90%29.aspx
Microsoft 已就此发布了一份白皮书,您应该阅读该白皮书并将其应用于您的特定情况。
http://下载。 microsoft.com/download/A/4/7/A47B7B0E-976D-4F49-B15D-F02ADE638EBE/Compact_Express_Comparison.doc
网络共享显然使 Express 无法成为一种选择。
Micrsoft has published a white paper on this that you should read over and apply to your particular situation.
http://download.microsoft.com/download/A/4/7/A47B7B0E-976D-4F49-B15D-F02ADE638EBE/Compact_Express_Comparison.doc
The network share apparently precludes Express from being an option.
我想说,只要您在一台机器上运行所有内容,您就会少遇到 sql ce 的麻烦。在运行应用程序的每台计算机上安装 Express 版本并不好,很麻烦,而且可能有点过分了。
I'd say you will have less headaches with sql ce as long as you are running everything on one machine. Installing the Express edition on every computer that your app is running on is not good, cumbersome and probably overkill.