多用户场景中的 SQL Server CE - 这真的非常愚蠢吗? [英] SQL Server CE in a multi user scenario - is this really, really stupid?

查看:30
本文介绍了多用户场景中的 SQL Server CE - 这真的非常愚蠢吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 SQL Server Compact Edition 3.5 作为销售应用程序的数据库后端.将安装 3-4 个 Windows 窗体应用程序,这些应用程序都将(通过 LINQ2SQL)读取和写入位于网络共享上的一个 .sdf 文件.

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.

我的(相当少的)测试表明这可能是可行的.文档 指出 SQL Server CE 最多支持 256 个连接.SQL Server CE 是否甚至锁定其行?还有其他我应该担心的并发问题吗?

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?

最重要的是,有没有人成功使用 SQL Server CE 并将多个应用程序连接到同一个数据库?

Bottom line is, has anyone used SQL Server CE successfully with multiple applications connecting to same database?

我是否应该避免将来的麻烦而选择 SQL Server Express?

Should I spare myself future headaches and go with SQL Server Express?

推荐答案

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

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

当您需要数据服务时功能,例如能够支持多个远程用户,您应该从 SQL Server Express 开始版本和处理数据服务家谱.

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.

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

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 并发:

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

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

这篇关于多用户场景中的 SQL Server CE - 这真的非常愚蠢吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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