LocalDB RC0 is Here, with a Brand New MSI!Release Candidate 0 for SQL Server 2012 has just shipped, bringing a new update to SQL Server Express LocalDB!
As announced here LocalDB is a version of SQL Server Express, introduced in the CTP3 of SQL Server 2012 and created specifically for developers. It is very easy to install and requires no management, yet it offers the same T-SQL language, programming surface and client-side providers as the regular SQL Server Express. For more details please see the original announcement and related posts listed in the Try It Now section below.
With this introduction done I am very happy to present a small, streamlined installer for LocalDB. This dedicated, 33MB MSI package can install LocalDB in 30 seconds and completes the first version of SQL Server Express LocalDB.
You can download LocalDB from this page. Just pick your CPU architecture (32-bit or 64-bit) and select LocalDB from the drop-down list. Just double-click the SqlLocalDB.msi file is downloaded that will be downloaded. We kept LocalDB simple so there is not a single configuration option in the entire installer. All you need to do is to accept the EULA and click Next a couple times. The installation of LocalDB requires administrative privileges, so if your machine has UAC enabled you will also need to agree to elevate the installation process.
Silent and Embedded Installation
As any decent installer, LocalDB supports silent installation. Here is an example a command that installs LocalDB silently:
msiexec /i SqlLocalDB.msi /qn IACCEPTSQLLOCALDBLICENSETERMS=YES
As you can see these are all standard Windows Installer options, except for the IACCEPTSQLLOCALDBLICENSETERMS variable. Setting it to YES is telling us that the user read and accepted LocalDB EULA. As expected the installer will not continue unless this variable is set to YES.
If you are considering distributing LocalDB with your application, be sure to put 32-bit and 64-bit versions into separate folders. LocalDB doesn't support installing 32-bit version on 64-bit Windows, so you will need to distribute both versions of LocalDB with your application and they both have the same file name (SqlLocalDB.msi). Renaming LocalDB packages is not an option, as Windows Installer requires that MSI file names don't change (see Rule 14 in this post for the explanation).
Multiple Versions of LocalDB and Upgrades
To keep the LocalDB installation simple we decided that major versions of LocalDB will be installed side-by-side. This way an application using LocalDB version 11 will never be broken by some other application upgrading LocalDB to version 12. Both applications will be able to install the versions of LocalDB they need without interfering with each other.
Service Packs for LocalDB will also work in the simplest possible way. In each Service Pack we will release new MSI packages containing all the LocalDB binaries. The updated MSI package can be used to either apply the Service Pack to an existing LocalDB installation or to install a fresh LocalDB installation. In both cases the command line for the silent installation will be the same.
As you can tell we are fairly satisfied with the final shape of LocalDB, at least for SQL Server 2012. But the final call belongs to you! Please give it a try and share your feedback with us.
You may also want to see other posts and materials about LocalDB:
- Introducing LocalDB and LocalDB Q&A
- Upgrading .NET Framework 4 to support LocalDB connections and using SQL Server Management Studio to work with LocalDB
- Using LocalDB in Visual Studio 2010
- LocalDB RC0 and the New LocalDB Installer
- Where are LocalDB database files located?
- SQL Server 2012 Express LocalDB documentation [preview]
- Krzysztof Kozielczyk