关于SQL Server Express和localdb的混淆

时间:2021-10-17 15:52:35

I need to deploy a WCF service with a database on client machines. I am confused about SQL Server Express. I need to verify all of the following.

我需要在客户端计算机上部署带有数据库的WCF服务。我对SQL Server Express感到困惑。我需要验证以下所有内容。

When attaching database files in the App_Data folder, do I still need to install SQL Server Express engine (Windows service) on client machines?

在App_Data文件夹中附加数据库文件时,是否仍需要在客户端计算机上安装SQL Server Express引擎(Windows服务)?

There is a flavor called SQL Server Express LocalDb. That one does not need an engine (Windows service)? But I think it need a prerequisite installation of LocalDb.

有一种称为SQL Server Express LocalDb的风格。那个不需要引擎(Windows服务)?但我认为它需要安装LocalDb。

Localdb is introduced with SQL Server 2012. There is NO localdb for SQL Server 2008. Correct? I could not find 2008 version on MS site.

SQL Server 2012引入了Localdb.SQL Server 2008没有localdb。正确吗?我在MS网站上找不到2008版本。

1 个解决方案

#1


14  

Do I still need to install SQL Server Express engine (A win Service) on client machines?

我还需要在客户端计算机上安装SQL Server Express引擎(赢取服务)吗?

Yes, they need it installed for your application to query the database. Can't really get around it.

是的,他们需要为您的应用程序安装它来查询数据库。无法真正解决它。

There is a flavor called SQL Express localDb. That one does not need an engine (win service)? but I think it need a perquisite installation of localdb.

有一种称为SQL Express localDb的味道。那个不需要引擎(赢得服务)?但我认为它需要一个localdb的必要安装。

Yes, you'd still need to install LocalDB on the client machine. It's pretty hassle-free to do, but I think it's overkill unless you really need the full features of a SQL Server instance for your webservice.

是的,您仍然需要在客户端计算机上安装LocalDB。这样做很麻烦,但我认为除非你真的需要为你的web服务提供SQL Server实例的全部功能,否则这样做太过分了。

Instead of LocalDB I'd strongly recommend using SQL Server Compact Edition - it performs the role you're thinking of (your WCF Service can simply connect directly to the database file on your client machines without installing SQL Server, and is lightweight), but doesn't need to be installed (it's simply included as a DLL with your WCF application):

而不是LocalDB我强烈建议使用SQL Server Compact Edition - 它执行您正在考虑的角色(您的WCF服务可以直接连接到客户端计算机上的数据库文件而无需安装SQL Server,并且是轻量级的),但是不需要安装(它只是作为你的WCF应用程序的DLL包含):

Unlike other editions of Microsoft SQL Server, SQL CE runs in-process with the application which is hosting it.

与其他版本的Microsoft SQL Server不同,SQL CE在托管它的应用程序的进程中运行。

In Microsoft's own words on the differences between LocalDB and SQLCE:

用微软自己的话来说明LocalDB和SQLCE之间的区别:

LocalDB and SQL Server Compact?

LocalDB和SQL Server Compact?

Small and simple database, lightweight installation, connecting to a database file -- this will sound familiar to any developer using SQL Server Compact. The similarities are not accidental, as our goal for LocalDB was to be as easy to use as SQL Server Compact (while being as powerful and compatible with full SQL Server as SQL Express).

小而简单的数据库,轻量级安装,连接到数据库文件 - 这对任何使用SQL Server Compact的开发人员来说都很熟悉。这些相似之处并非偶然,因为我们的LocalDB目标与SQL Server Compact一样易于使用(同时与SQL Express一样强大且兼容完整的SQL Server)。

There are significant differences between LocalDB and SQL Server Compact:

LocalDB和SQL Server Compact之间存在显着差异:

Execution mode: SQL Server Compact is an in-proc DLL, while LocalDB runs as a separate process.

执行模式:SQL Server Compact是一个进程内DLL,而LocalDB作为一个单独的进程运行。

SQL Server CE is kind of like an updated version of MS Access, the file goes with the application which can "just connect" to the database file without involving any database server installation, and its syntax/features are very close to SQL Server standard.

SQL Server CE有点像MS Access的更新版本,该文件与应用程序一起使用,该应用程序可以“只连接”到数据库文件而不涉及任何数据库服务器安装,并且其语法/功能非常接近SQL Server标准。

#1


14  

Do I still need to install SQL Server Express engine (A win Service) on client machines?

我还需要在客户端计算机上安装SQL Server Express引擎(赢取服务)吗?

Yes, they need it installed for your application to query the database. Can't really get around it.

是的,他们需要为您的应用程序安装它来查询数据库。无法真正解决它。

There is a flavor called SQL Express localDb. That one does not need an engine (win service)? but I think it need a perquisite installation of localdb.

有一种称为SQL Express localDb的味道。那个不需要引擎(赢得服务)?但我认为它需要一个localdb的必要安装。

Yes, you'd still need to install LocalDB on the client machine. It's pretty hassle-free to do, but I think it's overkill unless you really need the full features of a SQL Server instance for your webservice.

是的,您仍然需要在客户端计算机上安装LocalDB。这样做很麻烦,但我认为除非你真的需要为你的web服务提供SQL Server实例的全部功能,否则这样做太过分了。

Instead of LocalDB I'd strongly recommend using SQL Server Compact Edition - it performs the role you're thinking of (your WCF Service can simply connect directly to the database file on your client machines without installing SQL Server, and is lightweight), but doesn't need to be installed (it's simply included as a DLL with your WCF application):

而不是LocalDB我强烈建议使用SQL Server Compact Edition - 它执行您正在考虑的角色(您的WCF服务可以直接连接到客户端计算机上的数据库文件而无需安装SQL Server,并且是轻量级的),但是不需要安装(它只是作为你的WCF应用程序的DLL包含):

Unlike other editions of Microsoft SQL Server, SQL CE runs in-process with the application which is hosting it.

与其他版本的Microsoft SQL Server不同,SQL CE在托管它的应用程序的进程中运行。

In Microsoft's own words on the differences between LocalDB and SQLCE:

用微软自己的话来说明LocalDB和SQLCE之间的区别:

LocalDB and SQL Server Compact?

LocalDB和SQL Server Compact?

Small and simple database, lightweight installation, connecting to a database file -- this will sound familiar to any developer using SQL Server Compact. The similarities are not accidental, as our goal for LocalDB was to be as easy to use as SQL Server Compact (while being as powerful and compatible with full SQL Server as SQL Express).

小而简单的数据库,轻量级安装,连接到数据库文件 - 这对任何使用SQL Server Compact的开发人员来说都很熟悉。这些相似之处并非偶然,因为我们的LocalDB目标与SQL Server Compact一样易于使用(同时与SQL Express一样强大且兼容完整的SQL Server)。

There are significant differences between LocalDB and SQL Server Compact:

LocalDB和SQL Server Compact之间存在显着差异:

Execution mode: SQL Server Compact is an in-proc DLL, while LocalDB runs as a separate process.

执行模式:SQL Server Compact是一个进程内DLL,而LocalDB作为一个单独的进程运行。

SQL Server CE is kind of like an updated version of MS Access, the file goes with the application which can "just connect" to the database file without involving any database server installation, and its syntax/features are very close to SQL Server standard.

SQL Server CE有点像MS Access的更新版本,该文件与应用程序一起使用,该应用程序可以“只连接”到数据库文件而不涉及任何数据库服务器安装,并且其语法/功能非常接近SQL Server标准。