SQL Server Express Database hosted on Network Share - Is it Possible?

大憨熊 提交于 2019-12-13 14:18:48

问题


I've started work on a project that requires an SQL Server Database. I will be building a front end application in c# .Net 3.5, that will use LINQ to SQL.

I need to host the database on a network share so that a group of users can all gain access to the database, mainly for read only.

I know that SQL Server Compact is designed to run on the local machine and my company is not willing to front the costs of a full blooded SQL Server.

Is there a way of achieving what I need to do via SQL Server Express?

If so, which are the best guides on how to set this up?

Thanks


回答1:


If you go with the (free) SQL Server express, it will do what you need - but you don't access it thru a network shared drive - the server would be located by an ip address (or equivalent DNS).

You c# application would be talking to a service - SQL Server - not reading to/from a database file. The service will handle the interaction with the database. Only the SQL Server service will need to know where the file actually is - your client machines won't know and shouldn't care.

If your background is only with file-based databases - i.e. MS Access, you need to change your mindset a bit about how SQL server works.




回答2:


You can install a SQL Server Express instance and install the SQL Management Studio Express for all users who need access to the database. The Express Edition is a standard SQL server with limitations regarding the number of processors used, the maximum amount of memory used and the maximum database size. If these limitations don't bother you, it should work fine for you.

Using a network share as a database storage to access db files from several clients is a bad idea, as the sql server instance should always be the only one directly accessing the database, both for read and write access. Configuring several instances of SQL Server to access the same database will probably not work - and if it works, it will probably create havoc in your database files.



来源:https://stackoverflow.com/questions/11954024/sql-server-express-database-hosted-on-network-share-is-it-possible

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!