如何为多个进程共享SQL Server CE数据库文件(.sdf)? [英] How do I share a SQL Server CE database file (.sdf) for multiple processes?

查看:184
本文介绍了如何为多个进程共享SQL Server CE数据库文件(.sdf)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在SQL Server CE中有一个数据库。将不同计算机的几个应用程序连接到数据库时会抛出异常。



这是例外:


存在文件共享冲突。不同的过程可能是使用
的文件。
类型的异常是SqlCeException。


这是我的连接字符串:

 数据源= \\server\ProductionDB\ProductionControl.sdf;文件模式=读写;最大数据库大小= 4000 

SQL Server CE版本为3.5 SP2

解决方案

我最初误解了你的问题,但我不相信SQL Server CE支持来自不同电脑的多个连接。



从MS 指南


当您需要数据服务功能时,例如支持多个远程
用户的功能您应该从SQL Server Express Edition开始,并处理数据服务系列树。


您可以有多个连接(最多256个),但是来自多台机器的连接需要SQL Express Edition。它是免费的,易于部署。



这里是链接: http://www.microsoft.com/sqlserver/en/us/editions/express.aspx


I have a database in SQL Server CE. When connecting several applications of different computers to the database throw an exception.

This is the exception:

There is a file sharing violation. A different process might be using the file. type of exception is "SqlCeException".

and this is my connection string :

Data Source=\\server\ProductionDB\ProductionControl.sdf;File Mode=Read Write; Max Database Size = 4000

The version of SQL Server CE is 3.5 SP2

解决方案

I misread your question initially, but I don't believe SQL Server CE supports multiple connections from different computers.

From an MS 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.

You can have multiple connections (up to 256) from the same machine, but connections from multiple machines requires SQL Express Edition. It's freely available and easy to deploy.

Here's the link: http://www.microsoft.com/sqlserver/en/us/editions/express.aspx

这篇关于如何为多个进程共享SQL Server CE数据库文件(.sdf)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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