SQL 如何单独安装localdb?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23320013/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to install localdb separately?
提问by user1687824
If I have to work with localdb
, do we need to install it separately?
如果我必须使用localdb
,我们是否需要单独安装它?
I have SQL Server 2008 R2 Management Studio installed, SQL Server 2012 installed, .net 4.0.2 update installed. But I don't see localdb in the PC yet.
我安装了 SQL Server 2008 R2 Management Studio,安装了 SQL Server 2012,安装了 .net 4.0.2 更新。但是我还没有在 PC 中看到 localdb。
回答by Andrey Morozov
From MSDN
来自MSDN
The primary method of installing LocalDB is by using the SqlLocalDB.msi program. LocalDB is an option when installing any SKU of SQL Server 2012 Express. Select LocalDB on the Feature Selection page during installation of SQL Server Express. There can be only one installation of the LocalDB binary files for each major SQL Server Database Engine version. Multiple Database Engine processes can be started and will all use the same binaries. An instance of the SQL Server Database Engine started as the LocalDB has the same limitations as SQL Server Express
安装 LocalDB 的主要方法是使用 SqlLocalDB.msi 程序。在安装 SQL Server 2012 Express 的任何 SKU 时,LocalDB 是一个选项。安装 SQL Server Express 期间在“功能选择”页上选择 LocalDB。每个主要 SQL Server 数据库引擎版本只能安装一个 LocalDB 二进制文件。可以启动多个数据库引擎进程,并且都将使用相同的二进制文件。作为 LocalDB 启动的 SQL Server 数据库引擎实例具有与 SQL Server Express 相同的限制
Or you can download standalone SqlLocalDB.msifrom the list of available downloads on the SQL Express
downloading page
或者您可以从下载页面上的可用下载列表中下载独立的SqlLocalDB.msiSQL Express
To locate localdb
instance on your PC simply try to connect to (localdb)\Projects
要localdb
在您的 PC 上找到实例,只需尝试连接到(localdb)\Projects
回答by mr R
If you downloaded SqlLocalDB.msiYou can use silent install.
如果您下载了SqlLocalDB.msi ,则可以使用静默安装。
msiexec /i SqlLocalDB.msi /qn IACCEPTSQLLOCALDBLICENSETERMS=YES
Remember about administrative rights for installation !
请记住有关安装的管理权限!
回答by Gregory Suvalian
Note for people who got SQL 2016. You do in fact need to choose "Express" during installation of SQL 2016 to choose "localDB" option. If you choose anything else (like Developer edition for example), "localDB" will not appear as option under "Shared features"
获得 SQL 2016 的人请注意。实际上,您确实需要在安装 SQL 2016 期间选择“Express”才能选择“localDB”选项。如果您选择其他任何内容(例如开发人员版),“localDB”将不会显示为“共享功能”下的选项
回答by Sed
Question is old but I think this is allways nice to know:
问题很老,但我认为这总是很高兴知道:
How to check if you have LocalDB installed, and if you do have it, which version it is:
如何检查您是否安装了 LocalDB,如果安装了,它是哪个版本:
- Open Command Prompt
- Enter "SqlLocalDB info" (without quotes)
- Hit 'Enter' and your should see something like this,
- 打开命令提示符
- 输入“SqlLocalDB 信息”(不带引号)
- 按“Enter”,您应该会看到类似 这样的内容,
which means you have version "MSSQLLocalDB" installed.
这意味着您安装了“MSSQLLocalDB”版本。
There are a couple of versions:
有几个版本:
- v11.0
- v12.0
- v13.0 and
- MSSQLLocalDB
- v11.0
- v12.0
- v13.0 和
- 本地数据库