多用户场景中的 SQL Server CE - 这真的非常愚蠢吗?

发布于 2024-08-16 06:03:11 字数 537 浏览 2 评论 0原文

我正在尝试使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

不再让梦枯萎 2024-08-23 06:03:11

MS 推荐(来自 Darian Miller 的 比较指南):

当您需要数据服务时
功能,例如能够
支持多个远程用户,您
应该从 SQL Server Express 开始
编辑和建立数据服务
家谱。

运行时支持同一台机器上的并发,不确定多台机器访问该文件。如果文件存储在网络共享上,则可能不适合 ce 的最佳性能配置文件。我会说使用 EE,使用简单的 msi 即可轻松安装。

SSCE并发:

SSCE 允许多个连接
来自相同的数据库(.sdf 文件)
相同的应用程序甚至多个
同一台计算机上的应用程序。
这给了你更多的自由
根据需要构建您的应用程序,
例如允许用户继续
在执行时与数据交互
与后端同步
数据库,或者有多个
同一台机器上的应用程序共享
SSCE 数据存储。交易性
并发锁是由
数据库引擎防止并发
连接访问相同的
同时记录。这
并发技术限制
单个数据库的连接数是
256,但70-80更实用
从性能角度来看是有限的。

http://technet.microsoft.com/en-us /library/bb380177%28SQL.90%29.aspx

MS recommends (from Darian Miller's comparison guide):

When you require data service
functionality, such as the ability to
support multiple, remote users, you
should start with SQL Server Express
Edition and work up the data service
family tree.

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:

SSCE allows multiple connections to
the same database (.sdf file) from the
same application or even multiple
applications on the same computer.
This gives you more freedom to
structure your application as needed,
such as allowing the user to continue
to interact with data while performing
synchronization with a back-end
database, or to have multiple
applications on the same machine share
an SSCE data store. Transactional
concurrency locks are made by the
database engine to prevent concurrent
connections from accessing the same
records at the same time. The
technical limit on concurrent
connections for a single database is
256, but 70-80 is a better practical
limit from a performance perspective.

http://technet.microsoft.com/en-us/library/bb380177%28SQL.90%29.aspx

我的鱼塘能养鲲 2024-08-23 06:03:11

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.

谢绝鈎搭 2024-08-23 06:03:11

我想说,只要您在一台机器上运行所有内容,您就会少遇到 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文