54

If I have to work with localdb, do we need to install it separately?

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.

Andrey Morozov
  • 7,839
  • 5
  • 53
  • 75
user1687824
  • 807
  • 2
  • 10
  • 24

4 Answers4

76

From 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

enter image description here

Or you can download standalone SqlLocalDB.msi from the list of available downloads on the SQL Express downloading page

enter image description here

To locate localdb instance on your PC simply try to connect to (localdb)\Projects

enter image description here

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
Andrey Morozov
  • 7,839
  • 5
  • 53
  • 75
  • 6
    Hoping to save some others time... SQL Server 2012 Express LocalDB Service Pack 2 (v11.0) is available here: http://www.microsoft.com/en-au/download/details.aspx?id=43351 – Tod Thomson Oct 01 '15 at 05:39
  • @VahidN it looks like with SQL Express 2016 you can't download just LocalDB. The download link doesn't give you the multi-select modal like previous versions do. – seangwright Jun 23 '16 at 03:09
  • 3
    direct download link of en_sql_server_2016_localdb_x64_8762243: https://download.microsoft.com/download/E/1/2/E12B3655-D817-49BA-B934-CEB9DAC0BAF3/SqlLocalDB.msi – VahidN Jun 23 '16 at 07:32
  • @VahidN do I need to install that if I have SQL Server 2016 Developer Edition installed? How do I check if I already have LocalDb installed? The above `(localdb)\Projects` didn't work for me! – J86 Jul 17 '16 at 12:19
  • 2
    Open a new topic + Run `SqlLocalDB info` command to find the installed instances. – VahidN Jul 17 '16 at 17:36
  • 12
    LocalDB 2017: https://download.microsoft.com/download/E/F/2/EF23C21D-7860-4F05-88CE-39AA114B014B/SqlLocalDB.msi – VahidN Oct 03 '17 at 05:16
  • 2
    SQL Server 2019 LocalDB: https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SqlLocalDB.msi – VahidN Nov 05 '19 at 22:15
  • SQL Server 2022 LocalDB: https://download.microsoft.com/download/3/8/d/38de7036-2433-4207-8eae-06e247e17b25/SqlLocalDB.msi – Đonny Jun 17 '23 at 20:07
23

If you downloaded SqlLocalDB.msi You can use silent install.

msiexec /i SqlLocalDB.msi /qn IACCEPTSQLLOCALDBLICENSETERMS=YES

Remember about administrative rights for installation !

mr R
  • 997
  • 2
  • 12
  • 25
20

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"

Developer Edition
enter image description here

SQL Express
enter image description here

Gregory Suvalian
  • 3,566
  • 7
  • 37
  • 66
  • So are you saying you can install SQL Server 2016 and then afterwards install LocalDB as part of SQL Server Express 2016? – webworm Jul 04 '16 at 16:03
  • I'd like to know this too! How do I get LocalDB when I have SQL Server 2016 Developer edition installed? – J86 Jul 17 '16 at 12:20
  • 2
    https://go.microsoft.com/fwlink/?LinkID=799012 There's a downloader that's about 3 MB. That allows for downloading SQL Server Express (1.4 GB) or LocalDb (44 MB) – Bernhard Döbler Feb 15 '17 at 22:31
11

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:

  1. Open Command Prompt
  2. Enter "SqlLocalDB info" (without quotes)
  3. Hit 'Enter' and your should see something like this,

which means you have version "MSSQLLocalDB" installed.

There are a couple of versions:

  • v11.0
  • v12.0
  • v13.0 and
  • MSSQLLocalDB
Sed
  • 129
  • 1
  • 9
  • 4
    I might add that if you wanted to open this database in SSMS then you simply chose `Server name: (LocalDb)\MSSQLLocalDB` and Windows Authentication by default – Frank Fu Jan 12 '18 at 04:13